Skip to content

Commit 54fe2a8

Browse files
committed
implement suggestion
1 parent 871f89d commit 54fe2a8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/codegen/noalias-freeze.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66
// and checks that noalias does not appear.
77
// See https://github.com/rust-lang/rust/issues/46239
88

9+
#![crate_type = "lib"]
10+
911
fn project<T>(x: &(T,)) -> &T { &x.0 }
1012

1113
fn dummy() {}
1214

15+
// CHECK-LABEL: @foo(
1316
// CHECK-NOT: noalias
14-
fn main() {
17+
#[no_mangle]
18+
pub fn foo() {
1519
let f = (dummy as fn(),);
1620
(*project(&f))();
17-
}
21+
}

0 commit comments

Comments
 (0)