diff --git a/compiler/rustc_resolve/src/macros.rs b/compiler/rustc_resolve/src/macros.rs index e3cfe6a6e05a5..3a813d28258e9 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 68b1b32baf2dc..5c16f722f023c 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -1544,6 +1544,7 @@ symbols! { rust_2018_preview, rust_2021, rust_2024, + rust_analyzer, rust_begin_unwind, rust_cold_cc, rust_eh_catch_typeinfo,