-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Don't special case the Self
parameter by name
#63463
Conversation
@bors try |
☀️ Try build successful - checks-azure |
@rust-timer build |
@rust-timer build bbd6744 AFAIK, rust-timer cannot detect the commit automatically. |
Success: Queued bbd6744 with parent 60960a2, comparison URL. |
src/librustc/ty/context.rs
Outdated
@@ -2568,7 +2573,7 @@ impl<'tcx> TyCtxt<'tcx> { | |||
|
|||
#[inline] | |||
pub fn mk_self_type(self) -> Ty<'tcx> { | |||
self.mk_ty_param(0, kw::SelfUpper.as_interned_str()) | |||
self.types.self_param |
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.
Looks like mk_self_type
isn't commonly used, perhaps it can be removed in favor of using self.types.self_param
directly?
Finished benchmarking try commit bbd6744, comparison URL. |
Use this to simplify the object safety code a bit.
4657ad1
to
24587d2
Compare
@bors r+ |
📌 Commit 24587d2 has been approved by |
☀️ Test successful - checks-azure |
This results in a couple of small diagnostic regressions. They could be avoided by keeping the special case just for diagnostics, but that seems worse.
closes #50125
cc #60869