about summary refs log tree commit diff
path: root/src/test/ui/pattern
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/pattern')
-rw-r--r--src/test/ui/pattern/pat-tuple-bad-type.rs4
-rw-r--r--src/test/ui/pattern/pat-tuple-bad-type.stderr11
-rw-r--r--src/test/ui/pattern/rest-pat-semantic-disallowed.stderr7
3 files changed, 14 insertions, 8 deletions
diff --git a/src/test/ui/pattern/pat-tuple-bad-type.rs b/src/test/ui/pattern/pat-tuple-bad-type.rs
index 01e793e8685..98481167a59 100644
--- a/src/test/ui/pattern/pat-tuple-bad-type.rs
+++ b/src/test/ui/pattern/pat-tuple-bad-type.rs
@@ -1,8 +1,8 @@
 fn main() {
-    let x;
+    let x; //~ ERROR type annotations needed
 
     match x {
-        (..) => {} //~ ERROR type annotations needed
+        (..) => {}
         _ => {}
     }
 
diff --git a/src/test/ui/pattern/pat-tuple-bad-type.stderr b/src/test/ui/pattern/pat-tuple-bad-type.stderr
index 598b6a3794e..11b28987848 100644
--- a/src/test/ui/pattern/pat-tuple-bad-type.stderr
+++ b/src/test/ui/pattern/pat-tuple-bad-type.stderr
@@ -1,13 +1,14 @@
 error[E0282]: type annotations needed
-  --> $DIR/pat-tuple-bad-type.rs:5:9
+  --> $DIR/pat-tuple-bad-type.rs:2:9
    |
 LL |     let x;
-   |         - consider giving `x` a type
-...
-LL |         (..) => {}
-   |         ^^^^ cannot infer type
+   |         ^
    |
    = note: type must be known at this point
+help: consider giving `x` an explicit type
+   |
+LL |     let x: _;
+   |          +++
 
 error[E0308]: mismatched types
   --> $DIR/pat-tuple-bad-type.rs:10:9
diff --git a/src/test/ui/pattern/rest-pat-semantic-disallowed.stderr b/src/test/ui/pattern/rest-pat-semantic-disallowed.stderr
index 06b6e80b44f..e6a4e5f19b7 100644
--- a/src/test/ui/pattern/rest-pat-semantic-disallowed.stderr
+++ b/src/test/ui/pattern/rest-pat-semantic-disallowed.stderr
@@ -189,7 +189,12 @@ error[E0282]: type annotations needed
   --> $DIR/rest-pat-semantic-disallowed.rs:33:9
    |
 LL |     let x @ ..;
-   |         ^^^^^^ consider giving this pattern a type
+   |         ^^^^^^
+   |
+help: consider giving this pattern a type
+   |
+LL |     let x @ ..: _;
+   |               +++
 
 error: aborting due to 23 previous errors