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`
This commit is contained in:
Yuki Okushi 2021-07-30 16:26:54 +09:00 committed by GitHub
commit 7e4b1737ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();
}
}