summary refs log tree commit diff
path: root/src/test/ui/parser
diff options
context:
space:
mode:
authorNoah Lev <camelidcamel@gmail.com>2022-02-17 16:22:45 -0800
committerNoah Lev <camelidcamel@gmail.com>2022-03-23 22:31:57 -0700
commit713a11b9197d2b4d1a02fabfe04fe6446c5da292 (patch)
tree6850066f9d39b492ce7708fa337f00bd0c5b2012 /src/test/ui/parser
parent073010d425d7b6ff5e79fd41f209e4915daa6066 (diff)
downloadrust-713a11b9197d2b4d1a02fabfe04fe6446c5da292.tar.gz
rust-713a11b9197d2b4d1a02fabfe04fe6446c5da292.zip
Bless tests
Diffstat (limited to 'src/test/ui/parser')
-rw-r--r--src/test/ui/parser/issues/issue-88276-unary-plus.stderr14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/test/ui/parser/issues/issue-88276-unary-plus.stderr b/src/test/ui/parser/issues/issue-88276-unary-plus.stderr
index b26761729a8..e65bac2c5cc 100644
--- a/src/test/ui/parser/issues/issue-88276-unary-plus.stderr
+++ b/src/test/ui/parser/issues/issue-88276-unary-plus.stderr
@@ -10,16 +10,20 @@ LL -     let _ = +1;
 LL +     let _ = 1;
    | 
 
-error: leading `+` is not supported
-  --> $DIR/issue-88276-unary-plus.rs:5:20
+error: Rust has no postfix increment operator
+  --> $DIR/issue-88276-unary-plus.rs:5:18
    |
 LL |     let _ = (1.0 + +2.0) * +3.0;
-   |                    ^ unexpected `+`
+   |                  ^^^ not a valid postfix operator
    |
-help: try removing the `+`
+help: use `+= 1` instead
+   |
+LL |     let _ = ({ let tmp = 1.0 ; 1.0 += 1; tmp }2.0) * +3.0;
+   |              +++++++++++     ~~~~~~~~~~~~~~~~~
+help: or, if you don't need to use it as an expression, change it to this
    |
 LL -     let _ = (1.0 + +2.0) * +3.0;
-LL +     let _ = (1.0 + 2.0) * +3.0;
+LL +     let _ = (1.0  += 12.0) * +3.0;
    | 
 
 error: leading `+` is not supported