-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Fix bad suggestions for code from proc_macro #85937
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
m-ou-se
added
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
labels
Jun 2, 2021
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Jun 2, 2021
m-ou-se
changed the title
Macro ref suggestions
Fix bad suggestions for code from proc_macro
Jun 2, 2021
m-ou-se
force-pushed
the
macro-ref-suggestions
branch
from
June 2, 2021 16:18
56c77e7
to
b3b0f72
Compare
m-ou-se
force-pushed
the
macro-ref-suggestions
branch
from
June 2, 2021 16:36
b3b0f72
to
e735f60
Compare
📌 Commit e735f60 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
Jun 3, 2021
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Jun 3, 2021
…tebank Fix bad suggestions for code from proc_macro Fixes rust-lang#85932 This disables these suggestions for spans from external macros, while keeping them for macros defined locally: Before: ``` 3 | #[hello] | ^^^^^^^^ | | | expected `&mut i32`, found integer | help: consider mutably borrowing here: `&mut #[hello]` ``` After: ``` 3 | #[hello] | ^^^^^^^^ expected `&mut i32`, found integer ``` Unchanged: ``` 26 | macro_rules! bla { () => { x(123); } } | ^^^ | | | expected `&mut i32`, found integer | help: consider mutably borrowing here: `&mut 123` ... 29 | bla!(); | ------- in this macro invocation ```
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 4, 2021
Rollup of 8 pull requests Successful merges: - rust-lang#85717 (Document `From` impls for cow.rs) - rust-lang#85850 (Remove unused feature gates) - rust-lang#85888 (Fix typo in internal documentation for `TrustedRandomAccess`) - rust-lang#85889 (Restoring the `num_def_ids` function in the CStore API ) - rust-lang#85899 (jsondocck small cleanup) - rust-lang#85937 (Fix bad suggestions for code from proc_macro) - rust-lang#85963 (Show `::{{constructor}}` in std::any::type_name().) - rust-lang#85977 (Fix linkcheck script from getting out of sync.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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 #85932
This disables these suggestions for spans from external macros, while keeping them for macros defined locally:
Before:
After:
Unchanged: