diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-10-20 10:05:39 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2024-10-20 10:05:39 +0200 |
| commit | eca5359b832f073e16616fce0080701e7e65d1e0 (patch) | |
| tree | 9bc167a4170605d007ae6588a5bb30c795cc5c2c | |
| parent | d68c32779627fcd72a928c9e89f65094dbcf7482 (diff) | |
| download | rust-eca5359b832f073e16616fce0080701e7e65d1e0.tar.gz rust-eca5359b832f073e16616fce0080701e7e65d1e0.zip | |
add latest crash tests
| -rw-r--r-- | tests/crashes/131637.rs | 7 | ||||
| -rw-r--r-- | tests/crashes/131648.rs | 7 | ||||
| -rw-r--r-- | tests/crashes/131668.rs | 12 | ||||
| -rw-r--r-- | tests/crashes/131758.rs | 11 | ||||
| -rw-r--r-- | tests/crashes/131762.rs | 9 | ||||
| -rw-r--r-- | tests/crashes/131787.rs | 5 | ||||
| -rw-r--r-- | tests/crashes/131886.rs | 12 | ||||
| -rw-r--r-- | tests/crashes/131915.rs | 13 |
8 files changed, 76 insertions, 0 deletions
diff --git a/tests/crashes/131637.rs b/tests/crashes/131637.rs new file mode 100644 index 00000000000..7d328384a74 --- /dev/null +++ b/tests/crashes/131637.rs @@ -0,0 +1,7 @@ +//@ known-bug: #121637 +#![feature(non_lifetime_binders)] +trait Trait<Type> { + type Type; + + fn method(&self) -> impl for<T> Trait<impl Trait<T>>; +} diff --git a/tests/crashes/131648.rs b/tests/crashes/131648.rs new file mode 100644 index 00000000000..68046ce2a1f --- /dev/null +++ b/tests/crashes/131648.rs @@ -0,0 +1,7 @@ +//@ known-bug: #131648 +#![feature(return_type_notation)] + +trait IntFactory { + fn stream(self) -> impl IntFactory<stream(..): Send>; +} +fn main() {} diff --git a/tests/crashes/131668.rs b/tests/crashes/131668.rs new file mode 100644 index 00000000000..90aa4494425 --- /dev/null +++ b/tests/crashes/131668.rs @@ -0,0 +1,12 @@ +//@ known-bug: #131668 + +#![feature(generic_associated_types_extended)] +trait B { + type Y<const N: i16>; +} + +struct Erase<T: B>(T); + +fn make_static() { + Erase::<dyn for<'c> B<&'c ()>>(()); +} diff --git a/tests/crashes/131758.rs b/tests/crashes/131758.rs new file mode 100644 index 00000000000..942c5fd7a50 --- /dev/null +++ b/tests/crashes/131758.rs @@ -0,0 +1,11 @@ +//@ known-bug: #131758 +#![feature(unboxed_closures)] +trait Foo {} + +impl<T: Fn<(i32,)>> Foo for T {} + +fn baz<T: Foo>(_: T) {} + +fn main() { + baz(|x| ()); +} diff --git a/tests/crashes/131762.rs b/tests/crashes/131762.rs new file mode 100644 index 00000000000..85cb9c8f20a --- /dev/null +++ b/tests/crashes/131762.rs @@ -0,0 +1,9 @@ +//@ known-bug: #131762 +// ignore-tidy-linelength + +#![feature(generic_assert)] +struct FloatWrapper(f64); + +fn main() { + assert!((0.0 / 0.0 >= 0.0) == (FloatWrapper(0.0 / 0.0) >= FloatWrapper(size_of::<u8>, size_of::<u16>, size_of::<usize> as fn() -> usize))) +} diff --git a/tests/crashes/131787.rs b/tests/crashes/131787.rs new file mode 100644 index 00000000000..5c24ff8c143 --- /dev/null +++ b/tests/crashes/131787.rs @@ -0,0 +1,5 @@ +//@ known-bug: #131787 +#[track_caller] +static no_mangle: u32 = { + unimplemented!(); +}; diff --git a/tests/crashes/131886.rs b/tests/crashes/131886.rs new file mode 100644 index 00000000000..c31c2d6aa8b --- /dev/null +++ b/tests/crashes/131886.rs @@ -0,0 +1,12 @@ +//@ known-bug: #131886 +//@ compile-flags: -Zvalidate-mir --crate-type=lib +#![feature(trait_upcasting, type_alias_impl_trait)] + +type Tait = impl Sized; + +trait Foo<'a>: Bar<'a, 'a, Tait> {} +trait Bar<'a, 'b, T> {} + +fn test_correct3<'a>(x: &dyn Foo<'a>, _: Tait) { + let _ = x as &dyn Bar<'_, '_, ()>; +} diff --git a/tests/crashes/131915.rs b/tests/crashes/131915.rs new file mode 100644 index 00000000000..58d45adcb3b --- /dev/null +++ b/tests/crashes/131915.rs @@ -0,0 +1,13 @@ +//@ known-bug: #131915 + +macro_rules! y { + ( $($matcher:tt)*) => { + x + }; +} + +const _: A< + { + y! { test.tou8 } + }, +>; |
