File tree 3 files changed +15
-8
lines changed
3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -240,7 +240,6 @@ run-make/unknown-mod-stdin/Makefile
240
240
run-make/unstable-flag-required/Makefile
241
241
run-make/use-suggestions-rust-2018/Makefile
242
242
run-make/used-cdylib-macos/Makefile
243
- run-make/used/Makefile
244
243
run-make/volatile-intrinsics/Makefile
245
244
run-make/wasm-exceptions-nostd/Makefile
246
245
run-make/wasm-override-linker/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // This test ensures that the compiler is keeping static variables, even if not referenced
2
+ // by another part of the program, in the output object file.
3
+ //
4
+ // It comes from #39987 which implements this RFC for the #[used] attribute:
5
+ // https://rust-lang.github.io/rfcs/2386-used.html
6
+
7
+ //@ ignore-msvc
8
+
9
+ use run_make_support:: { cmd, rustc} ;
10
+
11
+ fn main ( ) {
12
+ rustc ( ) . opt_level ( "3" ) . emit ( "obj" ) . input ( "used.rs" ) . run ( ) ;
13
+
14
+ cmd ( "nm" ) . arg ( "used.o" ) . run ( ) . assert_stdout_contains ( "FOO" ) ;
15
+ }
You can’t perform that action at this time.
0 commit comments