We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b391527 commit 1a6a3ecCopy full SHA for 1a6a3ec
src/tools/run-make-support/src/rustc.rs
@@ -64,6 +64,12 @@ impl Rustc {
64
self
65
}
66
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
+
73
/// Specify type(s) of output files to generate.
74
pub fn emit(&mut self, kinds: &str) -> &mut Self {
75
self.cmd.arg(format!("--emit={kinds}"));
tests/run-make/no-mark-noalias/rmake.rs
@@ -9,6 +9,6 @@
9
use run_make_support::{run, rustc};
10
11
fn main() {
12
- rustc().input("main.rs").opt-level("1").run();
+ rustc().input("main.rs").opt_level("1").run();
13
run("main");
14
0 commit comments