Skip to content

Commit bda2c67

Browse files
Auto merge of #147857 - matthiaskrgr:crash_tests_oct_18, r=<try>
crashes: more tests try-job: aarch64-apple try-job: x86_64-msvc-1 try-job: x86_64-gnu try-job: dist-i586-gnu-i586-i686-musl try-job: test-various
2 parents c6efb90 + 08138c1 commit bda2c67

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+703
-0
lines changed

‎tests/crashes/141293.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#141293
2+
#![feature(unsafe_binders)]
3+
type X = unsafe<T> ();
4+
5+
type Y = unsafe<const N: i32> ();
6+
7+
pub fn main() {}

‎tests/crashes/141380.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#141380
2+
trait Trait<T> {}
3+
type Alias<P: Trait> = impl Trait<U>;
4+
5+
pub enum UninhabitedVariants {
6+
Tuple(Alias),
7+
}
8+
9+
fn uwu(x: UninhabitedVariants) {
10+
match x {}
11+
}

‎tests/crashes/141850.rs‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//@ known-bug: rust-lang/rust#141850
2+
//@edition: 2024
3+
//@ compile-flags: -Copt-level=0
4+
#![feature(pin_ergonomics)]
5+
async fn a() {
6+
wrapper_call(handler).await;
7+
}
8+
async fn wrapper_call<F>(_: F) -> F::Output
9+
where
10+
F: Handler,
11+
{
12+
todo!()
13+
}
14+
async fn handler();
15+
trait Handler {
16+
type Output;
17+
}
18+
impl<Func, Fut> Handler for Func
19+
where
20+
Func: Fn() -> Fut,
21+
Fut: Future,
22+
{
23+
type Output = Fut;
24+
}

‎tests/crashes/141911.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#141911
2+
trait MyTrait {
3+
fn virtualize(&self);
4+
}
5+
struct VirtualWrapper<T>(T, T);
6+
7+
impl<T: 'static> MyTrait for T {
8+
fn virtualize(&self) {
9+
const { std::ptr::null::<VirtualWrapper<T>>() as *const dyn MyTrait };
10+
}
11+
}
12+
13+
fn main() {
14+
0u8.virtualize();
15+
}

‎tests/crashes/141916.rs‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//@ known-bug: rust-lang/rust#141916
2+
//@ edition: 2024
3+
#![allow(incomplete_features)]
4+
#![feature(ergonomic_clones)]
5+
6+
use std::clone::UseCloned;
7+
8+
#[derive(Clone)]
9+
struct Foo;
10+
11+
impl UseCloned for Foo {}
12+
13+
fn do_not_move_test(x: Foo) -> Foo { async {
14+
let s = x.use;
15+
x
16+
} }
17+
18+
fn main() {}

‎tests/crashes/142155.rs‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//@ known-bug: rust-lang/rust#142155
2+
//@ needs-rustc-debug-assertions
3+
//@ edition:2021
4+
5+
#![warn(tail_expr_drop_order)]
6+
use core::future::Future;
7+
use core::pin::Pin;
8+
9+
fn wrapped_fn<'a>() -> Pin<Box<(dyn Future<Output = Result<Box<()>, String>> + Send + 'static)>> {
10+
Box::pin(async { Err("nope".into()) })
11+
}
12+
13+
pub fn main() {}

‎tests/crashes/142209.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#142209
2+
#![feature(generic_const_exprs)]
3+
4+
struct Bar<const X: usize>;
5+
const FRAC_LHS: usize = 0;
6+
7+
trait Foo<const N: usize> {}
8+
9+
impl<const N: usize = { const { 3 } }> PartialEq<dyn Foo<FRAC_LHS>> for Bar<KABOOM> {}
10+
11+
pub fn main() {}

‎tests/crashes/142229.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#142229
2+
#![feature(super_let)]
3+
4+
const _: *const i32 = {
5+
super let x = 1;
6+
&raw const x
7+
};

‎tests/crashes/142382.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#142382
2+
3+
#![feature(generic_const_parameter_types)]
4+
#![feature(adt_const_params)]
5+
#![feature(unsized_const_params)]
6+
7+
struct Bar<'a, const N: &'a u32>;
8+
fn foo(&self) -> Bar<0> { todo!(); }
9+
10+
pub fn main() {}

‎tests/crashes/142529.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//@ known-bug: rust-lang/rust#142529
2+
#![feature(min_generic_const_args)]
3+
struct Foo<T, U = [u8; size_of::<T>]>(T, U);
4+
fn main() {}

0 commit comments

Comments
 (0)