Uh oh!
There was an error while loading. Please reload this page.
Remove last traces of identifier hygiene from HIR - #34207
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. |
Manishearth
commented
Jun 11, 2016
It looks like we already stopped using unhygenize. Might still break, though. We rely on span expansion info now mostly. |
mcarton
commented
Jun 11, 2016
@Manishearth: We still use unhygienize 😛: $ ag unhygienize
clippy_lints/src/shadow.rs69: 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:ifself.name == name.unhygienize(){
clippy_lints/src/misc.rs414: segment != segment.unhygienize() && // not in bang macroFrom the comment, the last one looks like it could use |
|
jseyfried
commented
Jun 14, 2016
Nice! LGTM. |
petrochenkov
commented
Jun 14, 2016
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. |
mcarton
commented
Jun 15, 2016
LGTM, I have a working PR for Clippy based on this. |
jseyfried
commented
Jun 15, 2016
@bors r+ |
bors
commented
Jun 15, 2016
📌 Commit f59afbc has been approved by |
bors
commented
Jun 16, 2016
⌛ 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
bors
commented
Jun 16, 2016
💔 Test failed - auto-mac-64-opt-rustbuild |
e783a0a removed the lastuse of hygiene at post-resolve compilation stages, so we can avoid renaming during lowering to HIR and just keep original names.
r? @nrc