rust/src/test/ui/integral-variable-unification-error.rs
Esteban Küber 37a11a96a1 On type mismatch caused by assignment, point at assignee
* Do not emit unnecessary E0308 after E0070
* Show fewer errors on `while let` missing `let`
* Hide redundant E0308 on `while let` missing `let`
* Point at binding definition when possible on invalid assignment
* do not point at closure twice
* do not suggest `if let` for literals in lhs
* account for parameter types
2021-11-25 18:04:33 +00:00

9 lines
240 B
Rust

fn main() {
let mut x //~ NOTE expected due to the type of this binding
=
2; //~ NOTE expected due to this value
x = 5.0;
//~^ ERROR mismatched types
//~| NOTE expected integer, found floating-point number
}