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 #478

Merged
merged 1 commit into from
Sep 29, 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 x.rs
rustc --edition=2018 -Zmir-opt-level=2 y.rs --extern x -L.
=== stdout ===
=== stderr ===
==============

=== stdout ===
=== stderr ===
==============
@JohnTitor JohnTitor merged commit 238aae1 into master Sep 29, 2020
@JohnTitor JohnTitor deleted the autofix/ices/76375.sh branch September 29, 2020 19:29
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