Skip to content

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

Merged
merged 1 commit into from
Jan 14, 2014

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Jan 11, 2014

No description provided.

ty::ty_uniq(typ) => {
let extra = self.c_mt(&ty::mt {
ty: typ,
mutbl: ast::MutImmutable,
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Contributor

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`.
Copy link
Member

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

@nikomatsakis
Copy link
Contributor

I will review.

maybe_parse_explicit_self(SelfBox, self)
}
token::TILDE => {
maybe_parse_explicit_self(SelfUniq(MutImmutable), self)
Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Member Author

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.

@bors bors closed this Jan 14, 2014
@bors bors merged commit 509fc92 into rust-lang:master Jan 14, 2014
@eddyb eddyb deleted the sweep-old-rust branch January 15, 2014 05:32
flip1995 pushed a commit to flip1995/rust that referenced this pull request Sep 25, 2023
trigger [`transmute_null_to_fn`] on chain of casts

fixes: rust-lang#11485

changelog: trigger [`transmute_null_to_fn`] on chain of casts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants