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

ices/78628.sh: fixed with no errors #1213

Merged
merged 1 commit into from
Apr 12, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#78628

#!/bin/bash

rustc -Zunsound-mir-opts -C opt-level=3 - << EOF
// run-pass

#![allow(dead_code)]

#[derive(Debug)]
enum MyEnum {
    Variant2,
    Variant3,
}

fn f(arg3: bool) -> MyStruct {
    match if arg3 { Some(MyEnum::Variant3) } else { None } {
        Some(t) => {
            let ah = t;
            return MyStruct(Some(ah));
        }
        _ => MyStruct(None)
    }
}

#[derive(Debug)]
struct MyStruct(Option<MyEnum>);

fn main() {
    f(true);
}
EOF
=== stdout ===
=== stderr ===
==============

=== stdout ===
=== stderr ===
==============
@Alexendoo Alexendoo merged commit 90719cd into master Apr 12, 2022
@Alexendoo Alexendoo deleted the autofix/ices/78628.sh branch April 12, 2022 20:59
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