Implement RFC #43#16102
Merged
bors merged 4 commits intorust-lang:masterfrom Aug 1, 2014
zwarich:borrowck-unboxed
Merged
Conversation
Author
|
In a way, this is kind of a hack to make the borrow checker stupider than it actually is, but I don't know of a better way to do this while supporting |
Author
Contributor
|
I will review but it is difficult this week due to TC39. |
Contributor
There was a problem hiding this comment.
Can you put an issue # here?
Contributor
|
Looks good modulo that one nit. |
added 4 commits
July 30, 2014 13:36
Remove the ability of the borrow checker to determine that repeated dereferences of a Box<T> refer to the same memory object. This will usually require one of two workarounds: 1) The interior of a Box<T> will sometimes need to be moved / borrowed into a temporary before moving / borrowing individual derived paths. 2) A `ref x` pattern will have to be replaced with a `box ref x` pattern. Fixes #16094. [breaking-change]
Author
|
Updated to address @pcwalton's nit. |
bors
added a commit
that referenced
this pull request
Aug 1, 2014
This removes the ability of the borrow checker to determine that repeated dereferences of a Box<T> refer to the same memory object.
Contributor
There was a problem hiding this comment.
Shouldn't the year be 2012-2014?
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Nov 28, 2025
…ns (rust-lang#16102) Currently the `sugg` utility treats all `ExprKind::Match` expressions as potentially needing brackets, and therefore many lints will add parenthesis around them. However this includes desugared match expressions like the `?` and `.await` operators. In this PR I have updated the utility to only treat match expressions which include a code block as needing parenthesis, as the other types have similar precedence rules and expectations to things like member access and I think can be treated like as such. While this change is small on paper it touches a large amount of code due to changing a cross cutting concern, I am happy to add additional tests if we think it is needed, but I wanted to get a feel for if this is even a sensible change to be doing and what the expectations were around the level of testing needed before investing more time into it. Regarding not putting a specific lint in the changelog, determining all the lints this could possibly effect would be possible but take some time, and I wonder if it would be a bit too noisy in the changelog. Open to suggestions about how best to address that. fixes rust-lang/rust-clippy#16045 changelog: stop inserting unnecessary brackets around `x?` and `x.await` expressions in suggestions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This removes the ability of the borrow checker to determine that repeated dereferences of a Box refer to the same memory object.
update: document RFC 130; PR: rust-lang/rfcs#130