Dont suggest ! for path in function call if it has generic args#118342
Merged
bors merged 1 commit intorust-lang:masterfrom Nov 29, 2023
Merged
Dont suggest ! for path in function call if it has generic args#118342bors merged 1 commit intorust-lang:masterfrom
! for path in function call if it has generic args#118342bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
r? @cjgillot (rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
8eddfbf to
8490b8e
Compare
estebank
reviewed
Nov 28, 2023
| "!", | ||
| Applicability::MaybeIncorrect, | ||
| ); | ||
| } |
Contributor
There was a problem hiding this comment.
Should we have a else { err.span_note(macro_def.span, "there's a macro of the same name"); }? Otherwise the main message already mentions the macro existing, so a span-less note isn't worth it.
Contributor
Author
There was a problem hiding this comment.
Yeah I guess we could
Contributor
Author
There was a problem hiding this comment.
I'm only getting DUMMY_SP for the macro def spans.
Contributor
Collaborator
Contributor
Author
|
Wait, I'll apply your suggestion @bors r- |
Contributor
Author
|
@bors r=estebank |
Collaborator
Contributor
Author
|
@bors rollup |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 29, 2023
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#118342 (Dont suggest `!` for path in function call if it has generic args) - rust-lang#118383 (Address unused tuple struct fields in the standard library) - rust-lang#118401 (`rustc_ast_lowering` cleanups) - rust-lang#118409 (format_foreign.rs: unwrap return Option value for `fn position`, as it always returns Some) - rust-lang#118413 (Fix the issue of suggesting unwrap/expect for shorthand field) - rust-lang#118425 (Update cargo) - rust-lang#118429 (Fix a typo in a `format_args!` note) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 29, 2023
Rollup merge of rust-lang#118342 - compiler-errors:macro-generic-bang, r=estebank Dont suggest `!` for path in function call if it has generic args Fixes rust-lang#118335
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 #118335