-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Only suggest imports if not imported. #58381
Merged
Merged
Conversation
This file contains 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
This commit modifies name resolution error reporting so that if a name is in scope and has been imported then we do not suggest importing it. This can occur when we add a label about constructors not being visible due to private fields. In these cases, we know that the struct/variant has been imported and we should silence any suggestions to import the struct/variant.
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Feb 11, 2019
@bors r+ |
📌 Commit 48b0c9d has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Feb 11, 2019
Centril
added a commit
to Centril/rust
that referenced
this pull request
Feb 13, 2019
Only suggest imports if not imported. Fixes rust-lang#42944 and fixes rust-lang#53430. This commit modifies name resolution error reporting so that if a name is in scope and has been imported then we do not suggest importing it. This can occur when we add a label about constructors not being visible due to private fields. In these cases, we know that the struct/variant has been imported and we should silence any suggestions to import the struct/variant. r? @estebank
Centril
added a commit
to Centril/rust
that referenced
this pull request
Feb 13, 2019
Only suggest imports if not imported. Fixes rust-lang#42944 and fixes rust-lang#53430. This commit modifies name resolution error reporting so that if a name is in scope and has been imported then we do not suggest importing it. This can occur when we add a label about constructors not being visible due to private fields. In these cases, we know that the struct/variant has been imported and we should silence any suggestions to import the struct/variant. r? @estebank
Centril
added a commit
to Centril/rust
that referenced
this pull request
Feb 13, 2019
Only suggest imports if not imported. Fixes rust-lang#42944 and fixes rust-lang#53430. This commit modifies name resolution error reporting so that if a name is in scope and has been imported then we do not suggest importing it. This can occur when we add a label about constructors not being visible due to private fields. In these cases, we know that the struct/variant has been imported and we should silence any suggestions to import the struct/variant. r? @estebank
bors
added a commit
that referenced
this pull request
Feb 13, 2019
Rollup of 10 pull requests Successful merges: - #58110 (libpanic_unwind => 2018) - #58167 (HirId-ify hir::BodyId) - #58202 (Ignore future deprecations in #[deprecated]) - #58272 (Cut down on number formating code size) - #58276 (Improve the error messages for missing stability attributes) - #58354 (Fix ICE and invalid filenames in MIR printing code) - #58381 (Only suggest imports if not imported.) - #58386 (Fix #54242) - #58400 (Fix rustc_driver swallowing errors when compilation is stopped) - #58420 (target/uefi: clarify documentation) Failed merges: r? @ghost
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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.
Fixes #42944 and fixes #53430.
This commit modifies name resolution error reporting so that if a name
is in scope and has been imported then we do not suggest importing it.
This can occur when we add a label about constructors not being visible
due to private fields. In these cases, we know that the struct/variant
has been imported and we should silence any suggestions to import the
struct/variant.
r? @estebank