diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-07-30 16:26:54 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-30 16:26:54 +0900 |
| commit | 7e4b1737ff3c054fb8a9893515ced938b5fe24ba (patch) | |
| tree | 945e323ba50f5366b747641f9e3f195ff4ea1269 | |
| parent | fd79e7740b8951b51a999dac6d0073b34085e1a4 (diff) | |
| parent | 2f6662da85d47ebf89432c910a496812e9e2db12 (diff) | |
| download | rust-7e4b1737ff3c054fb8a9893515ced938b5fe24ba.tar.gz rust-7e4b1737ff3c054fb8a9893515ced938b5fe24ba.zip | |
Rollup merge of #87553 - bjorn3:fix_hotplug_codegen_version, r=wesleywiser
Fix typo in rustc_driver::version This caused rustc `-Zcodegen-backend=foo.so -vV` to look for `oo.so` instead of `foo.so`
| -rw-r--r-- | compiler/rustc_driver/src/lib.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index 326fefa59ab..84dd69ebd96 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -764,13 +764,7 @@ pub fn version(binary: &str, matches: &getopts::Matches) { println!("release: {}", unw(util::release_str())); let debug_flags = matches.opt_strs("Z"); - let backend_name = debug_flags.iter().find_map(|x| { - if x.starts_with("codegen-backend=") { - Some(&x["codegen-backends=".len()..]) - } else { - None - } - }); + let backend_name = debug_flags.iter().find_map(|x| x.strip_prefix("codegen-backend=")); get_codegen_backend(&None, backend_name).print_version(); } } |
