-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Add lifetime-aware support for Display
impl of Ident
#143185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
c9addca
to
c4edd71
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rustbot ready
} | ||
return fmt::Display::fmt(&lifetime, f); | ||
} | ||
|
||
if self.is_raw { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When Ident starts with '
, the contents are printed recursively.
if self.name == kw::StaticLifetime || self.name == kw::UnderscoreLifetime { | ||
false | ||
} else if let Some(lifetime) = self.as_lifetime() { | ||
lifetime.is_raw_guess() | ||
} else { | ||
self.name.can_be_raw() && self.is_reserved() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two keywords that need to be excluded here.
This comment has been minimized.
This comment has been minimized.
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
lifetime.ident
Display
impl of Ident
d6c180d
to
9306466
Compare
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Fixes #143150
r? compiler