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
This commit is contained in:
committed by
Esteban Kuber
parent
862962b90e
commit
37a11a96a1
@@ -1,6 +1,8 @@
|
||||
fn main() {
|
||||
let mut x = 2;
|
||||
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
|
||||
//~| expected integer, found floating-point number
|
||||
//~| NOTE expected integer, found floating-point number
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user