about summary refs log tree commit diff
path: root/src/test/ui/integral-variable-unification-error.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2021-05-06 19:09:35 -0700
committerEsteban Kuber <esteban@kuber.com.ar>2021-11-25 18:04:33 +0000
commit37a11a96a1b3ad68c40cc293270cf8ffbe7904de (patch)
tree1247cf8878724a5f024a4c156055102641559d01 /src/test/ui/integral-variable-unification-error.rs
parent862962b90e59c5c1e217df74de80d3a81eee42f4 (diff)
downloadrust-37a11a96a1b3ad68c40cc293270cf8ffbe7904de.tar.gz
rust-37a11a96a1b3ad68c40cc293270cf8ffbe7904de.zip
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
Diffstat (limited to 'src/test/ui/integral-variable-unification-error.rs')
-rw-r--r--src/test/ui/integral-variable-unification-error.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/ui/integral-variable-unification-error.rs b/src/test/ui/integral-variable-unification-error.rs
index 5200b4a829d..8d1621321e8 100644
--- a/src/test/ui/integral-variable-unification-error.rs
+++ b/src/test/ui/integral-variable-unification-error.rs
@@ -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
 }