Skip to content

Commit 6166b61

Browse files
committed
Add crashes mGCA tests
1 parent c8271c1 commit 6166b61

12 files changed

+59
-127
lines changed

tests/crashes/138226-2.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//@ known-bug: #138226
2+
//@ needs-rustc-debug-assertions
3+
#![feature(min_generic_const_args)]
4+
#![feature(inherent_associated_types)]
5+
struct Bar<const N: usize>;
6+
impl<const N: usize> Bar<N> {
7+
#[type_const]
8+
const LEN: usize = 4;
9+
10+
fn bar() {
11+
let _ = [0; Self::LEN];
12+
}
13+
}

tests/crashes/138226.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//@ known-bug: #138226
2+
//@ needs-rustc-debug-assertions
3+
#![feature(min_generic_const_args)]
4+
#![feature(inherent_associated_types)]
5+
struct Foo<A, B>(A, B);
6+
impl<A, B> Foo<A, B> {
7+
#[type_const]
8+
const LEN: usize = 4;
9+
10+
fn foo() {
11+
let _ = [5; Self::LEN];
12+
}
13+
}

tests/crashes/149809.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//@ known-bug: #149809
2+
#![feature(min_generic_const_args)]
3+
#![feature(inherent_associated_types)]
4+
struct Qux<'a> {
5+
x: &'a (),
6+
}
7+
impl<'a> Qux<'a> {
8+
#[type_const]
9+
const LEN: usize = 4;
10+
fn foo(_: [u8; Qux::LEN]) {}
11+
}
12+
13+
fn main() {}

tests/crashes/150960.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//@ known-bug: #150960
2+
#![feature(min_generic_const_args)]
3+
struct Baz;
4+
impl Baz {
5+
#[type_const]
6+
const LEN: usize = 4;
7+
8+
fn baz() {
9+
let _ = [0; const { Self::LEN }];
10+
}
11+
}

tests/ui/const-generics/mgca/cast-with-type-mismatched.rs

Lines changed: 0 additions & 14 deletions
This file was deleted.

tests/ui/const-generics/mgca/cast-with-type-mismatched.stderr

Lines changed: 0 additions & 20 deletions
This file was deleted.

tests/ui/const-generics/mgca/const-eval-with-invalid-args.rs

Lines changed: 0 additions & 26 deletions
This file was deleted.

tests/ui/const-generics/mgca/const-eval-with-invalid-args.stderr

Lines changed: 0 additions & 32 deletions
This file was deleted.

tests/ui/const-generics/mgca/recursive-self-referencing-const-param.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/ui/const-generics/mgca/recursive-self-referencing-const-param.stderr

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)