diff options
| author | bors <bors@rust-lang.org> | 2025-05-29 12:07:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-05-29 12:07:53 +0000 |
| commit | 13718eb788622ef8c998650451174570230d2971 (patch) | |
| tree | caa9ae4aa30d982c3f7fb0b48d14a8d15a3ce135 /compiler/rustc_builtin_macros/src | |
| parent | 8afd71079a729ac002298239f5010ccaac5807ca (diff) | |
| parent | 026baa1c6fb397e9bd2c171d750c939232c13a58 (diff) | |
| download | rust-13718eb788622ef8c998650451174570230d2971.tar.gz rust-13718eb788622ef8c998650451174570230d2971.zip | |
Auto merge of #141595 - bjorn3:rustc_no_sysroot_proc_macro, r=onur-ozkan
Do not get proc_macro from the sysroot in rustc With the stage0 refactor the proc_macro version found in the sysroot will no longer always match the proc_macro version that proc-macros get compiled with by the rustc executable that uses this proc_macro. This will cause problems as soon as the ABI of the bridge gets changed to implement new features or change the way existing features work. To fix this, this commit changes rustc crates to depend directly on the local version of proc_macro which will also be used in the sysroot that rustc will build.
Diffstat (limited to 'compiler/rustc_builtin_macros/src')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/lib.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_builtin_macros/src/lib.rs b/compiler/rustc_builtin_macros/src/lib.rs index b16f3cff5cf..667d90429f2 100644 --- a/compiler/rustc_builtin_macros/src/lib.rs +++ b/compiler/rustc_builtin_macros/src/lib.rs @@ -20,8 +20,6 @@ #![recursion_limit = "256"] // tidy-alphabetical-end -extern crate proc_macro; - use std::sync::Arc; use rustc_expand::base::{MacroExpanderFn, ResolverExpand, SyntaxExtensionKind}; @@ -140,7 +138,7 @@ pub fn register_builtin_macros(resolver: &mut dyn ResolverExpand) { CoercePointee: coerce_pointee::expand_deriving_coerce_pointee, } - let client = proc_macro::bridge::client::Client::expand1(proc_macro::quote); + let client = rustc_proc_macro::bridge::client::Client::expand1(rustc_proc_macro::quote); register(sym::quote, SyntaxExtensionKind::Bang(Arc::new(BangProcMacro { client }))); let requires = SyntaxExtensionKind::Attr(Arc::new(contracts::ExpandRequires)); register(sym::contracts_requires, requires); |
