Skip to content

Commit d82c13c

Browse files
committed
fix clippy tests
1 parent 33038f6 commit d82c13c

179 files changed

Lines changed: 416 additions & 383 deletions

File tree

Some content is hidden

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

src/tools/clippy/tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![warn(clippy::arithmetic_side_effects)]
2-
#![allow(clippy::unnecessary_literal_unwrap)]
2+
#![allow(clippy::unnecessary_literal_unwrap, todo_macro_calls)]
33

44
use core::ops::{Add, Neg};
55

src/tools/clippy/tests/ui-toml/collapsible_if/collapsible_else_if.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(clippy::eq_op, clippy::nonminimal_bool)]
1+
#![allow(clippy::eq_op, clippy::nonminimal_bool, todo_macro_calls)]
22
#![warn(clippy::collapsible_else_if)]
33

44
#[rustfmt::skip]

src/tools/clippy/tests/ui-toml/collapsible_if/collapsible_else_if.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(clippy::eq_op, clippy::nonminimal_bool)]
1+
#![allow(clippy::eq_op, clippy::nonminimal_bool, todo_macro_calls)]
22
#![warn(clippy::collapsible_else_if)]
33

44
#[rustfmt::skip]

src/tools/clippy/tests/ui-toml/result_large_err/result_large_err.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@compile-flags: --crate-name result_large_err
22
#![warn(clippy::result_large_err)]
3-
#![allow(clippy::large_enum_variant)]
3+
#![allow(clippy::large_enum_variant, todo_macro_calls)]
44

55
fn f() -> Result<(), [u8; 511]> {
66
todo!()

src/tools/clippy/tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(todo_macro_calls)]
12
#![warn(clippy::disallowed_types)]
23

34
extern crate quote;

src/tools/clippy/tests/ui-toml/toml_disallowed_types/conf_disallowed_types.stderr

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: use of a disallowed type `std::sync::atomic::AtomicU32`
2-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:7:1
2+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:8:1
33
|
44
LL | use std::sync::atomic::AtomicU32;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -8,123 +8,123 @@ LL | use std::sync::atomic::AtomicU32;
88
= help: to override `-D warnings` add `#[allow(clippy::disallowed_types)]`
99

1010
error: use of a disallowed type `std::time::Instant`
11-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:9:1
11+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:10:1
1212
|
1313
LL | use std::time::Instant as Sneaky;
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1515

1616
error: use of a disallowed type `std::time::Instant`
17-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:14:33
17+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:15:33
1818
|
1919
LL | fn bad_return_type() -> fn() -> Sneaky {
2020
| ^^^^^^
2121

2222
error: use of a disallowed type `std::time::Instant`
23-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:19:28
23+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:20:28
2424
|
2525
LL | fn bad_arg_type(_: impl Fn(Sneaky) -> foo::atomic::AtomicU32) {}
2626
| ^^^^^^
2727

2828
error: use of a disallowed type `std::sync::atomic::AtomicU32`
29-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:19:39
29+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:20:39
3030
|
3131
LL | fn bad_arg_type(_: impl Fn(Sneaky) -> foo::atomic::AtomicU32) {}
3232
| ^^^^^^^^^^^^^^^^^^^^^^
3333

3434
error: use of a disallowed type `std::io::Read`
35-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:23:22
35+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:24:22
3636
|
3737
LL | fn trait_obj(_: &dyn std::io::Read) {}
3838
| ^^^^^^^^^^^^^
3939

4040
error: use of a disallowed type `usize`
41-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:26:33
41+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:27:33
4242
|
4343
LL | fn full_and_single_path_prim(_: usize, _: bool) {}
4444
| ^^^^^
4545

4646
error: use of a disallowed type `bool`
47-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:26:43
47+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:27:43
4848
|
4949
LL | fn full_and_single_path_prim(_: usize, _: bool) {}
5050
| ^^^^
5151

5252
error: use of a disallowed type `usize`
53-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:30:28
53+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:31:28
5454
|
5555
LL | fn const_generics<const C: usize>() {}
5656
| ^^^^^
5757

5858
error: use of a disallowed type `usize`
59-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:33:24
59+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:34:24
6060
|
6161
LL | struct GenArg<const U: usize>([u8; U]);
6262
| ^^^^^
6363

6464
error: use of a disallowed type `std::net::Ipv4Addr`
65-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:38:10
65+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:39:10
6666
|
6767
LL | fn ip(_: std::net::Ipv4Addr) {}
6868
| ^^^^^^^^^^^^^^^^^^
6969
|
7070
= note: no IPv4 allowed
7171

7272
error: use of a disallowed type `std::net::TcpListener`
73-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:41:16
73+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:42:16
7474
|
7575
LL | fn listener(_: std::net::TcpListener) {}
7676
| ^^^^^^^^^^^^^^^^^^^^^
7777

7878
error: use of a disallowed type `std::collections::HashMap`
79-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:46:48
79+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:47:48
8080
|
8181
LL | let _: std::collections::HashMap<(), ()> = std::collections::HashMap::new();
8282
| ^^^^^^^^^^^^^^^^^^^^^^^^^
8383

8484
error: use of a disallowed type `std::collections::HashMap`
85-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:46:12
85+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:47:12
8686
|
8787
LL | let _: std::collections::HashMap<(), ()> = std::collections::HashMap::new();
8888
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8989

9090
error: use of a disallowed type `std::time::Instant`
91-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:49:13
91+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:50:13
9292
|
9393
LL | let _ = Sneaky::now();
9494
| ^^^^^^
9595

9696
error: use of a disallowed type `std::sync::atomic::AtomicU32`
97-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:51:13
97+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:52:13
9898
|
9999
LL | let _ = foo::atomic::AtomicU32::new(0);
100100
| ^^^^^^^^^^^^^^^^^^^^^^
101101

102102
error: use of a disallowed type `std::sync::atomic::AtomicU32`
103-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:53:17
103+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:54:17
104104
|
105105
LL | static FOO: std::sync::atomic::AtomicU32 = foo::atomic::AtomicU32::new(1);
106106
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
107107

108108
error: use of a disallowed type `std::sync::atomic::AtomicU32`
109-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:53:48
109+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:54:48
110110
|
111111
LL | static FOO: std::sync::atomic::AtomicU32 = foo::atomic::AtomicU32::new(1);
112112
| ^^^^^^^^^^^^^^^^^^^^^^
113113

114114
error: use of a disallowed type `syn::TypePath`
115-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:56:43
115+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:57:43
116116
|
117117
LL | let _: std::collections::BTreeMap<(), syn::TypePath> = Default::default();
118118
| ^^^^^^^^^^^^^
119119

120120
error: use of a disallowed type `proc_macro2::Ident`
121-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:58:13
121+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:59:13
122122
|
123123
LL | let _ = syn::Ident::new("", todo!());
124124
| ^^^^^^^^^^
125125

126126
error: use of a disallowed type `usize`
127-
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:61:12
127+
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:62:12
128128
|
129129
LL | let _: usize = 64_usize;
130130
| ^^^^^

src/tools/clippy/tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
non_local_definitions,
1010
clippy::let_unit_value,
1111
clippy::missing_safety_doc
12-
)]
12+
, todo_macro_calls)]
1313

1414
extern crate proc_macro_unsafe;
1515

src/tools/clippy/tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(todo_macro_calls)]
12
#![warn(clippy::unnecessary_box_returns)]
23

34
fn f() -> [u8; 64] {

src/tools/clippy/tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(todo_macro_calls)]
12
#![warn(clippy::unnecessary_box_returns)]
23

34
fn f() -> Box<[u8; 64]> {

src/tools/clippy/tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: boxed return of the sized type `[u8; 64]`
2-
--> tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.rs:3:11
2+
--> tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.rs:4:11
33
|
44
LL | fn f() -> Box<[u8; 64]> {
55
| ^^^^^^^^^^^^^ help: try: `[u8; 64]`

0 commit comments

Comments
 (0)