mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 02:29:44 +00:00
Fix path macro hygiene
This commit is contained in:
parent
5e7dd31c80
commit
af7f89cc9d
4 changed files with 6 additions and 2 deletions
|
|
@ -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()),)*
|
||||
])
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue