Skip to content

Do not emit help when shorthand from macro when suggest ? or expect #141070

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

Merged
merged 3 commits into from
May 17, 2025

Conversation

xizheyin
Copy link
Contributor

Fixes #140659

I didn't fully minimize the original bug, but I found a similar test case, and they have perhaps the same root cause. For the bug mentioned in #140659 , I also tested it locally and passed it.

Jieyou has worked on this part before, maybe r? @jieyouxu

@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 May 16, 2025
@jieyouxu
Copy link
Member

r? chenyukang (since you're already looking at it, but I can take the review back if you're busy)

@rustbot rustbot assigned chenyukang and unassigned jieyouxu May 16, 2025
Comment on lines +47 to +48

for_each_operator!(translate)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I delete the unused comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I create tests/ui/typeck/suggestions/ amd move some testcases to it.

@chenyukang
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 16, 2025

📌 Commit 1c17324 has been approved by chenyukang

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-review Status: Awaiting review from the assignee but also interested parties. labels May 16, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request May 17, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#140208 (Make well-formedness predicates no longer coinductive)
 - rust-lang#140957 (Add `#[must_use]` to Array::map)
 - rust-lang#141031 (Async drop fix for dropee from another crate (rust-lang#140858))
 - rust-lang#141036 (ci: split the dist-ohos job)
 - rust-lang#141051 (Remove some unnecessary erases)
 - rust-lang#141056 (Lowercase git url for rust-lang/enzyme.git)
 - rust-lang#141059 (HIR: explain in comment why `ExprKind::If` "then" is an `Expr`)
 - rust-lang#141070 (Do not emit help when shorthand from macro when suggest `?` or `expect`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 14f3ef9 into rust-lang:master May 17, 2025
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 17, 2025
Rollup merge of rust-lang#141070 - xizheyin:issue-140659, r=chenyukang

Do not emit help when shorthand from macro when suggest `?` or `expect`

Fixes rust-lang#140659

I didn't fully minimize the original bug, but I found a similar test case, and they have perhaps the same root cause. For the bug mentioned in rust-lang#140659 , I also tested it locally and passed it.

Jieyou has worked on this part before, maybe r? `@jieyouxu`
@rustbot rustbot added this to the 1.89.0 milestone May 17, 2025
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.

Malformed suggestion for E0308 when macros are involved
5 participants