Skip suggestions pointing to macro def for assert_eq#154551
Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom Mar 31, 2026
Merged
Conversation
Collaborator
|
rustbot has assigned @dingxiangfei2009. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Member
Author
|
r? @JohnTitor |
JohnTitor
reviewed
Mar 30, 2026
| { | ||
| let derefs = "*".repeat(steps); | ||
| let msg = "consider dereferencing here"; | ||
| if !span.can_be_used_for_suggestions() { |
Member
There was a problem hiding this comment.
I guess you can use in_external_macro(), suggestions on local macro should be still valid.
Member
Author
There was a problem hiding this comment.
yes, you are right. I added a local macro in test.
cd7f53e to
52125a1
Compare
This comment has been minimized.
This comment has been minimized.
52125a1 to
6518de3
Compare
JohnTitor
approved these changes
Mar 30, 2026
Contributor
tgross35
added a commit
to tgross35/rust
that referenced
this pull request
Mar 30, 2026
…t-ne-suggestion-span, r=JohnTitor Skip suggestions pointing to macro def for assert_eq Fixes rust-lang#146204 It's better to suggest: ```console help: consider borrowing here --> src/main.rs:3:16 | 3| assert_ne!(&buf, b"----"); | + ``` but i don't want to give a too heuristic but not general enough fix, let suppress them.
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 31, 2026
Rollup of 7 pull requests Successful merges: - #142659 (compiler-builtins: Clean up features) - #153574 (Avoid ICE when param-env normalization leaves unresolved inference variables) - #153648 (Fix EII function aliases eliminated by LTO) - #153790 (Fix regression when dealing with generics/values with unresolved inference) - #153893 (Lex lifetimes as identifiers, recover from emoji and emit appropriate error) - #153980 (refactor: move doc(rust_logo) check to parser) - #154551 (Skip suggestions pointing to macro def for assert_eq)
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 31, 2026
Rollup of 7 pull requests Successful merges: - #142659 (compiler-builtins: Clean up features) - #153574 (Avoid ICE when param-env normalization leaves unresolved inference variables) - #153648 (Fix EII function aliases eliminated by LTO) - #153790 (Fix regression when dealing with generics/values with unresolved inference) - #153893 (Lex lifetimes as identifiers, recover from emoji and emit appropriate error) - #153980 (refactor: move doc(rust_logo) check to parser) - #154551 (Skip suggestions pointing to macro def for assert_eq)
tgross35
added a commit
to tgross35/rust
that referenced
this pull request
Mar 31, 2026
…t-ne-suggestion-span, r=JohnTitor Skip suggestions pointing to macro def for assert_eq Fixes rust-lang#146204 It's better to suggest: ```console help: consider borrowing here --> src/main.rs:3:16 | 3| assert_ne!(&buf, b"----"); | + ``` but i don't want to give a too heuristic but not general enough fix, let suppress them.
tgross35
added a commit
to tgross35/rust
that referenced
this pull request
Mar 31, 2026
…t-ne-suggestion-span, r=JohnTitor Skip suggestions pointing to macro def for assert_eq Fixes rust-lang#146204 It's better to suggest: ```console help: consider borrowing here --> src/main.rs:3:16 | 3| assert_ne!(&buf, b"----"); | + ``` but i don't want to give a too heuristic but not general enough fix, let suppress them.
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Mar 31, 2026
…t-ne-suggestion-span, r=JohnTitor Skip suggestions pointing to macro def for assert_eq Fixes rust-lang#146204 It's better to suggest: ```console help: consider borrowing here --> src/main.rs:3:16 | 3| assert_ne!(&buf, b"----"); | + ``` but i don't want to give a too heuristic but not general enough fix, let suppress them.
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 31, 2026
Rollup of 9 pull requests Successful merges: - #154582 (miri subtree update) - #142659 (compiler-builtins: Clean up features) - #153574 (Avoid ICE when param-env normalization leaves unresolved inference variables) - #153648 (Fix EII function aliases eliminated by LTO) - #153790 (Fix regression when dealing with generics/values with unresolved inference) - #154551 (Skip suggestions pointing to macro def for assert_eq) - #154574 (delete several `ui/consts` tests) - #154577 (Update `mir-opt` 64-bit panic-abort tests for `Alignment` rename) - #154579 (remove debug requirement from hooks)
rust-timer
added a commit
that referenced
this pull request
Mar 31, 2026
Rollup merge of #154551 - chenyukang:yukang-fix-146204-assert-ne-suggestion-span, r=JohnTitor Skip suggestions pointing to macro def for assert_eq Fixes #146204 It's better to suggest: ```console help: consider borrowing here --> src/main.rs:3:16 | 3| assert_ne!(&buf, b"----"); | + ``` but i don't want to give a too heuristic but not general enough fix, let suppress them.
github-actions bot
pushed a commit
to rust-lang/compiler-builtins
that referenced
this pull request
Mar 31, 2026
Rollup of 9 pull requests Successful merges: - rust-lang/rust#154582 (miri subtree update) - rust-lang/rust#142659 (compiler-builtins: Clean up features) - rust-lang/rust#153574 (Avoid ICE when param-env normalization leaves unresolved inference variables) - rust-lang/rust#153648 (Fix EII function aliases eliminated by LTO) - rust-lang/rust#153790 (Fix regression when dealing with generics/values with unresolved inference) - rust-lang/rust#154551 (Skip suggestions pointing to macro def for assert_eq) - rust-lang/rust#154574 (delete several `ui/consts` tests) - rust-lang/rust#154577 (Update `mir-opt` 64-bit panic-abort tests for `Alignment` rename) - rust-lang/rust#154579 (remove debug requirement from hooks)
chenyukang
pushed a commit
to chenyukang/rust
that referenced
this pull request
Apr 1, 2026
Rollup of 9 pull requests Successful merges: - rust-lang#154582 (miri subtree update) - rust-lang#142659 (compiler-builtins: Clean up features) - rust-lang#153574 (Avoid ICE when param-env normalization leaves unresolved inference variables) - rust-lang#153648 (Fix EII function aliases eliminated by LTO) - rust-lang#153790 (Fix regression when dealing with generics/values with unresolved inference) - rust-lang#154551 (Skip suggestions pointing to macro def for assert_eq) - rust-lang#154574 (delete several `ui/consts` tests) - rust-lang#154577 (Update `mir-opt` 64-bit panic-abort tests for `Alignment` rename) - rust-lang#154579 (remove debug requirement from hooks)
RalfJung
pushed a commit
to RalfJung/miri
that referenced
this pull request
Apr 1, 2026
Rollup of 9 pull requests Successful merges: - rust-lang/rust#154582 (miri subtree update) - rust-lang/rust#142659 (compiler-builtins: Clean up features) - rust-lang/rust#153574 (Avoid ICE when param-env normalization leaves unresolved inference variables) - rust-lang/rust#153648 (Fix EII function aliases eliminated by LTO) - rust-lang/rust#153790 (Fix regression when dealing with generics/values with unresolved inference) - rust-lang/rust#154551 (Skip suggestions pointing to macro def for assert_eq) - rust-lang/rust#154574 (delete several `ui/consts` tests) - rust-lang/rust#154577 (Update `mir-opt` 64-bit panic-abort tests for `Alignment` rename) - rust-lang/rust#154579 (remove debug requirement from hooks)
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.
Fixes #146204
It's better to suggest:
but i don't want to give a too heuristic but not general enough fix, let suppress them.