-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Removed remnants of @mut
and ~mut
from comments and the type system.
#11485
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
Conversation
ty::ty_uniq(typ) => { | ||
let extra = self.c_mt(&ty::mt { | ||
ty: typ, | ||
mutbl: ast::MutImmutable, |
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.
Is this necessary? Can't it just use type_of
?
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.
It's what ty_box
uses, I didn't take the time to investigate whether @pcwalton didn't do the right thing for ty_box
when he removed @mut
.
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.
It preserves the existing interface, but the interface is rapidly drifting from the types, so we should fix that. Perhaps a separate PR, perhaps not?
depending on `MQ`. This lock will fail if the box has already been | ||
borrowed and either the old loan or the new loan is a mutable loan | ||
(multiple immutable loans are okay). The lock is released as we exit | ||
the scope `LT`. |
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.
I would want @nikomatsakis to sign off on these modifications to the documentation before merging
I will review. |
maybe_parse_explicit_self(SelfBox, self) | ||
} | ||
token::TILDE => { | ||
maybe_parse_explicit_self(SelfUniq(MutImmutable), self) |
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.
This SelfUniq(MutImmutable)
seems like a holdover that ought to be removed too
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.
Ah, I see that it's supposed to mean mut ~self
-- I... wonder if that's properly integrated everywhere. Hopefully.
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.
SelfUniq
and SelfValue
have the mutability of the binding, not of the inner type.
That said, in my self-demoting/env-removal branch, I moved the mutability into the pattern of the self
argument I've added to methods.
trigger [`transmute_null_to_fn`] on chain of casts fixes: rust-lang#11485 changelog: trigger [`transmute_null_to_fn`] on chain of casts
No description provided.