RFC2229 Only compute place if upvars can be resolved#88039
Merged
bors merged 1 commit intorust-lang:masterfrom Aug 20, 2021
Merged
RFC2229 Only compute place if upvars can be resolved#88039bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
roxelo
commented
Aug 15, 2021
Contributor
Author
There was a problem hiding this comment.
This warning is inconsistent with what happens when let _: Props = props_2; is used outside of a closure. This is a different problem so I have created a new issue for it.
This comment has been minimized.
This comment has been minimized.
Contributor
nikomatsakis
left a comment
There was a problem hiding this comment.
@roxelo have some questions...
| var_ty: ty, | ||
| binding_mode: mode, | ||
| }); | ||
| if let Ok(place_resolved) = |
Contributor
There was a problem hiding this comment.
Under what conditions would this fail to succeed?
Contributor
There was a problem hiding this comment.
in the case we dont capture the root variable
| .ty(&self.local_decls, tcx) | ||
| .ty | ||
| .kind() | ||
| let (min_length, exact_size) = if let Ok(place_resolved) = |
Contributor
Author
There was a problem hiding this comment.
let _: Props = props_2; when we don't let it ice on line 158 of the simplify.rs file
nikomatsakis
approved these changes
Aug 17, 2021
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit 9c32b5b has been approved by |
Member
camsteffen
added a commit
to camsteffen/rust
that referenced
this pull request
Aug 19, 2021
RFC2229 Only compute place if upvars can be resolved Closes rust-lang#87987 This PR fixes an ICE when trying to unwrap an Err. This error appears when trying to convert a PlaceBuilder into Place when upvars can't yet be resolved. We should only try to convert a PlaceBuilder into Place if upvars can be resolved. r? `@nikomatsakis`
Collaborator
Collaborator
|
☀️ Test successful - checks-actions |
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.
Closes #87987
This PR fixes an ICE when trying to unwrap an Err. This error appears when trying to convert a PlaceBuilder into Place when upvars can't yet be resolved. We should only try to convert a PlaceBuilder into Place if upvars can be resolved.
r? @nikomatsakis