Skip to content

Commit 98dd566

Browse files
committed
1 parent a5932b1 commit 98dd566

31 files changed

Lines changed: 664 additions & 1 deletion

‎tests/crashes/100041.rs‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//@ known-bug: #100041
2+
3+
pubtraitWellUnformed{
4+
typeRequestNormalize;
5+
}
6+
7+
impl<T: ?Sized>WellUnformedforT{
8+
typeRequestNormalize = ();
9+
}
10+
11+
pubfnlatent(_:&[<[[()]]asWellUnformed>::RequestNormalize;0]){}
12+
13+
pubfnbang(){
14+
latent(&[]);
15+
}
16+
17+
fnmain(){}

‎tests/crashes/101962.rs‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//@ known-bug: #101962
2+
3+
#![feature(core_intrinsics)]
4+
5+
pubfnwrapping<T:Copy>(a:T,b:T){
6+
let _z = core::intrinsics::wrapping_mul(a, b);
7+
}
8+
9+
fnmain(){
10+
wrapping(1,2);
11+
}

‎tests/crashes/102047.rs‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
//@ known-bug: #102047
2+
3+
structTy1;
4+
structTy2;
5+
6+
pubtraitTrait<T>{}
7+
8+
pubtraitWithAssoc1<'a>{
9+
typeAssoc;
10+
}
11+
pubtraitWithAssoc2<'a>{
12+
typeAssoc;
13+
}
14+
15+
impl<T,U>Trait<for<'a> fn(<TasWithAssoc1<'a>>::Assoc, <UasWithAssoc2<'a>>::Assoc)>for(T,U)
16+
where
17+
T:for<'a>WithAssoc1<'a> + for<'a>WithAssoc2<'a,Assoc = i32>,
18+
U:for<'a>WithAssoc2<'a>,
19+
{
20+
}
21+
22+
implWithAssoc1<'_>forTy1{
23+
typeAssoc = ();
24+
}
25+
implWithAssoc2<'_>forTy1{
26+
typeAssoc = i32;
27+
}
28+
implWithAssoc1<'_>forTy2{
29+
typeAssoc = ();
30+
}
31+
implWithAssoc2<'_>forTy2{
32+
typeAssoc = u32;
33+
}
34+
35+
fnfoo<T,U,V>()
36+
where
37+
T:for<'a>WithAssoc1<'a>,
38+
U:for<'a>WithAssoc2<'a>,
39+
(T,U):Trait<V>,
40+
{
41+
}
42+
43+
fnmain(){
44+
foo::<Ty1,Ty2,_>();
45+
}

‎tests/crashes/102252.rs‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//@ known-bug: #102252
2+
3+
#![feature(min_specialization, rustc_attrs)]
4+
5+
#[rustc_specialization_trait]
6+
pubtraitTrait{}
7+
8+
structStruct
9+
where
10+
Self:Iterator<Item = <SelfasIterator>::Item>,{}
11+
12+
implTraitforStruct{}
13+
14+
fnmain(){}

‎tests/crashes/103899.rs‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//@ known-bug: #103899
2+
3+
traitBaseWithAssoc{
4+
typeAssoc;
5+
}
6+
7+
traitWrapperWithAssoc{
8+
typeBaseAssoc:BaseWithAssoc;
9+
}
10+
11+
structWrapper<B>{
12+
inner:B,
13+
}
14+
15+
structProjectToBase<T:BaseWithAssoc>{
16+
data_type_h:T::Assoc,
17+
}
18+
19+
structDoubleProject<L:WrapperWithAssoc>{
20+
buffer:Wrapper<ProjectToBase<L::BaseAssoc>>,
21+
}
22+
23+
fntrigger<L:WrapperWithAssoc<BaseAssoc = ()>>() -> DoubleProject<L>{
24+
loop{}
25+
}
26+
27+
fnmain(){}

‎tests/crashes/105238-1.rs‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//@ known-bug: #105238
2+
3+
#![allow(incomplete_features)]
4+
#![feature(generic_const_exprs)]
5+
6+
traitRet{
7+
typeR;
8+
}
9+
10+
structCond<constPRED:bool,U,V>(std::marker::PhantomData<U>, std::marker::PhantomData<V>);
11+
12+
impl<U,V>RetforCond<true,U,V>{
13+
typeR = U;
14+
}
15+
16+
impl<U,V>RetforCond<false,U,V>{
17+
typeR = V;
18+
}
19+
20+
structRobinHashTable<constMAX_LENGTH:usize,CellIdx = Cond<{MAX_LENGTH < 65535},u16,u32>>
21+
where
22+
CellIdx:Ret,
23+
{
24+
_idx:CellIdx::R,
25+
}
26+
27+
fnmain(){
28+
use std::mem::size_of;
29+
println!("{}", size_of::<RobinHashTable<1024>>());
30+
println!("{}", size_of::<RobinHashTable<65536>>());
31+
}

‎tests/crashes/105238-2.rs‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//@ known-bug: #105238
2+
3+
#![allow(incomplete_features)]
4+
#![feature(generic_const_exprs)]
5+
6+
traitRet{
7+
typeR;
8+
}
9+
10+
structCond<constPRED:bool,U,V>(std::marker::PhantomData<U>, std::marker::PhantomData<V>);
11+
12+
impl<U,V>RetforCond<true,U,V>{
13+
typeR = U;
14+
}
15+
16+
impl<U,V>RetforCond<false,U,V>{
17+
typeR = V;
18+
}
19+
20+
structRobinHashTable<
21+
constMAX_LENGTH:usize,
22+
CellIdx = <Cond<{MAX_LENGTH < 65535},u16,u32>asRet>::R,
23+
>{
24+
_idx:CellIdx,
25+
}
26+
27+
fnmain(){
28+
use std::mem::size_of;
29+
println!("{}", size_of::<RobinHashTable<1024>>());
30+
println!("{}", size_of::<RobinHashTable<65536>>());
31+
}

‎tests/crashes/105488.rs‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//@ known-bug: #105488
2+
3+
pubtraitMyFnOnce{
4+
typeOutput;
5+
6+
fncall_my_fn_once(self) -> Self::Output;
7+
}
8+
9+
pubstructWrapFnOnce<F>(F);
10+
11+
impl<F:FnOnce() -> D,D:MyFnOnce>MyFnOnceforWrapFnOnce<F>{
12+
typeOutput = D::Output;
13+
14+
fncall_my_fn_once(self) -> Self::Output{
15+
D::call_my_fn_once(self.0())
16+
}
17+
}
18+
19+
impl<F:FnOnce() -> D,D:MyFnOnce>MyFnOnceforF{
20+
typeOutput = D::Output;
21+
22+
fncall_my_fn_once(self) -> Self::Output{
23+
D::call_my_fn_once(self())
24+
}
25+
}
26+
27+
pubfnmy_fn_1() -> implMyFnOnce{
28+
my_fn_2
29+
}
30+
31+
pubfnmy_fn_2() -> implMyFnOnce{
32+
WrapFnOnce(my_fn_1)
33+
}
34+
35+
fnmain(){
36+
let v = my_fn_1();
37+
38+
let _ = v.call_my_fn_once();
39+
}

‎tests/crashes/108814.rs‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//@ known-bug: #108814
2+
3+
#![feature(non_lifetime_binders)]
4+
5+
fntake(_:implfor<T>FnOnce(T) -> T){}
6+
7+
fnmain(){
8+
take(|x| x)
9+
}

‎tests/crashes/109681.rs‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//@ known-bug: #109681
2+
3+
#![crate_type="lib"]
4+
#![feature(linkage)]
5+
6+
#[linkage = "common"]
7+
pubstaticTEST3:bool = true;
8+
9+
fnmain(){}

0 commit comments

Comments
 (0)