When recovering from a : in a pattern, use adequate AST pattern#87160
Merged
bors merged 2 commits intorust-lang:masterfrom Dec 1, 2021
Merged
When recovering from a : in a pattern, use adequate AST pattern#87160bors merged 2 commits intorust-lang:masterfrom
: in a pattern, use adequate AST pattern#87160bors merged 2 commits intorust-lang:masterfrom
Conversation
Contributor
|
(rust-highfive has picked a reviewer for you, use r? to override) |
Contributor
Author
|
ping |
Member
|
r? @nagisa |
nagisa
reviewed
Oct 7, 2021
Member
There was a problem hiding this comment.
old_path.segments.extend(path.segments) or something of the sort would be nicer, perhaps?
Contributor
Author
There was a problem hiding this comment.
What do you think of this?
path.segments = old_path
.segments
.iter()
.cloned()
.chain(take(&mut path.segments))
.collect();
This comment has been minimized.
This comment has been minimized.
e185cba to
5743c56
Compare
Collaborator
|
☔ The latest upstream changes (presumably #85346) made this pull request unmergeable. Please resolve the merge conflicts. |
0ae2f80 to
03a57e0
Compare
nagisa
reviewed
Nov 27, 2021
Member
There was a problem hiding this comment.
Is this truly MachineApplicable? We don't really check with the resolver here that the constructed pattern will match, do we?
nagisa
approved these changes
Nov 27, 2021
Member
nagisa
left a comment
There was a problem hiding this comment.
Seems good, except for machine applicability stuff.
03a57e0 to
c027105
Compare
Contributor
Author
|
@bors r=nagisa |
Collaborator
|
📌 Commit c027105 has been approved by |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Nov 29, 2021
When recovering from a `:` in a pattern, use adequate AST pattern If the suggestion to use `::` instead of `:` in the pattern isn't correct, a second resolution error will be emitted.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Nov 30, 2021
When recovering from a `:` in a pattern, use adequate AST pattern If the suggestion to use `::` instead of `:` in the pattern isn't correct, a second resolution error will be emitted.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Dec 1, 2021
When recovering from a `:` in a pattern, use adequate AST pattern If the suggestion to use `::` instead of `:` in the pattern isn't correct, a second resolution error will be emitted.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 1, 2021
…askrgr Rollup of 7 pull requests Successful merges: - rust-lang#87160 (When recovering from a `:` in a pattern, use adequate AST pattern) - rust-lang#90985 (Use `get_diagnostic_name` more) - rust-lang#91087 (Remove all migrate.nll.stderr files) - rust-lang#91207 (Add support for LLVM coverage mapping format versions 5 and 6) - rust-lang#91298 (Improve error message for `E0659` if the source is not available) - rust-lang#91346 (Add `Option::inspect` and `Result::{inspect, inspect_err}`) - rust-lang#91404 (Fix bad `NodeId` limit checking.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
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.
If the suggestion to use
::instead of:in the pattern isn't correct, a second resolution error will be emitted.