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

Commit 3171e82

Browse files
authored
Merge pull request #480 from fanninpm/add-ices-2020-09-26
Add some ICEs
2 parents 560619c + 8c4ec7a commit 3171e82

File tree

5 files changed

+37
-0
lines changed

5 files changed

+37
-0
lines changed

ices/77179.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#![feature(type_alias_impl_trait)]
2+
3+
type Pointer<T> = impl std::ops::Deref<Target=T>;
4+
5+
fn test() -> Pointer<_> {
6+
Box::new(1)
7+
}
8+
9+
fn main() {
10+
test();
11+
}

ices/77218.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
pub struct Cache {
2+
data: Vec<i32>,
3+
}
4+
5+
pub fn list_data(cache: &Cache, key: usize) {
6+
for reference in vec![1, 2, 3] {
7+
if /*let*/ Some(reference) = cache.data.get(key) {
8+
unimplemented!()
9+
}
10+
}
11+
}

ices/77320.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const FOO: isize = 10;
2+
const ZST: &() = std::mem::transmute(FOO);
3+
fn main() {
4+
match &() {
5+
ZST => 9,
6+
};
7+
}

ices/77329.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn bug<T>() -> impl Iterator<Item = [(); { |x: [u8]| { x } }]> {
2+
std::iter::empty()
3+
}

ices/77357.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
trait MyTrait<T> {}
2+
3+
fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
4+
todo!()
5+
}

0 commit comments

Comments
 (0)