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

(Re-)add some ICEs #686

Merged
merged 2 commits into from
Mar 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fixed/78442.sh → ices/78442.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

rustc -Z mir-opt-level=3 - << EOF
rustc -Z inline-mir - << EOF
#![crate_type = "lib"]

// Error won't happen if "bar" is not generic
Expand All @@ -9,7 +9,7 @@ pub fn bar<P>(_baz: P) {
}

// Error won't happen if "iterate" hasn't impl Trait or has generics
fn hide_foo() -> impl Fn() {
fn hide_foo() -> impl Fn() {
foo
}

Expand Down
7 changes: 7 additions & 0 deletions ices/82470.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
trait MyTraitAsync {
async fn async_fn() {
|| {};
}
}

fn main() {}
28 changes: 28 additions & 0 deletions ices/83117.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

rustc --crate-type=lib --crate-name=ice_test_lib - <<'EOF'
#![no_std]
#![feature(lang_items)]

#[lang = "start"] fn start(_: *const u8, _: isize, _: *const *const u8) -> isize {
0
}
EOF

rustc -L. - <<'EOF'
#![no_std]
#![feature(lang_items)]

extern crate ice_test_lib;

use core::panic::PanicInfo;

fn main() {}

#[panic_handler]
fn panic_handler(_: &PanicInfo) -> ! {
loop {}
}

#[lang = "eh_personality"] fn eh_personality() {}
EOF
4 changes: 4 additions & 0 deletions ices/83120.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fn main() {
struct S<const N: usize>;
S as *const ();
}
7 changes: 7 additions & 0 deletions ices/83176.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#![warn(disjoint_capture_drop_reorder)]

fn main() {
if let a = "" {
drop(|_: ()| drop(a));
}
}
5 changes: 5 additions & 0 deletions ices/83182.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
use std::mem;
struct MyStr(str);
const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[&()]) };

fn main() {}