Skip to content

Commit 050c8c8

Browse files
committed
Exhaustively match on DefPathData in with_dummy_span
This will cause an error if we ever add/change variants of `DefPathData`, as we need to ensure we strip spans from any `Ident`s
1 parent fdd2523 commit 050c8c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/hir/map/definitions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ impl DefPathData {
541541
ValueNs(name) => ValueNs(Ident::with_dummy_span(name.name)),
542542
MacroNs(name) => MacroNs(Ident::with_dummy_span(name.name)),
543543
LifetimeNs(name) => LifetimeNs(Ident::with_dummy_span(name.name)),
544-
_ => *self,
544+
CrateRoot | Misc | Impl | ClosureExpr | Ctor | AnonConst | ImplTrait => *self,
545545
}
546546
}
547547

0 commit comments

Comments
 (0)