Skip to content

Conversation

chenyukang
Copy link
Member

@chenyukang chenyukang commented Aug 31, 2025

Fixes #146008

I think it's ok to suggest method name even when the return ty mismatch, since we only reporting in Applicability::MaybeIncorrect, user may add () and continue to fix following errors.

r? @estebank

@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 Aug 31, 2025
@estebank
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 31, 2025

📌 Commit 263766b 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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 31, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 31, 2025
…s-for-ret-ty-error, r=estebank

Suggest method name with maybe ty mismatch

Fixes rust-lang#146008

I think it's ok to suggest method name even when the return ty mismatch, since we only reporting in `Applicability::MaybeIncorrect`, user may add `()` and continue to fix following errors.

r? `@estebank`
bors added a commit that referenced this pull request Aug 31, 2025
Rollup of 3 pull requests

Successful merges:

 - #145968 (Add `Bound::copied`)
 - #146046 (Suggest method name with maybe ty mismatch)
 - #146051 (Change std f32 test to pass under Miri)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Sep 1, 2025
Rollup of 6 pull requests

Successful merges:

 - #145421 (`dump_mir` cleanups)
 - #145968 (Add `Bound::copied`)
 - #146004 (resolve: Refactor `struct ExternPreludeEntry`)
 - #146042 (Detect negative literal inferred to unsigned integer)
 - #146046 (Suggest method name with maybe ty mismatch)
 - #146051 (Change std f32 test to pass under Miri)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit eed5259 into rust-lang:master Sep 1, 2025
10 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Sep 1, 2025
rust-timer added a commit that referenced this pull request Sep 1, 2025
Rollup merge of #146046 - chenyukang:yukang-fix-method-exists-for-ret-ty-error, r=estebank

Suggest method name with maybe ty mismatch

Fixes #146008

I think it's ok to suggest method name even when the return ty mismatch, since we only reporting in `Applicability::MaybeIncorrect`, user may add `()` and continue to fix following errors.

r? ```@estebank```
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.

Taking the reference of a method has bad error messages
4 participants