@@ -797,7 +797,7 @@ impl<'a> Builder<'a> {
797797 if cmd == "doc" || cmd == "rustdoc" {
798798 let my_out = match mode {
799799 // This is the intended out directory for compiler documentation.
800- Mode :: Rustc | Mode :: ToolRustc | Mode :: Codegen => self . compiler_doc_out ( target) ,
800+ Mode :: Rustc | Mode :: ToolRustc => self . compiler_doc_out ( target) ,
801801 Mode :: Std => out_dir. join ( target. triple ) . join ( "doc" ) ,
802802 _ => panic ! ( "doc mode {:?} not expected" , mode) ,
803803 } ;
@@ -875,7 +875,7 @@ impl<'a> Builder<'a> {
875875
876876 match mode {
877877 Mode :: Std | Mode :: ToolBootstrap | Mode :: ToolStd => { }
878- Mode :: Rustc | Mode :: Codegen | Mode :: ToolRustc => {
878+ Mode :: Rustc | Mode :: ToolRustc => {
879879 // Build proc macros both for the host and the target
880880 if target != compiler. host && cmd != "check" {
881881 cargo. arg ( "-Zdual-proc-macros" ) ;
@@ -1060,7 +1060,7 @@ impl<'a> Builder<'a> {
10601060 }
10611061
10621062 let debuginfo_level = match mode {
1063- Mode :: Rustc | Mode :: Codegen => self . config . rust_debuginfo_level_rustc ,
1063+ Mode :: Rustc => self . config . rust_debuginfo_level_rustc ,
10641064 Mode :: Std => self . config . rust_debuginfo_level_std ,
10651065 Mode :: ToolBootstrap | Mode :: ToolStd | Mode :: ToolRustc => {
10661066 self . config . rust_debuginfo_level_tools
@@ -1197,7 +1197,7 @@ impl<'a> Builder<'a> {
11971197 rustdocflags. arg ( "-Winvalid_codeblock_attributes" ) ;
11981198 }
11991199
1200- if let Mode :: Rustc | Mode :: Codegen = mode {
1200+ if mode == Mode :: Rustc {
12011201 rustflags. arg ( "-Zunstable-options" ) ;
12021202 rustflags. arg ( "-Wrustc::internal" ) ;
12031203 }
@@ -1360,7 +1360,7 @@ impl<'a> Builder<'a> {
13601360 // When we build Rust dylibs they're all intended for intermediate
13611361 // usage, so make sure we pass the -Cprefer-dynamic flag instead of
13621362 // linking all deps statically into the dylib.
1363- if let Mode :: Std | Mode :: Rustc | Mode :: Codegen = mode {
1363+ if matches ! ( mode , Mode :: Std | Mode :: Rustc ) {
13641364 rustflags. arg ( "-Cprefer-dynamic" ) ;
13651365 }
13661366
0 commit comments