diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-09-15 23:56:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-15 23:56:35 +0200 |
| commit | 0406f12af96841a66551b69197694927499c7925 (patch) | |
| tree | 27ecc4e03612f782916c49f36536db050de7a9ac | |
| parent | 62445f1ec8351caeef232155602b336283f7054a (diff) | |
| parent | 9d761eac40d9c3863cab896f4b2bf3241bb88aeb (diff) | |
| download | rust-0406f12af96841a66551b69197694927499c7925.tar.gz rust-0406f12af96841a66551b69197694927499c7925.zip | |
Rollup merge of #130409 - matthiaskrgr:ccccrashes, r=compiler-errors
tests: more ice tests r? `@jieyouxu`
| -rw-r--r-- | tests/crashes/129262.rs | 21 | ||||
| -rw-r--r-- | tests/crashes/129850.rs | 9 | ||||
| -rw-r--r-- | tests/crashes/130104.rs | 6 | ||||
| -rw-r--r-- | tests/crashes/130310.rs | 15 | ||||
| -rw-r--r-- | tests/crashes/130346.rs | 10 | ||||
| -rw-r--r-- | tests/crashes/130372-1.rs | 9 | ||||
| -rw-r--r-- | tests/crashes/130372-2.rs | 11 | ||||
| -rw-r--r-- | tests/crashes/130372-3.rs | 7 | ||||
| -rw-r--r-- | tests/crashes/130399.rs | 5 |
9 files changed, 93 insertions, 0 deletions
diff --git a/tests/crashes/129262.rs b/tests/crashes/129262.rs new file mode 100644 index 00000000000..c430af35988 --- /dev/null +++ b/tests/crashes/129262.rs @@ -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) {} +} diff --git a/tests/crashes/129850.rs b/tests/crashes/129850.rs new file mode 100644 index 00000000000..9c04805587a --- /dev/null +++ b/tests/crashes/129850.rs @@ -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 {} +} diff --git a/tests/crashes/130104.rs b/tests/crashes/130104.rs new file mode 100644 index 00000000000..0ffc21ad360 --- /dev/null +++ b/tests/crashes/130104.rs @@ -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() -> _>; +} diff --git a/tests/crashes/130310.rs b/tests/crashes/130310.rs new file mode 100644 index 00000000000..d59dd39983c --- /dev/null +++ b/tests/crashes/130310.rs @@ -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() {} diff --git a/tests/crashes/130346.rs b/tests/crashes/130346.rs new file mode 100644 index 00000000000..ee25f0fcc5b --- /dev/null +++ b/tests/crashes/130346.rs @@ -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 +} diff --git a/tests/crashes/130372-1.rs b/tests/crashes/130372-1.rs new file mode 100644 index 00000000000..5d58c14e7ab --- /dev/null +++ b/tests/crashes/130372-1.rs @@ -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(); +} diff --git a/tests/crashes/130372-2.rs b/tests/crashes/130372-2.rs new file mode 100644 index 00000000000..46404191e32 --- /dev/null +++ b/tests/crashes/130372-2.rs @@ -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); + } +} diff --git a/tests/crashes/130372-3.rs b/tests/crashes/130372-3.rs new file mode 100644 index 00000000000..6e1c57437c8 --- /dev/null +++ b/tests/crashes/130372-3.rs @@ -0,0 +1,7 @@ +//@ known-bug: rust-lang/rust#130372 + +fn bar() -> impl Fn() { + wrap() +} + +fn wrap(...: impl ...) -> impl Fn() {} diff --git a/tests/crashes/130399.rs b/tests/crashes/130399.rs new file mode 100644 index 00000000000..2248c8c0124 --- /dev/null +++ b/tests/crashes/130399.rs @@ -0,0 +1,5 @@ +//@ known-bug: rust-lang/rust#130399 + +fn elided(main: &()) -> impl Sized + use<main> {} + +fn main() {} |
