Spawned off of #24162. Our lifetimes only carry a Name, not an Ident, which means the comparisons for shadowing are only doing name based comparisons.
But macros should be free to introduce labels, and have them be treated as independent due to hygiene.
This bug is believed to only introduce issues where code will cause a warning to be emitted by the new shadowing check when it should be accepted; i.e. there are not any known soundness issues associated with this problem.
(Note: While loop labels themselves are Idents, much of the syntax system does not treat them the same way it treats "normal" variables with respect to e.g. hygiene. For example the syntax::visit system does not invoke visit_ident on loop labels.)
Spawned off of #24162. Our lifetimes only carry a
Name, not anIdent, which means the comparisons for shadowing are only doing name based comparisons.But macros should be free to introduce labels, and have them be treated as independent due to hygiene.
This bug is believed to only introduce issues where code will cause a warning to be emitted by the new shadowing check when it should be accepted; i.e. there are not any known soundness issues associated with this problem.
(Note: While loop labels themselves are
Idents, much of the syntax system does not treat them the same way it treats "normal" variables with respect to e.g. hygiene. For example thesyntax::visitsystem does not invokevisit_identon loop labels.)