Skip to content

Commit

Permalink
Replaced warn attribute by deny
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Henry committed Oct 17, 2019
1 parent b9bca18 commit 43b5dca
Show file tree
Hide file tree
Showing 5 changed files with 152 additions and 144 deletions.
2 changes: 1 addition & 1 deletion src/test/ui/lint/unused_parens_json_suggestion.fixed
Expand Up @@ -13,7 +13,7 @@
fn main() {
// We want to suggest the properly-balanced expression `1 / (2 + 3)`, not
// the malformed `1 / (2 + 3`
let _a = 1 / (2 + 3); //~ERROR unused parentheses wrap expression
let _a = 1 / (2 + 3); //~ERROR
f();
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/lint/unused_parens_json_suggestion.rs
Expand Up @@ -13,7 +13,7 @@
fn main() {
// We want to suggest the properly-balanced expression `1 / (2 + 3)`, not
// the malformed `1 / (2 + 3`
let _a = (1 / (2 + 3)); //~ERROR unused parentheses wrap expression
let _a = (1 / (2 + 3)); //~ERROR
f();
}

Expand Down
19 changes: 9 additions & 10 deletions src/test/ui/lint/unused_parens_remove_json_suggestion.fixed
@@ -1,5 +1,4 @@
// compile-flags: --error-format pretty-json -Zunstable-options
// build-pass
// run-rustfix

// The output for humans should just highlight the whole span without showing
Expand All @@ -8,14 +7,14 @@
// 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() {

let _b = false;

if _b {
if _b { //~ ERROR
println!("hello");
}

Expand All @@ -26,29 +25,29 @@ fn main() {
fn f() -> bool {
let c = false;

if c {
if c { //~ ERROR
println!("next");
}

if c {
if c { //~ ERROR
println!("prev");
}

while false && true {
if c {
if c { //~ ERROR
println!("norm");
}

}

while true && false {
for _ in 0 .. 3 {
while true && false { //~ ERROR
for _ in 0 .. 3 { //~ ERROR
println!("e~")
}
}

for _ in 0 .. 3 {
while true && false {
for _ in 0 .. 3 { //~ ERROR
while true && false { //~ ERROR
println!("e~")
}
}
Expand Down
19 changes: 9 additions & 10 deletions src/test/ui/lint/unused_parens_remove_json_suggestion.rs
@@ -1,5 +1,4 @@
// compile-flags: --error-format pretty-json -Zunstable-options
// build-pass
// run-rustfix

// The output for humans should just highlight the whole span without showing
Expand All @@ -8,14 +7,14 @@
// 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() {

let _b = false;

if (_b) {
if (_b) { //~ ERROR
println!("hello");
}

Expand All @@ -26,29 +25,29 @@ fn main() {
fn f() -> bool {
let c = false;

if(c) {
if(c) { //~ ERROR
println!("next");
}

if (c){
if (c){ //~ ERROR
println!("prev");
}

while (false && true){
if (c) {
if (c) { //~ ERROR
println!("norm");
}

}

while(true && false) {
for _ in (0 .. 3){
while(true && false) { //~ ERROR
for _ in (0 .. 3){ //~ ERROR
println!("e~")
}
}

for _ in (0 .. 3) {
while (true && false) {
for _ in (0 .. 3) { //~ ERROR
while (true && false) { //~ ERROR
println!("e~")
}
}
Expand Down

0 comments on commit 43b5dca

Please sign in to comment.