Skip to content
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

Dont suggest ! for path in function call if it has generic args #118342

Merged
merged 1 commit into from Nov 29, 2023

Conversation

compiler-errors
Copy link
Member

Fixes #118335

@rustbot
Copy link
Collaborator

rustbot commented Nov 26, 2023

r? @cjgillot

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 26, 2023
@rust-log-analyzer

This comment has been minimized.

"!",
Applicability::MaybeIncorrect,
);
}
Copy link
Contributor

@estebank estebank Nov 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I guess we could

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm only getting DUMMY_SP for the macro def spans.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh, ok.

@estebank
Copy link
Contributor

r? @estebank

@bors r+

@bors
Copy link
Contributor

bors commented Nov 28, 2023

📌 Commit 8490b8e has been approved by estebank

It is now in the queue for this repository.

@rustbot rustbot assigned estebank and unassigned cjgillot Nov 28, 2023
@bors 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 Nov 28, 2023
@compiler-errors
Copy link
Member Author

Wait, I'll apply your suggestion

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 28, 2023
@compiler-errors
Copy link
Member Author

@bors r=estebank

@bors
Copy link
Contributor

bors commented Nov 28, 2023

📌 Commit 8490b8e has been approved by estebank

It is now in the queue for this repository.

@bors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 28, 2023
@compiler-errors
Copy link
Member 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
@bors bors merged commit 5e7f770 into rust-lang:master Nov 29, 2023
11 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Nov 29, 2023
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
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

funny suggestion with generic macros™
6 participants