Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Commit d87f286

Browse files
authored
Add some ICEs (#678)
1 parent 7cd61b5 commit d87f286

File tree

5 files changed

+47
-0
lines changed

5 files changed

+47
-0
lines changed

ices/79847.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
rustc -Cincremental=foo - <<'EOF'
4+
#[derive(PartialEq, Eq)]
5+
pub struct StaticString {
6+
string: &'static str,
7+
}
8+
9+
const DUMMY1: StaticString = StaticString {
10+
string: "DUMMY",
11+
};
12+
const DUMMY2: StaticString = StaticString {
13+
string: "DUMMY",
14+
};
15+
16+
fn main() {
17+
let bar = DUMMY1;
18+
let name = match bar {
19+
DUMMY1 => "1",
20+
DUMMY2 => "2",
21+
_ => "Foo",
22+
};
23+
}
24+
EOF

ices/82518.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#![crate_type = "lib"]
2+
#![feature(inline_const)]
3+
4+
fn foo<const V: usize>() {
5+
match 0 {
6+
const { V } => {},
7+
_ => {},
8+
}
9+
}

ices/82610.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn f<const N:usize>() {
2+
mut N
3+
}

ices/82772.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
let Box { 1: _, .. }: Box<()>;
3+
}

ices/82792.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#![crate_type = "lib"]
2+
#![feature(const_generics_defaults)]
3+
4+
#[repr(C)]
5+
pub struct Loaf<T: Sized, const N: usize = 1usize> {
6+
head: [T; N],
7+
slice: [T],
8+
}

0 commit comments

Comments
 (0)