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

Commit f21ef10

Browse files
fanninpmJohnTitor
andauthored
Add some ICEs (#857)
Co-authored-by: Yuki Okushi <yuki.okushi@huawei.com>
1 parent 1ae9665 commit f21ef10

11 files changed

+2768
-0
lines changed

ices/86528.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
rustc -Z print-type-sizes --crate-type lib - <<'EOF'
4+
use std::str::FromStr;
5+
6+
pub fn foo() {
7+
f64::from_str("");
8+
}
9+
EOF

ices/86535.rs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#![feature(box_syntax)]
2+
fn main() {
3+
let _: Box<[isize]> = box { loop {} };
4+
}

ices/86642.rs

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#![feature(impl_trait_in_bindings)]
2+
#![allow(incomplete_features)]
3+
4+
macro_rules! seq {
5+
($( $x:expr ),*) => {
6+
move |source| {
7+
$(
8+
let source = $x(source)?;
9+
)*
10+
Ok(source)
11+
}
12+
};
13+
}
14+
15+
macro_rules! alt {
16+
($first:expr, $( $rest:expr ),*) => {
17+
move |source| {
18+
let res = $first(source);
19+
$(
20+
let res = res.or($rest(source));
21+
)*
22+
res
23+
}
24+
};
25+
}
26+
27+
static x: impl Fn(&str) -> Result<&str, ()> = alt!(seq!(), seq!());

ices/86703.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
rustc -C link-dead-code - <<'EOF'
4+
trait Yokeable<'a> {
5+
type Output: 'a;
6+
}
7+
8+
fn project(_: for<'a> fn(<() as Yokeable<'a>>::Output)) {}
9+
10+
impl<'a> Yokeable<'a> for () {
11+
type Output = ();
12+
}
13+
14+
fn crash() {
15+
project(|_| {});
16+
}
17+
18+
fn main() {}
19+
EOF

ices/86719.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
trait Bar {
2+
type E;
3+
}
4+
impl<S> Bar for S {
5+
type E = impl ;
6+
fn foo() -> Self::E {
7+
|_| true
8+
}
9+
}

ices/86720.rs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#![crate_type = "staticlib"]
2+
#![feature(core_intrinsics)]
3+
use std::intrinsics::rustc_peek;
4+
#[no_mangle]
5+
fn foo() -> i32 {
6+
let x = 0;
7+
rustc_peek(x)
8+
}

ices/86756.rs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
trait Foo<T, T = T> {}
2+
fn eq<A, B>() {
3+
eq::<dyn, Foo>
4+
}

0 commit comments

Comments
 (0)