librustc: Fix the issue with labels shadowing variable names by making
the leading quote part of the identifier for the purposes of hygiene. This adopts @jbclements' solution to #14539. I'm not sure if this is a breaking change or not. Closes #12512. [breaking-change]
This commit is contained in:
committed by
Alex Crichton
parent
e7f11f20e5
commit
2ed4734873
@@ -3452,7 +3452,7 @@ impl<'a> Parser<'a> {
|
||||
match self.token {
|
||||
token::LIFETIME(lifetime) => {
|
||||
let lifetime_interned_string = token::get_ident(lifetime);
|
||||
if lifetime_interned_string.equiv(&("static")) {
|
||||
if lifetime_interned_string.equiv(&("'static")) {
|
||||
result.push(StaticRegionTyParamBound);
|
||||
if allow_any_lifetime && ret_lifetime.is_none() {
|
||||
ret_lifetime = Some(ast::Lifetime {
|
||||
|
||||
Reference in New Issue
Block a user