mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Merge pull request #19327 from Veykril/push-qyyvkulltzpz
Fix `path` macro hygiene
This commit is contained in:
commit
f53d1eba48
@ -5,6 +5,8 @@
|
||||
//! expansion.
|
||||
#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
|
||||
|
||||
pub use intern;
|
||||
|
||||
pub mod attrs;
|
||||
pub mod builtin;
|
||||
pub mod change;
|
||||
|
@ -388,7 +388,7 @@ macro_rules! __path {
|
||||
($start:ident $(:: $seg:ident)*) => ({
|
||||
$crate::__known_path!($start $(:: $seg)*);
|
||||
$crate::mod_path::ModPath::from_segments($crate::mod_path::PathKind::Abs, vec![
|
||||
$crate::name::Name::new_symbol_root(intern::sym::$start.clone()), $($crate::name::Name::new_symbol_root(intern::sym::$seg.clone()),)*
|
||||
$crate::name::Name::new_symbol_root($crate::intern::sym::$start.clone()), $($crate::name::Name::new_symbol_root($crate::intern::sym::$seg.clone()),)*
|
||||
])
|
||||
});
|
||||
}
|
||||
@ -399,7 +399,7 @@ pub use crate::__path as path;
|
||||
macro_rules! __tool_path {
|
||||
($start:ident $(:: $seg:ident)*) => ({
|
||||
$crate::mod_path::ModPath::from_segments($crate::mod_path::PathKind::Plain, vec![
|
||||
$crate::name::Name::new_symbol_root(intern::sym::rust_analyzer.clone()), $crate::name::Name::new_symbol_root(intern::sym::$start.clone()), $($crate::name::Name::new_symbol_root(intern::sym::$seg.clone()),)*
|
||||
$crate::name::Name::new_symbol_root($crate::intern::sym::rust_analyzer.clone()), $crate::name::Name::new_symbol_root($crate::intern::sym::$start.clone()), $($crate::name::Name::new_symbol_root($crate::intern::sym::$seg.clone()),)*
|
||||
])
|
||||
});
|
||||
}
|
||||
|
@ -139,6 +139,7 @@ pub use {
|
||||
},
|
||||
hygiene::{marks_rev, SyntaxContextExt},
|
||||
inert_attr_macro::AttributeTemplate,
|
||||
mod_path::tool_path,
|
||||
name::Name,
|
||||
prettify_macro_expansion,
|
||||
proc_macro::{ProcMacros, ProcMacrosBuilder},
|
||||
|
@ -185,6 +185,7 @@ define_symbols! {
|
||||
Clone,
|
||||
coerce_unsized,
|
||||
column,
|
||||
completion,
|
||||
compile_error,
|
||||
concat_bytes,
|
||||
concat_idents,
|
||||
|
Loading…
Reference in New Issue
Block a user