E0206: Type mismatch
| Code | Category | Stability |
|---|---|---|
E0206 | Semantic | Permanent |
Explanation
An expression's type was incompatible with the type required by its surrounding context.
Likely cause
A return value, call argument, assignment, annotation, operator operand, or other expected-type position received a different concrete type without an allowed coercion.
Examples
Wrong return type
fn main() -> i32 {
true
}
Return the declared type
fn main() -> i32 {
0
}