Rollup merge of #130409 - matthiaskrgr:ccccrashes, r=compiler-errors
tests: more ice tests r? `@jieyouxu`
This commit is contained in:
commit
0406f12af9
21
tests/crashes/129262.rs
Normal file
21
tests/crashes/129262.rs
Normal file
@ -0,0 +1,21 @@
|
||||
//@ known-bug: rust-lang/rust#129262
|
||||
//@ compile-flags: -Zvalidate-mir --edition=2018 --crate-type=lib -Copt-level=3
|
||||
|
||||
#![feature(async_closure)]
|
||||
|
||||
fn main() {}
|
||||
|
||||
fn needs_fn_mut<T>(mut x: impl FnMut() -> T) {
|
||||
x();
|
||||
}
|
||||
|
||||
fn hello(x: Ty) {
|
||||
needs_fn_mut(async || {
|
||||
x.hello();
|
||||
});
|
||||
}
|
||||
|
||||
struct Ty;
|
||||
impl Ty {
|
||||
fn hello(self) {}
|
||||
}
|
9
tests/crashes/129850.rs
Normal file
9
tests/crashes/129850.rs
Normal file
@ -0,0 +1,9 @@
|
||||
//@ known-bug: rust-lang/rust#129850
|
||||
|
||||
pub trait Foo2 {
|
||||
fn bar<'a: 'a>(&'a mut self) -> impl Sized + use<'static>;
|
||||
}
|
||||
|
||||
impl Foo2 for () {
|
||||
fn bar<'a: 'a>(&'a mut self) -> impl Sized + 'a {}
|
||||
}
|
6
tests/crashes/130104.rs
Normal file
6
tests/crashes/130104.rs
Normal file
@ -0,0 +1,6 @@
|
||||
//@ known-bug: rust-lang/rust#130104
|
||||
|
||||
fn main() {
|
||||
let non_secure_function =
|
||||
core::mem::transmute::<fn() -> _, extern "C-cmse-nonsecure-call" fn() -> _>;
|
||||
}
|
15
tests/crashes/130310.rs
Normal file
15
tests/crashes/130310.rs
Normal file
@ -0,0 +1,15 @@
|
||||
//@ known-bug: rust-lang/rust#130310
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
#[repr(C)]
|
||||
struct A<T> {
|
||||
a: *const A<A<T>>,
|
||||
p: PhantomData<T>,
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
fn f(a: *const A<()>);
|
||||
}
|
||||
|
||||
fn main() {}
|
10
tests/crashes/130346.rs
Normal file
10
tests/crashes/130346.rs
Normal file
@ -0,0 +1,10 @@
|
||||
//@ known-bug: rust-lang/rust#130346
|
||||
|
||||
#![feature(non_lifetime_binders)]
|
||||
#![allow(unused)]
|
||||
|
||||
trait A<T>: Iterator<Item = T> {}
|
||||
|
||||
fn demo(x: &mut impl for<U> A<U>) {
|
||||
let _: Option<u32> = x.next(); // Removing this line stops the ICE
|
||||
}
|
9
tests/crashes/130372-1.rs
Normal file
9
tests/crashes/130372-1.rs
Normal file
@ -0,0 +1,9 @@
|
||||
//@ known-bug: rust-lang/rust#130372
|
||||
|
||||
pub fn variadic_fn(n: usize, mut args: ...) {}
|
||||
|
||||
reuse variadic_fn;
|
||||
|
||||
fn main() {
|
||||
variadic_fn();
|
||||
}
|
11
tests/crashes/130372-2.rs
Normal file
11
tests/crashes/130372-2.rs
Normal file
@ -0,0 +1,11 @@
|
||||
//@ known-bug: rust-lang/rust#130372
|
||||
|
||||
pub fn test_va_copy(_: u64, mut ap: ...) {}
|
||||
|
||||
pub fn main() {
|
||||
unsafe {
|
||||
test_va_copy();
|
||||
|
||||
call(x);
|
||||
}
|
||||
}
|
7
tests/crashes/130372-3.rs
Normal file
7
tests/crashes/130372-3.rs
Normal file
@ -0,0 +1,7 @@
|
||||
//@ known-bug: rust-lang/rust#130372
|
||||
|
||||
fn bar() -> impl Fn() {
|
||||
wrap()
|
||||
}
|
||||
|
||||
fn wrap(...: impl ...) -> impl Fn() {}
|
5
tests/crashes/130399.rs
Normal file
5
tests/crashes/130399.rs
Normal file
@ -0,0 +1,5 @@
|
||||
//@ known-bug: rust-lang/rust#130399
|
||||
|
||||
fn elided(main: &()) -> impl Sized + use<main> {}
|
||||
|
||||
fn main() {}
|
Loading…
Reference in New Issue
Block a user