We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7d4d64d commit af337e8Copy full SHA for af337e8
src/test/ui/mir/auxiliary/issue_76375_aux.rs
@@ -0,0 +1,14 @@
1
+// edition:2018
2
+// compile-flags: -Z mir-opt-level=2 -Z unsound-mir-opts
3
+
4
+#[inline(always)]
5
+pub fn f(s: bool) -> String {
6
+ let a = "Hello world!".to_string();
7
+ let b = a;
8
+ let c = b;
9
+ if s {
10
+ c
11
+ } else {
12
+ String::new()
13
+ }
14
+}
src/test/ui/mir/issue-76375.rs
@@ -0,0 +1,15 @@
+// build-pass
+// compile-flags: -Z mir-opt-level=2 -L.
+// aux-build:issue_76375_aux.rs
+#![crate_type = "lib"]
+extern crate issue_76375_aux;
+pub async fn g() {
+ issue_76375_aux::f(true);
+ h().await;
15
+pub async fn h() {}
0 commit comments