Skip to content

Commit 81f8ecc

Browse files
committed
Refactor absolute_paths tests.
1 parent e56361f commit 81f8ecc

12 files changed

+300
-176
lines changed
Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,38 @@
11
error: consider bringing this path into scope with the `use` keyword
2-
--> tests/ui-toml/absolute_paths/absolute_paths.rs:40:5
2+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:14:13
33
|
4-
LL | std::f32::MAX;
5-
| ^^^^^^^^^^^^^
4+
LL | let _ = std::path::is_separator(' ');
5+
| ^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: `-D clippy::absolute-paths` implied by `-D warnings`
8-
= help: to override `-D warnings` add `#[allow(clippy::absolute_paths)]`
7+
note: the lint level is defined here
8+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:7:9
9+
|
10+
LL | #![deny(clippy::absolute_paths)]
11+
| ^^^^^^^^^^^^^^^^^^^^^^
12+
13+
error: consider bringing this path into scope with the `use` keyword
14+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:20:13
15+
|
16+
LL | let _ = ::std::path::MAIN_SEPARATOR;
17+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
918

1019
error: consider bringing this path into scope with the `use` keyword
11-
--> tests/ui-toml/absolute_paths/absolute_paths.rs:41:5
20+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:25:13
1221
|
13-
LL | core::f32::MAX;
14-
| ^^^^^^^^^^^^^^
22+
LL | let _ = std::collections::hash_map::HashMap::<i32, i32>::new();
23+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1524

1625
error: consider bringing this path into scope with the `use` keyword
17-
--> tests/ui-toml/absolute_paths/absolute_paths.rs:42:5
26+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:28:31
1827
|
19-
LL | ::core::f32::MAX;
20-
| ^^^^^^^^^^^^^^^^
28+
LL | let _: &std::path::Path = std::path::Path::new("");
29+
| ^^^^^^^^^^^^^^^
2130

2231
error: consider bringing this path into scope with the `use` keyword
23-
--> tests/ui-toml/absolute_paths/absolute_paths.rs:58:5
32+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:28:13
2433
|
25-
LL | ::std::f32::MAX;
26-
| ^^^^^^^^^^^^^^^
34+
LL | let _: &std::path::Path = std::path::Path::new("");
35+
| ^^^^^^^^^^^^^^^
2736

28-
error: aborting due to 4 previous errors
37+
error: aborting due to 5 previous errors
2938

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
error: consider bringing this path into scope with the `use` keyword
2+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:25:13
3+
|
4+
LL | let _ = std::collections::hash_map::HashMap::<i32, i32>::new();
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
note: the lint level is defined here
8+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:7:9
9+
|
10+
LL | #![deny(clippy::absolute_paths)]
11+
| ^^^^^^^^^^^^^^^^^^^^^^
12+
13+
error: consider bringing this path into scope with the `use` keyword
14+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:37:13
15+
|
16+
LL | let _ = ::core::clone::Clone::clone(&0i32);
17+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
18+
19+
error: aborting due to 2 previous errors
20+
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
error: consider bringing this path into scope with the `use` keyword
2+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:14:13
3+
|
4+
LL | let _ = std::path::is_separator(' ');
5+
| ^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
note: the lint level is defined here
8+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:7:9
9+
|
10+
LL | #![deny(clippy::absolute_paths)]
11+
| ^^^^^^^^^^^^^^^^^^^^^^
12+
13+
error: consider bringing this path into scope with the `use` keyword
14+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:20:13
15+
|
16+
LL | let _ = ::std::path::MAIN_SEPARATOR;
17+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
18+
19+
error: consider bringing this path into scope with the `use` keyword
20+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:25:13
21+
|
22+
LL | let _ = std::collections::hash_map::HashMap::<i32, i32>::new();
23+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24+
25+
error: consider bringing this path into scope with the `use` keyword
26+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:28:31
27+
|
28+
LL | let _: &std::path::Path = std::path::Path::new("");
29+
| ^^^^^^^^^^^^^^^
30+
31+
error: consider bringing this path into scope with the `use` keyword
32+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:28:13
33+
|
34+
LL | let _: &std::path::Path = std::path::Path::new("");
35+
| ^^^^^^^^^^^^^^^
36+
37+
error: consider bringing this path into scope with the `use` keyword
38+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:37:13
39+
|
40+
LL | let _ = ::core::clone::Clone::clone(&0i32);
41+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
42+
43+
error: consider bringing this path into scope with the `use` keyword
44+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:62:17
45+
|
46+
LL | impl<T: core::cmp::Eq> core::fmt::Display for X<T>
47+
| ^^^^^^^^^^^^^
48+
49+
error: consider bringing this path into scope with the `use` keyword
50+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:67:18
51+
|
52+
LL | where T: core::clone::Clone
53+
| ^^^^^^^^^^^^^^^^^^
54+
55+
error: consider bringing this path into scope with the `use` keyword
56+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:62:32
57+
|
58+
LL | impl<T: core::cmp::Eq> core::fmt::Display for X<T>
59+
| ^^^^^^^^^^^^^^^^^^
60+
61+
error: consider bringing this path into scope with the `use` keyword
62+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:113:5
63+
|
64+
LL | crate::m1::S
65+
| ^^^^^^^^^^^^
66+
67+
error: aborting due to 10 previous errors
68+

tests/ui-toml/absolute_paths/absolute_paths.disallow_crates.stderr

Lines changed: 0 additions & 71 deletions
This file was deleted.
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
error: consider bringing this path into scope with the `use` keyword
2+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:14:13
3+
|
4+
LL | let _ = std::path::is_separator(' ');
5+
| ^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
note: the lint level is defined here
8+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:7:9
9+
|
10+
LL | #![deny(clippy::absolute_paths)]
11+
| ^^^^^^^^^^^^^^^^^^^^^^
12+
13+
error: consider bringing this path into scope with the `use` keyword
14+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:20:13
15+
|
16+
LL | let _ = ::std::path::MAIN_SEPARATOR;
17+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
18+
19+
error: consider bringing this path into scope with the `use` keyword
20+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:25:13
21+
|
22+
LL | let _ = std::collections::hash_map::HashMap::<i32, i32>::new();
23+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24+
25+
error: consider bringing this path into scope with the `use` keyword
26+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:28:31
27+
|
28+
LL | let _: &std::path::Path = std::path::Path::new("");
29+
| ^^^^^^^^^^^^^^^
30+
31+
error: consider bringing this path into scope with the `use` keyword
32+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:28:13
33+
|
34+
LL | let _: &std::path::Path = std::path::Path::new("");
35+
| ^^^^^^^^^^^^^^^
36+
37+
error: consider bringing this path into scope with the `use` keyword
38+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:37:13
39+
|
40+
LL | let _ = ::core::clone::Clone::clone(&0i32);
41+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
42+
43+
error: consider bringing this path into scope with the `use` keyword
44+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:62:17
45+
|
46+
LL | impl<T: core::cmp::Eq> core::fmt::Display for X<T>
47+
| ^^^^^^^^^^^^^
48+
49+
error: consider bringing this path into scope with the `use` keyword
50+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:67:18
51+
|
52+
LL | where T: core::clone::Clone
53+
| ^^^^^^^^^^^^^^^^^^
54+
55+
error: consider bringing this path into scope with the `use` keyword
56+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:62:32
57+
|
58+
LL | impl<T: core::cmp::Eq> core::fmt::Display for X<T>
59+
| ^^^^^^^^^^^^^^^^^^
60+
61+
error: consider bringing this path into scope with the `use` keyword
62+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:110:14
63+
|
64+
LL | pub const _: crate::S = {
65+
| ^^^^^^^^
66+
67+
error: consider bringing this path into scope with the `use` keyword
68+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:111:9
69+
|
70+
LL | let crate::S = m1::S;
71+
| ^^^^^^^^
72+
73+
error: consider bringing this path into scope with the `use` keyword
74+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:113:5
75+
|
76+
LL | crate::m1::S
77+
| ^^^^^^^^^^^^
78+
79+
error: consider bringing this path into scope with the `use` keyword
80+
--> tests/ui-toml/absolute_paths/absolute_paths.rs:119:14
81+
|
82+
LL | let _ = <crate::S as Clone>::clone(&m1::S);
83+
| ^^^^^^^^
84+
85+
error: aborting due to 13 previous errors
86+

0 commit comments

Comments
 (0)