Closed
Description
This code:
let x: i8 += 14;
gives the following error:
error[E0404]: expected trait, found builtin type `i8`
--> src/main.rs:5:12
|
5 | let x: i8 += 14;
| ^^ not a trait
warning: trait objects without an explicit `dyn` are deprecated
--> src/main.rs:5:12
|
5 | let x: i8 += 14;
| ^^^^ help: use `dyn`: `dyn i8 +`
|
= note: `#[warn(bare_trait_objects)]` on by default
error: aborting due to previous error
It's not clear or even close to what the actual problem is. I think it should throw the E0067 error code.
This issue has been assigned to @mibac138 via this comment.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: The lexing & parsing of Rust source code to an ASTCategory: An issue proposing an enhancement or a PR with one.Diagnostics: Confusing error or lint that should be reworked.Relevant to the compiler team, which will review and decide on the PR/issue.Working group: Diagnostics