-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
E0277 should put emphasis on containing function's return type #63078
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.F-on_unimplementedError messages that can be tackled with `#[rustc_on_unimplemented]`Error messages that can be tackled with `#[rustc_on_unimplemented]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.F-on_unimplementedError messages that can be tackled with `#[rustc_on_unimplemented]`Error messages that can be tackled with `#[rustc_on_unimplemented]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I got the following error today:
I was confused for a minute as I misinterpreted what the error was saying. I double-checked that
reqwest::getdoes indeed return aResultbut a moment later I realized that it's the function that's containingreqwest::getI should be looking at which indeed did return()after which I fixed the issue.I believe this error message could be somehow improved and/or worded differently to put more stress on the containing function - after all, that's what I should've looked at (maybe the containing function should be even shown in the error message like
reqwest::getis?) though I can see how it can not always be the case. However, I do still think both the containing method's return type and thereqwest::getcall should be highlighted for the best experience and to easily allow a full understanding of what's happening.