Skip to content

Commit 43b5dca

Browse files
author
Lucas Henry
committed
Replaced warn attribute by deny
1 parent b9bca18 commit 43b5dca

5 files changed

+152
-144
lines changed

src/test/ui/lint/unused_parens_json_suggestion.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
fn main() {
1414
// We want to suggest the properly-balanced expression `1 / (2 + 3)`, not
1515
// the malformed `1 / (2 + 3`
16-
let _a = 1 / (2 + 3); //~ERROR unused parentheses wrap expression
16+
let _a = 1 / (2 + 3); //~ERROR
1717
f();
1818
}
1919

src/test/ui/lint/unused_parens_json_suggestion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
fn main() {
1414
// We want to suggest the properly-balanced expression `1 / (2 + 3)`, not
1515
// the malformed `1 / (2 + 3`
16-
let _a = (1 / (2 + 3)); //~ERROR unused parentheses wrap expression
16+
let _a = (1 / (2 + 3)); //~ERROR
1717
f();
1818
}
1919

src/test/ui/lint/unused_parens_remove_json_suggestion.fixed

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// compile-flags: --error-format pretty-json -Zunstable-options
2-
// build-pass
32
// run-rustfix
43

54
// The output for humans should just highlight the whole span without showing
@@ -8,14 +7,14 @@
87
// stripping away any starting or ending parenthesis characters—hence this
98
// test of the JSON error format.
109

11-
#![warn(unused_parens)]
10+
#![deny(unused_parens)]
1211
#![allow(unreachable_code)]
1312

1413
fn main() {
1514

1615
let _b = false;
1716

18-
if _b {
17+
if _b { //~ ERROR
1918
println!("hello");
2019
}
2120

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

29-
if c {
28+
if c { //~ ERROR
3029
println!("next");
3130
}
3231

33-
if c {
32+
if c { //~ ERROR
3433
println!("prev");
3534
}
3635

3736
while false && true {
38-
if c {
37+
if c { //~ ERROR
3938
println!("norm");
4039
}
4140

4241
}
4342

44-
while true && false {
45-
for _ in 0 .. 3 {
43+
while true && false { //~ ERROR
44+
for _ in 0 .. 3 { //~ ERROR
4645
println!("e~")
4746
}
4847
}
4948

50-
for _ in 0 .. 3 {
51-
while true && false {
49+
for _ in 0 .. 3 { //~ ERROR
50+
while true && false { //~ ERROR
5251
println!("e~")
5352
}
5453
}

src/test/ui/lint/unused_parens_remove_json_suggestion.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// compile-flags: --error-format pretty-json -Zunstable-options
2-
// build-pass
32
// run-rustfix
43

54
// The output for humans should just highlight the whole span without showing
@@ -8,14 +7,14 @@
87
// stripping away any starting or ending parenthesis characters—hence this
98
// test of the JSON error format.
109

11-
#![warn(unused_parens)]
10+
#![deny(unused_parens)]
1211
#![allow(unreachable_code)]
1312

1413
fn main() {
1514

1615
let _b = false;
1716

18-
if (_b) {
17+
if (_b) { //~ ERROR
1918
println!("hello");
2019
}
2120

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

29-
if(c) {
28+
if(c) { //~ ERROR
3029
println!("next");
3130
}
3231

33-
if (c){
32+
if (c){ //~ ERROR
3433
println!("prev");
3534
}
3635

3736
while (false && true){
38-
if (c) {
37+
if (c) { //~ ERROR
3938
println!("norm");
4039
}
4140

4241
}
4342

44-
while(true && false) {
45-
for _ in (0 .. 3){
43+
while(true && false) { //~ ERROR
44+
for _ in (0 .. 3){ //~ ERROR
4645
println!("e~")
4746
}
4847
}
4948

50-
for _ in (0 .. 3) {
51-
while (true && false) {
49+
for _ in (0 .. 3) { //~ ERROR
50+
while (true && false) { //~ ERROR
5251
println!("e~")
5352
}
5453
}

0 commit comments

Comments
 (0)