Make new type param suggestion more targetted#73320
Merged
bors merged 3 commits intorust-lang:masterfrom Jun 19, 2020
Merged
Conversation
Do not suggest new type param when encountering a missing type in an ADT field with generic parameters. Fix rust-lang#72640.
Contributor
|
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
Contributor
Author
c536adb to
8bdca7a
Compare
estebank
commented
Jun 13, 2020
Contributor
Author
There was a problem hiding this comment.
Opened #73321 for handling this more gracefully.
8bdca7a to
f48e5bd
Compare
Suggest new type parameter on single char uppercase ident even if it doesn't appear in a field's type parameter. Address comment in rust-lang#72641.
f48e5bd to
af45d8a
Compare
Contributor
Author
|
r? @davidtwco |
davidtwco
approved these changes
Jun 17, 2020
Member
davidtwco
left a comment
There was a problem hiding this comment.
LGTM, one nit, r=me when you're happy.
src/librustc_resolve/lib.rs
Outdated
| id: Option<NodeId>, | ||
| /// Signals whether this `PathSegment` has generic arguments. Used to avoid providing | ||
| /// nonsensical suggestions. | ||
| has_args: bool, |
Member
There was a problem hiding this comment.
Suggested change
| has_args: bool, | |
| has_generic_args: bool, |
Might make this a little bit more clear.
Contributor
Author
|
@bors r=davidtwco |
Collaborator
|
📌 Commit 8d1a380 has been approved by |
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Jun 18, 2020
…vidtwco Make new type param suggestion more targetted Do not suggest new type param when encountering a missing type in an ADT field with generic parameters. Fix rust-lang#72640.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 19, 2020
…arth Rollup of 17 pull requests Successful merges: - rust-lang#70551 (Make all uses of ty::Error delay a span bug) - rust-lang#71338 (Expand "recursive opaque type" diagnostic) - rust-lang#71976 (Improve diagnostics for `let x += 1`) - rust-lang#72279 (add raw_ref macros) - rust-lang#72628 (Add tests for 'impl Default for [T; N]') - rust-lang#72804 (Further tweak lifetime errors involving `dyn Trait` and `impl Trait` in return position) - rust-lang#72814 (remove visit_terminator_kind from MIR visitor) - rust-lang#72836 (Complete the std::time documentation to warn about the inconsistencies between OS) - rust-lang#72968 (Only highlight doc search results via mouseover if mouse has moved) - rust-lang#73034 (Export `#[inline]` fns with extern indicators) - rust-lang#73315 (Clean up some weird command strings) - rust-lang#73320 (Make new type param suggestion more targetted) - rust-lang#73361 (Tweak "non-primitive cast" error) - rust-lang#73425 (Mention functions pointers in the documentation) - rust-lang#73428 (Fix typo in librustc_ast docs) - rust-lang#73447 (Improve document for `Result::as_deref(_mut)` methods) - rust-lang#73476 (Added tooltip for should_panic code examples) Failed merges: r? @ghost
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.
Do not suggest new type param when encountering a missing type in an ADT
field with generic parameters.
Fix #72640.