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

Commit 5e5956a

Browse files
JohnTitorAlexendoo
authored andcommitted
Add more ICEs (#172)
1 parent be559d3 commit 5e5956a

File tree

5 files changed

+53
-0
lines changed

5 files changed

+53
-0
lines changed

ices/51173.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
macro_rules! bug {
2+
( $doc:expr ) => { #[doc = $doc] enum Bug {} }
3+
}
4+
5+
bug! { (stringify!(bug)) }
6+
7+
fn main() {}

ices/52334.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
type Foo = extern "C" fn(::std::ffi::CStr);
2+
extern "C" {
3+
fn meh(blah: Foo);
4+
}
5+
6+
fn main() {
7+
meh as usize;
8+
}

ices/59435.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#![feature(specialization)]
2+
3+
struct MyStruct {}
4+
5+
trait MyTrait {
6+
type MyType: Default;
7+
}
8+
9+
impl MyTrait for i32 {
10+
default type MyType = MyStruct;
11+
}
12+
13+
fn main() {
14+
let _x: <i32 as MyTrait>::MyType = <i32 as MyTrait>::MyType::default();
15+
}

ices/63154-2.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
trait Trait {
2+
type Assoc;
3+
}
4+
5+
impl Trait for () {
6+
type Assoc = ();
7+
}
8+
9+
fn unit() -> impl Into<<() as Trait>::Assoc> {}
10+
11+
pub fn ice() {
12+
Into::into(unit());
13+
}
14+
15+
fn main() {}

ices/65394.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const _: Vec<i32> = {
2+
let x = Vec::<i32>::new();
3+
let r = &mut x;
4+
let y = x;
5+
y
6+
};
7+
8+
fn main() {}

0 commit comments

Comments
 (0)