about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLucas Henry <lucas.henry@enseirb-matmeca.fr>2019-10-17 19:15:42 +0200
committerLucas Henry <lucas.henry@enseirb-matmeca.fr>2019-10-17 19:15:42 +0200
commitb9bca1800219b908049a5cfb7cafc0322439f9a8 (patch)
tree9ed36ef7733ce92ab2cb4b0f55ee5e5aeb792bb3
parenta16dca337de610986252bb800953e57bf395863f (diff)
downloadrust-b9bca1800219b908049a5cfb7cafc0322439f9a8.tar.gz
rust-b9bca1800219b908049a5cfb7cafc0322439f9a8.zip
Replaced warn attibute by deny
-rw-r--r--src/test/ui/lint/unused_parens_json_suggestion.fixed5
-rw-r--r--src/test/ui/lint/unused_parens_json_suggestion.rs5
-rw-r--r--src/test/ui/lint/unused_parens_json_suggestion.stderr50
3 files changed, 34 insertions, 26 deletions
diff --git a/src/test/ui/lint/unused_parens_json_suggestion.fixed b/src/test/ui/lint/unused_parens_json_suggestion.fixed
index 42740711910..7a2d9ecdc36 100644
--- a/src/test/ui/lint/unused_parens_json_suggestion.fixed
+++ b/src/test/ui/lint/unused_parens_json_suggestion.fixed
@@ -1,5 +1,4 @@
 // compile-flags: --error-format pretty-json -Zunstable-options
-// build-pass (FIXME(62277): could be check-pass?)
 // run-rustfix
 
 // The output for humans should just highlight the whole span without showing
@@ -8,13 +7,13 @@
 // stripping away any starting or ending parenthesis characters—hence this
 // test of the JSON error format.
 
-#![warn(unused_parens)]
+#![deny(unused_parens)]
 #![allow(unreachable_code)]
 
 fn main() {
     // We want to suggest the properly-balanced expression `1 / (2 + 3)`, not
     // the malformed `1 / (2 + 3`
-    let _a = 1 / (2 + 3);
+    let _a = 1 / (2 + 3); //~ERROR unused parentheses wrap expression
     f();
 }
 
diff --git a/src/test/ui/lint/unused_parens_json_suggestion.rs b/src/test/ui/lint/unused_parens_json_suggestion.rs
index 87192503986..bfc649ad99c 100644
--- a/src/test/ui/lint/unused_parens_json_suggestion.rs
+++ b/src/test/ui/lint/unused_parens_json_suggestion.rs
@@ -1,5 +1,4 @@
 // compile-flags: --error-format pretty-json -Zunstable-options
-// build-pass (FIXME(62277): could be check-pass?)
 // run-rustfix
 
 // The output for humans should just highlight the whole span without showing
@@ -8,13 +7,13 @@
 // stripping away any starting or ending parenthesis characters—hence this
 // test of the JSON error format.
 
-#![warn(unused_parens)]
+#![deny(unused_parens)]
 #![allow(unreachable_code)]
 
 fn main() {
     // We want to suggest the properly-balanced expression `1 / (2 + 3)`, not
     // the malformed `1 / (2 + 3`
-    let _a = (1 / (2 + 3));
+    let _a = (1 / (2 + 3)); //~ERROR unused parentheses wrap expression
     f();
 }
 
diff --git a/src/test/ui/lint/unused_parens_json_suggestion.stderr b/src/test/ui/lint/unused_parens_json_suggestion.stderr
index 256c7555c90..54baade36e6 100644
--- a/src/test/ui/lint/unused_parens_json_suggestion.stderr
+++ b/src/test/ui/lint/unused_parens_json_suggestion.stderr
@@ -4,20 +4,20 @@
     "code": "unused_parens",
     "explanation": null
   },
-  "level": "warning",
+  "level": "error",
   "spans": [
     {
       "file_name": "$DIR/unused_parens_json_suggestion.rs",
-      "byte_start": 654,
-      "byte_end": 667,
-      "line_start": 17,
-      "line_end": 17,
+      "byte_start": 603,
+      "byte_end": 616,
+      "line_start": 16,
+      "line_end": 16,
       "column_start": 14,
       "column_end": 27,
       "is_primary": true,
       "text": [
         {
-          "text": "    let _a = (1 / (2 + 3));",
+          "text": "    let _a = (1 / (2 + 3));
           "highlight_start": 14,
           "highlight_end": 27
         }
@@ -36,16 +36,16 @@
       "spans": [
         {
           "file_name": "$DIR/unused_parens_json_suggestion.rs",
-          "byte_start": 472,
-          "byte_end": 485,
-          "line_start": 11,
-          "line_end": 11,
+          "byte_start": 421,
+          "byte_end": 434,
+          "line_start": 10,
+          "line_end": 10,
           "column_start": 9,
           "column_end": 22,
           "is_primary": true,
           "text": [
             {
-              "text": "#![warn(unused_parens)]",
+              "text": "#![deny(unused_parens)]",
               "highlight_start": 9,
               "highlight_end": 22
             }
@@ -66,16 +66,16 @@
       "spans": [
         {
           "file_name": "$DIR/unused_parens_json_suggestion.rs",
-          "byte_start": 654,
-          "byte_end": 667,
-          "line_start": 17,
-          "line_end": 17,
+          "byte_start": 603,
+          "byte_end": 616,
+          "line_start": 16,
+          "line_end": 16,
           "column_start": 14,
           "column_end": 27,
           "is_primary": true,
           "text": [
             {
-              "text": "    let _a = (1 / (2 + 3));",
+              "text": "    let _a = (1 / (2 + 3));
               "highlight_start": 14,
               "highlight_end": 27
             }
@@ -90,17 +90,27 @@
       "rendered": null
     }
   ],
-  "rendered": "warning: unnecessary parentheses around assigned value
-  --> $DIR/unused_parens_json_suggestion.rs:17:14
+  "rendered": "error: unnecessary parentheses around assigned value
+  --> $DIR/unused_parens_json_suggestion.rs:16:14
    |
 LL |     let _a = (1 / (2 + 3));
    |              ^^^^^^^^^^^^^ help: remove these parentheses
    |
 note: lint level defined here
-  --> $DIR/unused_parens_json_suggestion.rs:11:9
+  --> $DIR/unused_parens_json_suggestion.rs:10:9
    |
-LL | #![warn(unused_parens)]
+LL | #![deny(unused_parens)]
    |         ^^^^^^^^^^^^^
 
 "
 }
+{
+  "message": "aborting due to previous error",
+  "code": null,
+  "level": "error",
+  "spans": [],
+  "children": [],
+  "rendered": "error: aborting due to previous error
+
+"
+}