@@ -796,7 +796,7 @@ impl<'a> Builder<'a> {
796796 if cmd == "doc" || cmd == "rustdoc" {
797797 let my_out = match mode {
798798 // This is the intended out directory for compiler documentation.
799- Mode :: Rustc | Mode :: ToolRustc | Mode :: Codegen => self . compiler_doc_out ( target) ,
799+ Mode :: Rustc | Mode :: ToolRustc => self . compiler_doc_out ( target) ,
800800 Mode :: Std => out_dir. join ( target. triple ) . join ( "doc" ) ,
801801 _ => panic ! ( "doc mode {:?} not expected" , mode) ,
802802 } ;
@@ -874,7 +874,7 @@ impl<'a> Builder<'a> {
874874
875875 match mode {
876876 Mode :: Std | Mode :: ToolBootstrap | Mode :: ToolStd => { }
877- Mode :: Rustc | Mode :: Codegen | Mode :: ToolRustc => {
877+ Mode :: Rustc | Mode :: ToolRustc => {
878878 // Build proc macros both for the host and the target
879879 if target != compiler. host && cmd != "check" {
880880 cargo. arg ( "-Zdual-proc-macros" ) ;
@@ -1059,7 +1059,7 @@ impl<'a> Builder<'a> {
10591059 }
10601060
10611061 let debuginfo_level = match mode {
1062- Mode :: Rustc | Mode :: Codegen => self . config . rust_debuginfo_level_rustc ,
1062+ Mode :: Rustc => self . config . rust_debuginfo_level_rustc ,
10631063 Mode :: Std => self . config . rust_debuginfo_level_std ,
10641064 Mode :: ToolBootstrap | Mode :: ToolStd | Mode :: ToolRustc => {
10651065 self . config . rust_debuginfo_level_tools
@@ -1196,7 +1196,7 @@ impl<'a> Builder<'a> {
11961196 rustdocflags. arg ( "-Winvalid_codeblock_attributes" ) ;
11971197 }
11981198
1199- if let Mode :: Rustc | Mode :: Codegen = mode {
1199+ if mode == Mode :: Rustc {
12001200 rustflags. arg ( "-Zunstable-options" ) ;
12011201 rustflags. arg ( "-Wrustc::internal" ) ;
12021202 }
@@ -1359,7 +1359,7 @@ impl<'a> Builder<'a> {
13591359 // When we build Rust dylibs they're all intended for intermediate
13601360 // usage, so make sure we pass the -Cprefer-dynamic flag instead of
13611361 // linking all deps statically into the dylib.
1362- if let Mode :: Std | Mode :: Rustc | Mode :: Codegen = mode {
1362+ if matches ! ( mode , Mode :: Std | Mode :: Rustc ) {
13631363 rustflags. arg ( "-Cprefer-dynamic" ) ;
13641364 }
13651365
0 commit comments