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

Add 5 ICEs #323

Merged
merged 1 commit into from
Apr 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ices/70507.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#![feature(const_generics)]

struct R;
impl R {
fn method<const N: u8>(&self) {}
}

fn main() {
R.method::<1u8>();
}
15 changes: 15 additions & 0 deletions ices/70586.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#![feature(const_generics)]

struct T;
impl T {
fn new_s<const N: u8>() -> S<N> { S }
}

struct S<const N: u8>;
impl<const N: u8> S<N> {
fn method(&self) {}
}

fn main() {
T::new_s::<1u8>().method();
}
10 changes: 10 additions & 0 deletions ices/70596.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#![feature(llvm_asm)]
extern "C" fn foo() {}

fn main() {
unsafe {
llvm_asm!("mov x0, $0"
:: "r"(foo)
:: "volatile");
}
}
16 changes: 16 additions & 0 deletions ices/70624.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
macro_rules! breakme {
($config:stmt; $($tokens:literal)*) => {
#[cfg($config)]
$($tokens)*
};
}

fn main() {
macro_rules! unix {
() => {
not(unix)
};
}

breakme!(unix!(); "test");
}
5 changes: 5 additions & 0 deletions ices/70723.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#![feature(const_loop)]

static _X: () = loop {};

fn main() {}