Skip to content

Commit c9c6c2e

Browse files
authored
Rollup merge of rust-lang#97752 - klensy:cg-typo, r=bjorn3
typo: `-Zcodegen-backend=llvm -Cpasses=list` should work now r? ```@bjorn3```
2 parents df86d04 + 2d2577c commit c9c6c2e

File tree

1 file changed

+1
-7
lines changed
  • compiler/rustc_driver/src

1 file changed

+1
-7
lines changed

compiler/rustc_driver/src/lib.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -1055,13 +1055,7 @@ pub fn handle_options(args: &[String]) -> Option<getopts::Matches> {
10551055
}
10561056

10571057
if cg_flags.iter().any(|x| *x == "passes=list") {
1058-
let backend_name = debug_flags.iter().find_map(|x| {
1059-
if x.starts_with("codegen-backend=") {
1060-
Some(&x["codegen-backends=".len()..])
1061-
} else {
1062-
None
1063-
}
1064-
});
1058+
let backend_name = debug_flags.iter().find_map(|x| x.strip_prefix("codegen-backend="));
10651059
get_codegen_backend(&None, backend_name).print_passes();
10661060
return None;
10671061
}

0 commit comments

Comments
 (0)