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

Commit 46b2db1

Browse files
authored
(Re-)add some ICEs (#686)
1 parent 646995d commit 46b2db1

File tree

6 files changed

+53
-2
lines changed

6 files changed

+53
-2
lines changed

fixed/78442.sh renamed to ices/78442.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
rustc -Z mir-opt-level=3 - << EOF
3+
rustc -Z inline-mir - << EOF
44
#![crate_type = "lib"]
55
66
// Error won't happen if "bar" is not generic
@@ -9,7 +9,7 @@ pub fn bar<P>(_baz: P) {
99
}
1010
1111
// Error won't happen if "iterate" hasn't impl Trait or has generics
12-
fn hide_foo() -> impl Fn() {
12+
fn hide_foo() -> impl Fn() {
1313
foo
1414
}
1515

ices/82470.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
trait MyTraitAsync {
2+
async fn async_fn() {
3+
|| {};
4+
}
5+
}
6+
7+
fn main() {}

ices/83117.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
rustc --crate-type=lib --crate-name=ice_test_lib - <<'EOF'
4+
#![no_std]
5+
#![feature(lang_items)]
6+
7+
#[lang = "start"] fn start(_: *const u8, _: isize, _: *const *const u8) -> isize {
8+
0
9+
}
10+
EOF
11+
12+
rustc -L. - <<'EOF'
13+
#![no_std]
14+
#![feature(lang_items)]
15+
16+
extern crate ice_test_lib;
17+
18+
use core::panic::PanicInfo;
19+
20+
fn main() {}
21+
22+
#[panic_handler]
23+
fn panic_handler(_: &PanicInfo) -> ! {
24+
loop {}
25+
}
26+
27+
#[lang = "eh_personality"] fn eh_personality() {}
28+
EOF

ices/83120.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main() {
2+
struct S<const N: usize>;
3+
S as *const ();
4+
}

ices/83176.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#![warn(disjoint_capture_drop_reorder)]
2+
3+
fn main() {
4+
if let a = "" {
5+
drop(|_: ()| drop(a));
6+
}
7+
}

ices/83182.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
use std::mem;
2+
struct MyStr(str);
3+
const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[&()]) };
4+
5+
fn main() {}

0 commit comments

Comments
 (0)