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