Skip to content

Commit 9d761ea

Browse files
committed
tests: more ice tests
1 parent 8c2c9a9 commit 9d761ea

9 files changed

Lines changed: 93 additions & 0 deletions

File tree

‎tests/crashes/129262.rs‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//@ known-bug: rust-lang/rust#129262
2+
//@ compile-flags: -Zvalidate-mir --edition=2018 --crate-type=lib -Copt-level=3
3+
4+
#![feature(async_closure)]
5+
6+
fnmain(){}
7+
8+
fnneeds_fn_mut<T>(mutx:implFnMut() -> T){
9+
x();
10+
}
11+
12+
fnhello(x:Ty){
13+
needs_fn_mut(async || {
14+
x.hello();
15+
});
16+
}
17+
18+
structTy;
19+
implTy{
20+
fnhello(self){}
21+
}

‎tests/crashes/129850.rs‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//@ known-bug: rust-lang/rust#129850
2+
3+
pubtraitFoo2{
4+
fnbar<'a:'a>(&'amutself) -> implSized + use<'static>;
5+
}
6+
7+
implFoo2for(){
8+
fnbar<'a:'a>(&'amutself) -> implSized + 'a{}
9+
}

‎tests/crashes/130104.rs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//@ known-bug: rust-lang/rust#130104
2+
3+
fnmain(){
4+
let non_secure_function =
5+
core::mem::transmute::<fn() -> _,extern"C-cmse-nonsecure-call"fn() -> _>;
6+
}

‎tests/crashes/130310.rs‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//@ known-bug: rust-lang/rust#130310
2+
3+
use std::marker::PhantomData;
4+
5+
#[repr(C)]
6+
structA<T>{
7+
a:*constA<A<T>>,
8+
p:PhantomData<T>,
9+
}
10+
11+
extern"C"{
12+
fnf(a:*constA<()>);
13+
}
14+
15+
fnmain(){}

‎tests/crashes/130346.rs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//@ known-bug: rust-lang/rust#130346
2+
3+
#![feature(non_lifetime_binders)]
4+
#![allow(unused)]
5+
6+
traitA<T>:Iterator<Item = T>{}
7+
8+
fndemo(x:&mutimplfor<U>A<U>){
9+
let _:Option<u32> = x.next();// Removing this line stops the ICE
10+
}

‎tests/crashes/130372-1.rs‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//@ known-bug: rust-lang/rust#130372
2+
3+
pubfnvariadic_fn(n:usize,mut args: ...){}
4+
5+
reuse variadic_fn;
6+
7+
fnmain(){
8+
variadic_fn();
9+
}

‎tests/crashes/130372-2.rs‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//@ known-bug: rust-lang/rust#130372
2+
3+
pubfntest_va_copy(_:u64,mut ap: ...){}
4+
5+
pubfnmain(){
6+
unsafe{
7+
test_va_copy();
8+
9+
call(x);
10+
}
11+
}

‎tests/crashes/130372-3.rs‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//@ known-bug: rust-lang/rust#130372
2+
3+
fnbar() -> implFn(){
4+
wrap()
5+
}
6+
7+
fnwrap(...:impl ...) -> implFn(){}

‎tests/crashes/130399.rs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//@ known-bug: rust-lang/rust#130399
2+
3+
fnelided(main:&()) -> implSized + use<main>{}
4+
5+
fnmain(){}

0 commit comments

Comments
 (0)