Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 5ca90ed

Browse files
committed
Do not remove path disambiugator inside macro
1 parent 131f11a commit 5ca90ed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/types.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ fn rewrite_segment(
229229
.chain(data.bindings.iter().map(|x| SegmentParam::Binding(&*x)))
230230
.collect::<Vec<_>>();
231231

232-
let separator = if path_context == PathContext::Expr {
232+
let force_separator =
233+
context.inside_macro() && context.snippet(data.span).starts_with("::");
234+
let separator = if path_context == PathContext::Expr || force_separator {
233235
"::"
234236
} else {
235237
""

0 commit comments

Comments
 (0)