diff --git a/compiler/rustc_resolve/src/macros.rs b/compiler/rustc_resolve/src/macros.rs index 87794d11cea9c..8763e7aec4325 100644 --- a/compiler/rustc_resolve/src/macros.rs +++ b/compiler/rustc_resolve/src/macros.rs @@ -140,9 +140,10 @@ pub(crate) fn registered_tools(tcx: TyCtxt<'_>, (): ()) -> RegisteredTools { } } } - // We implicitly add `rustfmt`, `clippy`, `diagnostic` to known tools, - // but it's not an error to register them explicitly. - let predefined_tools = [sym::clippy, sym::rustfmt, sym::diagnostic, sym::miri]; + // We implicitly add `rustfmt`, `clippy`, `diagnostic`, `miri` and `rust_analyzer` to known + // tools, but it's not an error to register them explicitly. + let predefined_tools = + [sym::clippy, sym::rustfmt, sym::diagnostic, sym::miri, sym::rust_analyzer]; registered_tools.extend(predefined_tools.iter().cloned().map(Ident::with_dummy_span)); registered_tools } diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 8d8f4927e99cb..ab0538ff282d5 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -1559,6 +1559,7 @@ symbols! { rust_2018_preview, rust_2021, rust_2024, + rust_analyzer, rust_begin_unwind, rust_cold_cc, rust_eh_catch_typeinfo,