Skip to content

Commit f53d1eb

Browse files
authored
Merge pull request rust-lang#19327 from Veykril/push-qyyvkulltzpz
Fix `path` macro hygiene
2 parents c961ee6 + 7ee9ce8 commit f53d1eb

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

src/tools/rust-analyzer/crates/hir-expand/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
//! expansion.
66
#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
77

8+
pub use intern;
9+
810
pub mod attrs;
911
pub mod builtin;
1012
pub mod change;

src/tools/rust-analyzer/crates/hir-expand/src/mod_path.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ macro_rules! __path {
388388
($start:ident $(:: $seg:ident)*) => ({
389389
$crate::__known_path!($start $(:: $seg)*);
390390
$crate::mod_path::ModPath::from_segments($crate::mod_path::PathKind::Abs, vec![
391-
$crate::name::Name::new_symbol_root(intern::sym::$start.clone()), $($crate::name::Name::new_symbol_root(intern::sym::$seg.clone()),)*
391+
$crate::name::Name::new_symbol_root($crate::intern::sym::$start.clone()), $($crate::name::Name::new_symbol_root($crate::intern::sym::$seg.clone()),)*
392392
])
393393
});
394394
}
@@ -399,7 +399,7 @@ pub use crate::__path as path;
399399
macro_rules! __tool_path {
400400
($start:ident $(:: $seg:ident)*) => ({
401401
$crate::mod_path::ModPath::from_segments($crate::mod_path::PathKind::Plain, vec![
402-
$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()),)*
402+
$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()),)*
403403
])
404404
});
405405
}

src/tools/rust-analyzer/crates/hir/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ pub use {
139139
},
140140
hygiene::{marks_rev, SyntaxContextExt},
141141
inert_attr_macro::AttributeTemplate,
142+
mod_path::tool_path,
142143
name::Name,
143144
prettify_macro_expansion,
144145
proc_macro::{ProcMacros, ProcMacrosBuilder},

src/tools/rust-analyzer/crates/intern/src/symbol/symbols.rs

+1
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ define_symbols! {
185185
Clone,
186186
coerce_unsized,
187187
column,
188+
completion,
188189
compile_error,
189190
concat_bytes,
190191
concat_idents,

0 commit comments

Comments
 (0)