Skip to content

Commit 5791a05

Browse files
committed
Auto merge of #161294 - cyrgani:tests-6, r=<try>
add crashtests [6/N] try-job: x86_64-msvc-1
2 parents 9a4ad59 + f7d576c commit 5791a05

13 files changed

Lines changed: 104 additions & 1 deletion

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ known-bug: #108428
1+
//@ known-bug: #108248
22
//@ needs-rustc-debug-assertions
33
//@ compile-flags: -Wunused-lifetimes
44
fn main() {

tests/crashes/138262.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//@ known-bug: #138262
2+
//@ compile-flags: -Zsanitizer=cfi -Ccodegen-units=1 -Clto -Clink-dead-code=true -Cunsafe-allow-abi-mismatch=sanitizer
3+
//@ ignore-backends: gcc
4+
//@ needs-sanitizer-cfi
5+
fn foo<const N: usize>() {}
6+
7+
core::arch::global_asm!("/* {} */", sym foo::<{
8+
|| {};
9+
0
10+
}>);
11+
12+
fn main() {}

tests/crashes/142155.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//@ known-bug: #142155
2+
//@ needs-rustc-debug-assertions
3+
//@ edition: 2021
4+
5+
#![warn(tail_expr_drop_order)]
6+
use core::future::Future;
7+
8+
fn f() -> impl Future<Output = Option<String>> {
9+
async { Some("nope".into()) }
10+
}
11+
12+
fn main() {}

tests/crashes/144241.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//@ known-bug: #144241
2+
fn main() {
3+
|_: dyn ?Sized + !Send| {}
4+
}

tests/crashes/149562.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//@ known-bug: #149562
2+
//@ needs-rustc-debug-assertions
3+
fn a<T>() -> T
4+
where
5+
T: ?Sized,
6+
T: ?Sized,
7+
{
8+
}
9+
10+
fn main() {}

tests/crashes/152414.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//@ known-bug: #152414
2+
//@ needs-rustc-debug-assertions
3+
#![feature(generic_assert)]
4+
fn main() {
5+
assert!(size_of(val, 1) >= 1);
6+
}

tests/crashes/152416.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//@ known-bug: #152416
2+
//@ needs-rustc-debug-assertions
3+
//@ compile-flags: -Zunstable-options
4+
5+
trait AssetID {}
6+
trait Archive<X> {
7+
fn name(&self);
8+
}
9+
struct NorthlightAssetID;
10+
impl AssetID for NorthlightAssetID {}
11+
fn get() -> Box<dyn Archive<impl AssetID>> {
12+
let x: Box<dyn Archive<NorthlightAssetID>> = todo!();
13+
x
14+
}
15+
fn main() {
16+
get().name();
17+
}

tests/crashes/152626.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//@ known-bug: #152626
2+
//@ needs-rustc-debug-assertions
3+
struct A<T: Into<u32>>(T);
4+
fn f() -> A<&'static ()> {
5+
todo!()
6+
}
7+
fn main() {}

tests/crashes/154903.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//@ known-bug: #154903
2+
//@ compile-flags: -Zlint-mir
3+
#![feature(guard_patterns)]
4+
5+
fn a(((x if true, _) | (_, x)): (i32, i32)) {}
6+
7+
fn main() {}

tests/crashes/154963.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//@ known-bug: #154963
2+
#![feature(extern_types, negative_impls)]
3+
4+
unsafe extern "C" {
5+
type ExternType;
6+
}
7+
8+
impl !Unpin for ExternType {}
9+
10+
fn main() {}

0 commit comments

Comments
 (0)