File tree Expand file tree Collapse file tree 5 files changed +20
-7
lines changed Expand file tree Collapse file tree 5 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,12 @@ impl Rustc {
6464 self
6565 }
6666
67+ /// Specify a specific optimization level.
68+ pub fn opt_level ( & mut self , option : & str ) -> & mut Self {
69+ self . cmd . arg ( format ! ( "-Copt-level={option}" ) ) ;
70+ self
71+ }
72+
6773 /// Specify type(s) of output files to generate.
6874 pub fn emit ( & mut self , kinds : & str ) -> & mut Self {
6975 self . cmd . arg ( format ! ( "--emit={kinds}" ) ) ;
Original file line number Diff line number Diff line change @@ -112,7 +112,6 @@ run-make/issue-37839/Makefile
112112run-make/issue-37893/Makefile
113113run-make/issue-38237/Makefile
114114run-make/issue-40535/Makefile
115- run-make/issue-46239/Makefile
116115run-make/issue-47384/Makefile
117116run-make/issue-47551/Makefile
118117run-make/issue-51671/Makefile
Load Diff This file was deleted.
File renamed without changes.
Original file line number Diff line number Diff line change 1+ // In the rustc_trans crate, references returned by a Frozen pointer type
2+ // could mark them as "noalias", which caused miscompilation errors.
3+ // This test runs the most minimal possible code that can reproduce this bug,
4+ // and checks that compilation remains successful.
5+ // See https://github.com/rust-lang/rust/issues/46239
6+
7+ //@ ignore-cross-compile
8+
9+ use run_make_support:: { run, rustc} ;
10+
11+ fn main ( ) {
12+ rustc ( ) . input ( "main.rs" ) . opt_level ( "1" ) . run ( ) ;
13+ run ( "main" ) ;
14+ }
You can’t perform that action at this time.
0 commit comments