Skip to content

Commit 5533c96

Browse files
authored
Rollup merge of #131964 - matthiaskrgr:crashes2010, r=jieyouxu
add latest crash tests r? `@jieyouxu`
2 parents da8a115 + eca5359 commit 5533c96

File tree

8 files changed

+76
-0
lines changed

8 files changed

+76
-0
lines changed

tests/crashes/131637.rs

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//@ known-bug: #121637
2+
#![feature(non_lifetime_binders)]
3+
trait Trait<Type> {
4+
type Type;
5+
6+
fn method(&self) -> impl for<T> Trait<impl Trait<T>>;
7+
}

tests/crashes/131648.rs

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//@ known-bug: #131648
2+
#![feature(return_type_notation)]
3+
4+
trait IntFactory {
5+
fn stream(self) -> impl IntFactory<stream(..): Send>;
6+
}
7+
fn main() {}

tests/crashes/131668.rs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//@ known-bug: #131668
2+
3+
#![feature(generic_associated_types_extended)]
4+
trait B {
5+
type Y<const N: i16>;
6+
}
7+
8+
struct Erase<T: B>(T);
9+
10+
fn make_static() {
11+
Erase::<dyn for<'c> B<&'c ()>>(());
12+
}

tests/crashes/131758.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//@ known-bug: #131758
2+
#![feature(unboxed_closures)]
3+
trait Foo {}
4+
5+
impl<T: Fn<(i32,)>> Foo for T {}
6+
7+
fn baz<T: Foo>(_: T) {}
8+
9+
fn main() {
10+
baz(|x| ());
11+
}

tests/crashes/131762.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//@ known-bug: #131762
2+
// ignore-tidy-linelength
3+
4+
#![feature(generic_assert)]
5+
struct FloatWrapper(f64);
6+
7+
fn main() {
8+
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)))
9+
}

tests/crashes/131787.rs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//@ known-bug: #131787
2+
#[track_caller]
3+
static no_mangle: u32 = {
4+
unimplemented!();
5+
};

tests/crashes/131886.rs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//@ known-bug: #131886
2+
//@ compile-flags: -Zvalidate-mir --crate-type=lib
3+
#![feature(trait_upcasting, type_alias_impl_trait)]
4+
5+
type Tait = impl Sized;
6+
7+
trait Foo<'a>: Bar<'a, 'a, Tait> {}
8+
trait Bar<'a, 'b, T> {}
9+
10+
fn test_correct3<'a>(x: &dyn Foo<'a>, _: Tait) {
11+
let _ = x as &dyn Bar<'_, '_, ()>;
12+
}

tests/crashes/131915.rs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//@ known-bug: #131915
2+
3+
macro_rules! y {
4+
( $($matcher:tt)*) => {
5+
x
6+
};
7+
}
8+
9+
const _: A<
10+
{
11+
y! { test.tou8 }
12+
},
13+
>;

0 commit comments

Comments
 (0)