Skip to content
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

auto: librustc: Allow mutable box substructure to be borrowed without requirin... #4826

Closed
wants to merge 1 commit into from

Conversation

pcwalton
Copy link
Contributor

@pcwalton pcwalton commented Feb 7, 2013

...g purity. Closes #4825.

r? @nikomatsakis

@nikomatsakis
Copy link
Contributor

I thought that we didn't want to allow these sorts of borrows? I was planning on ensuring that they can't happen. In particular I expect the for loop there to yield an error since you are borrowing a substructure of an @mut box but not the @mut box itself.

@pcwalton
Copy link
Contributor Author

pcwalton commented Feb 7, 2013

OK, but I feel like that error should be emitted deliberately, not only allowed if pure.

@nikomatsakis
Copy link
Contributor

OK. r+

@pcwalton pcwalton closed this Feb 13, 2013
@pcwalton pcwalton deleted the inhtwama-substructure branch February 13, 2013 19:06
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 14, 2020
clone_on_copy - add machine applicability

Fix rust-lang#4826.
Change the applicability of the lint clone_on_copy. Split a test file and run rustfix on the clone_on_copy part.

changelog: clone_on_copy - add machine applicability
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.

4 participants