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

ices/76375.sh: fixed with no errors #509

Merged
merged 1 commit into from
Oct 19, 2020
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#76375

#!/bin/bash

cat > x.rs <<EOF
#![crate_type = "lib"]

#[inline(always)]
pub fn f(s: bool) -> String {
    let a = "Hello world!".to_string();
    let b = a;
    let c = b;
    if s {
        c
    } else {
        String::new()
    }
}

EOF

cat > y.rs <<EOF
#![crate_type = "lib"]

pub async fn g() {
    x::f(true);
    h().await;
}

pub async fn h() {}

EOF

rustc --edition=2018 -Zmir-opt-level=2 -Zunsound-mir-opts x.rs
rustc --edition=2018 -Zmir-opt-level=2 y.rs --extern x -L.
=== stdout ===
=== stderr ===
==============

=== stdout ===
=== stderr ===
==============
@JohnTitor JohnTitor merged commit 3af03a1 into master Oct 19, 2020
@JohnTitor JohnTitor deleted the autofix/ices/76375.sh branch October 19, 2020 12:31
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