-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Suggest changing mains return type on E0277 (? / from_residual) #125997
Copy link
Copy link
Open
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.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.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.
Code
Current output
Desired output
To suggest changing
to
Rationale and extra context
In rust-lang/cargo#14007, concern was raised over people generating a trivial
fn main() {}withcargo newand copy/pasting example code that uses?(which is encouraged in API guidelines). Regardless of the decision made forcargo new, this applies just as well to users hand writing a trivialfn main() {}. These are likely new users who would be intimidated by the current message and wouldn't know what next steps to takeOther cases
No response
Rust Version
Anything else?
No response