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

Commit 9e3a098

Browse files
authored
Merge pull request #323 from JohnTitor/ices
Add 5 ICEs
2 parents 2aaa5e3 + c82757b commit 9e3a098

File tree

5 files changed

+56
-0
lines changed

5 files changed

+56
-0
lines changed

ices/70507.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#![feature(const_generics)]
2+
3+
struct R;
4+
impl R {
5+
fn method<const N: u8>(&self) {}
6+
}
7+
8+
fn main() {
9+
R.method::<1u8>();
10+
}

ices/70586.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#![feature(const_generics)]
2+
3+
struct T;
4+
impl T {
5+
fn new_s<const N: u8>() -> S<N> { S }
6+
}
7+
8+
struct S<const N: u8>;
9+
impl<const N: u8> S<N> {
10+
fn method(&self) {}
11+
}
12+
13+
fn main() {
14+
T::new_s::<1u8>().method();
15+
}

ices/70596.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#![feature(llvm_asm)]
2+
extern "C" fn foo() {}
3+
4+
fn main() {
5+
unsafe {
6+
llvm_asm!("mov x0, $0"
7+
:: "r"(foo)
8+
:: "volatile");
9+
}
10+
}

ices/70624.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
macro_rules! breakme {
2+
($config:stmt; $($tokens:literal)*) => {
3+
#[cfg($config)]
4+
$($tokens)*
5+
};
6+
}
7+
8+
fn main() {
9+
macro_rules! unix {
10+
() => {
11+
not(unix)
12+
};
13+
}
14+
15+
breakme!(unix!(); "test");
16+
}

ices/70723.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#![feature(const_loop)]
2+
3+
static _X: () = loop {};
4+
5+
fn main() {}

0 commit comments

Comments
 (0)