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

ices/72181.sh: fixed with no errors #403

Merged
merged 1 commit into from
Jun 22, 2020
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#72181

#!/bin/bash

cat > 72181.rs <<EOF
#![feature(never_type)]
#![allow(unused, invalid_value)]

enum Void {}

fn f(v: Void) -> ! {
    match v {} //~ ERROR entering unreachable code
}

fn main() {
    let v: Void = unsafe {
        std::mem::transmute::<(), Void>(())
    };
    f(v); //~ inside `main`
}

EOF

rustc -Zmir-opt-level=2 --emit=mir 72181.rs
=== stdout ===
=== stderr ===
/home/runner/work/glacier/glacier/ices/72181.sh: line 3: main: command not found
==============

=== stdout ===
=== stderr ===
/home/runner/work/glacier/glacier/ices/72181.sh: line 3: main: command not found
==============
@JohnTitor JohnTitor merged commit 0d7e8ae into master Jun 22, 2020
@JohnTitor JohnTitor deleted the autofix/ices/72181.sh branch June 22, 2020 11:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants