about summary refs log tree commit diff
path: root/src/test/ui/parser
diff options
context:
space:
mode:
authormibac138 <5672750+mibac138@users.noreply.github.com>2020-05-20 22:09:03 +0200
committermibac138 <5672750+mibac138@users.noreply.github.com>2020-05-21 20:08:26 +0200
commit98532a30901d7544c49fe82f499db53699645de0 (patch)
treee4607dd767d7ead3a531d4cc772cc7001930c507 /src/test/ui/parser
parent6ad24baf06c687517f188e8c6e6ce848924d001c (diff)
Adjust according to petrochenkov's review comments
Diffstat (limited to 'src/test/ui/parser')
-rw-r--r--src/test/ui/parser/let-binop-plus.rs8
-rw-r--r--src/test/ui/parser/let-binop-plus.stderr16
-rw-r--r--src/test/ui/parser/let-binop.stderr29
3 files changed, 5 insertions, 48 deletions
diff --git a/src/test/ui/parser/let-binop-plus.rs b/src/test/ui/parser/let-binop-plus.rs
deleted file mode 100644
index 4d6d9b5c8d3..00000000000
--- a/src/test/ui/parser/let-binop-plus.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-#![allow(bare_trait_objects)]
-
-fn main() {
-    let a: i8 += 1;
-    //~^ ERROR expected trait, found builtin type `i8`
-    //~| ERROR can't reassign to an uninitialized variable
-    let _ = a;
-}
diff --git a/src/test/ui/parser/let-binop-plus.stderr b/src/test/ui/parser/let-binop-plus.stderr
deleted file mode 100644
index 91a59fe24fe..00000000000
--- a/src/test/ui/parser/let-binop-plus.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error[E0067]: can't reassign to an uninitialized variable
-  --> $DIR/let-binop-plus.rs:4:16
-   |
-LL |     let a: i8 += 1;
-   |                ^ help: initialize the variable
-
-error[E0404]: expected trait, found builtin type `i8`
-  --> $DIR/let-binop-plus.rs:4:12
-   |
-LL |     let a: i8 += 1;
-   |            ^^ not a trait
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0067, E0404.
-For more information about an error, try `rustc --explain E0067`.
diff --git a/src/test/ui/parser/let-binop.stderr b/src/test/ui/parser/let-binop.stderr
index 8a90b7cf74a..71431499ac7 100644
--- a/src/test/ui/parser/let-binop.stderr
+++ b/src/test/ui/parser/let-binop.stderr
@@ -1,39 +1,20 @@
-error[E0067]: can't reassign to an uninitialized variable
+error: can't reassign to an uninitialized variable
   --> $DIR/let-binop.rs:2:15
    |
 LL |     let a: i8 *= 1;
    |               ^^ help: initialize the variable
 
-error[E0067]: can't reassign to an uninitialized variable
+error: can't reassign to an uninitialized variable
   --> $DIR/let-binop.rs:4:11
    |
 LL |     let b += 1;
-   |           ^^
-   |
-help: initialize the variable
-   |
-LL |     let b = 1;
-   |           ^
-help: otherwise, reassign to a previously initialized variable
-   |
-LL |     b += 1;
-   |    --
+   |           ^^ help: initialize the variable
 
-error[E0067]: can't reassign to an uninitialized variable
+error: can't reassign to an uninitialized variable
   --> $DIR/let-binop.rs:6:11
    |
 LL |     let c *= 1;
-   |           ^^
-   |
-help: initialize the variable
-   |
-LL |     let c = 1;
-   |           ^
-help: otherwise, reassign to a previously initialized variable
-   |
-LL |     c *= 1;
-   |    --
+   |           ^^ help: initialize the variable
 
 error: aborting due to 3 previous errors
 
-For more information about this error, try `rustc --explain E0067`.