@@ -692,6 +692,7 @@ macro_rules! tool_extended {
692692 stable = $stable: expr,
693693 $( in_tree = $in_tree: expr, ) ?
694694 $( submodule = $submodule: literal, ) ?
695+ $( tool_std = $tool_std: literal, ) ?
695696 $extra_deps: block; ) +) => {
696697 $(
697698 #[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
@@ -740,7 +741,7 @@ macro_rules! tool_extended {
740741 compiler: $sel. compiler,
741742 target: $sel. target,
742743 tool: $tool_name,
743- mode: Mode :: ToolRustc ,
744+ mode: if false $ ( || $tool_std ) ? { Mode :: ToolStd } else { Mode :: ToolRustc } ,
744745 path: $path,
745746 extra_features: $sel. extra_features,
746747 is_optional_tool: true ,
@@ -774,7 +775,10 @@ tool_extended!((self, builder),
774775 } ) ;
775776 self . extra_features. push( "clippy" . to_owned( ) ) ;
776777 } ;
777- RustDemangler , rust_demangler, "src/tools/rust-demangler" , "rust-demangler" , stable=false , in_tree=true , { } ;
778+ // FIXME: tool_std is not quite right, we shouldn't allow nightly features.
779+ // But `builder.cargo` doesn't know how to handle ToolBootstrap in stages other than 0,
780+ // and this is close enough for now.
781+ RustDemangler , rust_demangler, "src/tools/rust-demangler" , "rust-demangler" , stable=false , in_tree=true , tool_std=true , { } ;
778782 Rustfmt , rustfmt, "src/tools/rustfmt" , "rustfmt" , stable=true , in_tree=true , { } ;
779783 RustAnalyzer , rust_analyzer, "src/tools/rust-analyzer/crates/rust-analyzer" , "rust-analyzer" , stable=false , submodule="rust-analyzer" , { } ;
780784) ;
0 commit comments