@@ -797,7 +797,7 @@ impl<'a> Builder<'a> {
797
797
if cmd == "doc" || cmd == "rustdoc" {
798
798
let my_out = match mode {
799
799
// 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) ,
801
801
Mode :: Std => out_dir. join ( target. triple ) . join ( "doc" ) ,
802
802
_ => panic ! ( "doc mode {:?} not expected" , mode) ,
803
803
} ;
@@ -875,7 +875,7 @@ impl<'a> Builder<'a> {
875
875
876
876
match mode {
877
877
Mode :: Std | Mode :: ToolBootstrap | Mode :: ToolStd => { }
878
- Mode :: Rustc | Mode :: Codegen | Mode :: ToolRustc => {
878
+ Mode :: Rustc | Mode :: ToolRustc => {
879
879
// Build proc macros both for the host and the target
880
880
if target != compiler. host && cmd != "check" {
881
881
cargo. arg ( "-Zdual-proc-macros" ) ;
@@ -1060,7 +1060,7 @@ impl<'a> Builder<'a> {
1060
1060
}
1061
1061
1062
1062
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 ,
1064
1064
Mode :: Std => self . config . rust_debuginfo_level_std ,
1065
1065
Mode :: ToolBootstrap | Mode :: ToolStd | Mode :: ToolRustc => {
1066
1066
self . config . rust_debuginfo_level_tools
@@ -1197,7 +1197,7 @@ impl<'a> Builder<'a> {
1197
1197
rustdocflags. arg ( "-Winvalid_codeblock_attributes" ) ;
1198
1198
}
1199
1199
1200
- if let Mode :: Rustc | Mode :: Codegen = mode {
1200
+ if mode == Mode :: Rustc {
1201
1201
rustflags. arg ( "-Zunstable-options" ) ;
1202
1202
rustflags. arg ( "-Wrustc::internal" ) ;
1203
1203
}
@@ -1360,7 +1360,7 @@ impl<'a> Builder<'a> {
1360
1360
// When we build Rust dylibs they're all intended for intermediate
1361
1361
// usage, so make sure we pass the -Cprefer-dynamic flag instead of
1362
1362
// 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 ) {
1364
1364
rustflags. arg ( "-Cprefer-dynamic" ) ;
1365
1365
}
1366
1366
0 commit comments