]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/parser/issue-88276-unary-plus.rs
Use verbose suggestions and only match if the + is seen before a numeric literal
[rust.git] / src / test / ui / parser / issue-88276-unary-plus.rs
index a72dad4dc71989a55ad078e54a4407a5f61e7bfe..11b2e9d601653f9f02b1f5d5c2e5c330ae2e3eb3 100644 (file)
@@ -2,12 +2,7 @@
 #[allow(unused_parens)]
 fn main() {
     let _ = +1; //~ ERROR leading `+` is not supported
-    let _ = -+(1+2)*3; //~ ERROR leading `+` is not supported
-    let _ = -+-+(1+2)*3; //~ ERROR leading `+` is not supported
-                         //~| ERROR leading `+` is not supported
-    let _ = (1 + +2) * +3; //~ ERROR leading `+` is not supported
+    let _ = (1.0 + +2.0) * +3.0; //~ ERROR leading `+` is not supported
                            //~| ERROR leading `+` is not supported
-    let _ = (+&"hello"); //~ ERROR leading `+` is not supported
-    let _ = +[+3, 4+6]; //~ ERROR leading `+` is not supported
-                        //~| ERROR leading `+` is not supported
+    let _ = [+3, 4+6]; //~ ERROR leading `+` is not supported
 }