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

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

Merged
merged 1 commit into from
Mar 2, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Mar 2, 2021

Issue: rust-lang/rust#78628

#!/bin/bash

rustc -Zunsound-mir-opts - << 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 fe6ef5d into master Mar 2, 2021
@Alexendoo Alexendoo deleted the autofix/ices/78628.sh branch March 2, 2021 12:33
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants