From 2d2577cdec6121e57facd55a6355ed8bf0c2c9b1 Mon Sep 17 00:00:00 2001 From: klensy Date: Sun, 5 Jun 2022 07:02:32 +0300 Subject: [PATCH] typo: `-Zcodegen-backend=llvm -Cpasses=list` should work now --- compiler/rustc_driver/src/lib.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index 179a184536efa..1a7972716d3df 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -1055,13 +1055,7 @@ pub fn handle_options(args: &[String]) -> Option { } if cg_flags.iter().any(|x| *x == "passes=list") { - 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_passes(); return None; }