diagnostics: rustc displays confusing Ok(#[stable(feature = "rust1", since = "1.0.0")] T) if wrong match binding is used #74673
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
If I have a function that returns
Result<(), i32>
and try to match on it withOk()
instead ofOk(())
orOk(_)
, I get an error:The
Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
comes fromstd
but I think it can look very confusing to beginners, a simpleOk(T)
would be much clearer here imo.code:
The text was updated successfully, but these errors were encountered: