Remove last traces of identifier hygiene from HIR#34207
Remove last traces of identifier hygiene from HIR#34207bors merged 1 commit intorust-lang:masterfrom
Conversation
|
I need to be sure clippy is okay with this change, while the compiler itself doesn't use information removed in this patch anymore, external lints still can use it. |
|
It looks like we already stopped using unhygenize. Might still break, though. We rely on span expansion info now mostly. |
|
@Manishearth: We still use unhygienize 😛: $ ag unhygienize
clippy_lints/src/shadow.rs
69: bindings.push((ident.node.unhygienize(), ident.span))
123: let name = ident.node.unhygienize();
330: !path.global && path.segments.len() == 1 && path.segments[0].name.unhygienize() == name
340: if self.name == name.unhygienize() {
clippy_lints/src/misc.rs
414: segment != segment.unhygienize() && // not in bang macroFrom the comment, the last one looks like it could use |
|
|
|
Nice! LGTM. |
That's a good observation, all hygienic things (i.e. bindings, labels and some expression paths) have definitions in def_map, except for some function parameters, so yes, they can be used instead. |
|
LGTM, I have a working PR for Clippy based on this. |
|
@bors r+ |
|
📌 Commit f59afbc has been approved by |
|
⌛ Testing commit f59afbc with merge 9604420... |
Remove last traces of identifier hygiene from HIR rust-lang@e783a0a removed the [last](rust-lang#33654 (comment)) [use](rust-lang#33654 (comment)) of hygiene at post-resolve compilation stages, so we can avoid renaming during lowering to HIR and just keep original names. r? @nrc
|
💔 Test failed - auto-mac-64-opt-rustbuild |
e783a0a removed the last use of hygiene at post-resolve compilation stages, so we can avoid renaming during lowering to HIR and just keep original names.
r? @nrc