Skip to content

fix wrong quick fix for marco call - #23252

Open
Young-Flash wants to merge 4 commits into
rust-lang:masterfrom
Young-Flash:wrong-quick-fix-for-marco-call
Open

fix wrong quick fix for marco call#23252
Young-Flash wants to merge 4 commits into
rust-lang:masterfrom
Young-Flash:wrong-quick-fix-for-marco-call

Conversation

@Young-Flash

Copy link
Copy Markdown
Member

close #19428 & #23247

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 29, 2026
@Young-Flash
Young-Flash requested a review from A4-Tacks August 29, 2026 09:08
Comment thread crates/ide-diagnostics/src/handlers/type_mismatch.rs
A4-Tacks

This comment was marked as duplicate.

@A4-Tacks A4-Tacks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks good from the test, but I'm not sure if removing sema.diagnostics_display_range would be harmful

cc @ChayimFriedman2

View changes since this review

expr_ptr: &InFile<AstPtr<ast::Expr>>,
acc: &mut Vec<Assist>,
) -> Option<()> {
let range = ctx.sema.diagnostics_display_range((*expr_ptr).map(|it| it.into()));

@ChayimFriedman2 ChayimFriedman2 Sep 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We indeed should not remove diagnostics_display_range() and use other method. Why did you do that?

View changes since the review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The difference is that diagnostics_display_range() uses rooted mappings, meaning it won't show inside macros.

@Young-Flash
Young-Flash force-pushed the wrong-quick-fix-for-marco-call branch from 80ba595 to 61d0ce5 Compare September 5, 2026 02:56
@rustbot

rustbot commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quickfix add reference position error on macro

4 participants