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

Commit e3a21e1

Browse files
authored
Merge pull request #281 from JohnTitor/add-ices
Add four ICEs
2 parents 09b5788 + 35534c6 commit e3a21e1

File tree

5 files changed

+52
-0
lines changed

5 files changed

+52
-0
lines changed
File renamed without changes.

ices/68841.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
rustc -Z mir-opt-level=2 --edition 2018 - << END
4+
#![feature(async_closure)]
5+
6+
use std::future::Future;
7+
8+
fn async_closure() -> impl Future<Output = u8> {
9+
(async move || -> u8 {
10+
42
11+
})()
12+
}
13+
14+
fn main() {
15+
let _fut = async_closure();
16+
}
17+
18+
END

ices/68868.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#![feature(const_generics)]
2+
3+
pub trait Foo<T, const X: usize> {
4+
fn foo(&self);
5+
}
6+
7+
pub trait Bar<T, const X: usize> {
8+
fn bar(&self);
9+
}
10+
11+
impl<const X: usize> Bar<u32, X> for u32
12+
where
13+
u8: Foo<X, u16>,
14+
//u8: Foo<u32, X>,
15+
//u8: Foo<{ X }, u16>,
16+
{
17+
fn bar(&self) {
18+
0u8.foo();
19+
}
20+
}
21+
22+
fn main() {}

ices/68875.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
struct DataWrapper<'a> {
2+
data: &'a [u8; Self::SIZE],
3+
}
4+
5+
impl DataWrapper<'_> {
6+
const SIZE: usize = 14;
7+
}
8+
9+
fn main() {}

ices/68890.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
enum e{A((?'a a+?+l))}
2+
3+
fn main() {}

0 commit comments

Comments
 (0)