Skip to content

Commit 103b261

Browse files
committed
Update more test to allow disallowed_names lint
1 parent dc0527e commit 103b261

File tree

91 files changed

+599
-530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+599
-530
lines changed

tests/ui-toml/await_holding_invalid_type/await_holding_invalid_type.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![warn(clippy::await_holding_invalid_type)]
2+
#![allow(clippy::disallowed_names)]
23
use std::net::Ipv4Addr;
34

45
async fn bad() -> u32 {

tests/ui-toml/await_holding_invalid_type/await_holding_invalid_type.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: holding a disallowed type across an await point `std::string::String`
2-
--> tests/ui-toml/await_holding_invalid_type/await_holding_invalid_type.rs:5:9
2+
--> tests/ui-toml/await_holding_invalid_type/await_holding_invalid_type.rs:6:9
33
|
44
LL | let _x = String::from("hello");
55
| ^^
@@ -9,13 +9,13 @@ LL | let _x = String::from("hello");
99
= help: to override `-D warnings` add `#[allow(clippy::await_holding_invalid_type)]`
1010

1111
error: holding a disallowed type across an await point `std::net::Ipv4Addr`
12-
--> tests/ui-toml/await_holding_invalid_type/await_holding_invalid_type.rs:11:9
12+
--> tests/ui-toml/await_holding_invalid_type/await_holding_invalid_type.rs:12:9
1313
|
1414
LL | let x = Ipv4Addr::new(127, 0, 0, 1);
1515
| ^
1616

1717
error: holding a disallowed type across an await point `std::string::String`
18-
--> tests/ui-toml/await_holding_invalid_type/await_holding_invalid_type.rs:35:13
18+
--> tests/ui-toml/await_holding_invalid_type/await_holding_invalid_type.rs:36:13
1919
|
2020
LL | let _x = String::from("hi!");
2121
| ^^

tests/ui-toml/dbg_macro/dbg_macro.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@compile-flags: --test
22
#![warn(clippy::dbg_macro)]
3-
#![allow(clippy::unnecessary_operation, clippy::no_effect)]
3+
#![allow(clippy::unnecessary_operation, clippy::no_effect, clippy::disallowed_names)]
44

55
fn foo(n: u32) -> u32 {
66
if let Some(n) = n.checked_sub(4) { n } else { n }

tests/ui-toml/dbg_macro/dbg_macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@compile-flags: --test
22
#![warn(clippy::dbg_macro)]
3-
#![allow(clippy::unnecessary_operation, clippy::no_effect)]
3+
#![allow(clippy::unnecessary_operation, clippy::no_effect, clippy::disallowed_names)]
44

55
fn foo(n: u32) -> u32 {
66
if let Some(n) = dbg!(n.checked_sub(4)) { n } else { n }

tests/ui-toml/print_macro/print_macro.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@compile-flags: --test
22
#![warn(clippy::print_stdout)]
33
#![warn(clippy::print_stderr)]
4+
#![allow(clippy::disallowed_names)]
45

56
fn foo(n: u32) {
67
print!("{n}");

tests/ui-toml/print_macro/print_macro.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: use of `print!`
2-
--> tests/ui-toml/print_macro/print_macro.rs:6:5
2+
--> tests/ui-toml/print_macro/print_macro.rs:7:5
33
|
44
LL | print!("{n}");
55
| ^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | print!("{n}");
88
= help: to override `-D warnings` add `#[allow(clippy::print_stdout)]`
99

1010
error: use of `eprint!`
11-
--> tests/ui-toml/print_macro/print_macro.rs:8:5
11+
--> tests/ui-toml/print_macro/print_macro.rs:9:5
1212
|
1313
LL | eprint!("{n}");
1414
| ^^^^^^^^^^^^^^

tests/ui-toml/renamed_function_params/renamed_function_params.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//@[default] rustc-env:CLIPPY_CONF_DIR=tests/ui-toml/renamed_function_params/default
44
//@[extend] rustc-env:CLIPPY_CONF_DIR=tests/ui-toml/renamed_function_params/extend
55
#![warn(clippy::renamed_function_params)]
6-
#![allow(clippy::partialeq_ne_impl, clippy::to_string_trait_impl)]
6+
#![allow(clippy::disallowed_names, clippy::partialeq_ne_impl, clippy::to_string_trait_impl)]
77
#![allow(unused)]
88

99
use std::hash::{Hash, Hasher};

0 commit comments

Comments
 (0)