Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarcho committed Jul 6, 2024
1 parent 149f0c5 commit e99594c
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,11 @@ error: consider bringing this path into scope with the `use` keyword
LL | let _: &std::path::Path = std::path::Path::new("");
| ^^^^^^^^^^^^^^^

error: aborting due to 5 previous errors
error: consider bringing this path into scope with the `use` keyword
--> tests/ui-toml/absolute_paths/absolute_paths.rs:43:13
|
LL | let _ = std::option::Option::None::<i32>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 6 previous errors

Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,5 @@ note: the lint level is defined here
LL | #![deny(clippy::absolute_paths)]
| ^^^^^^^^^^^^^^^^^^^^^^

error: consider bringing this path into scope with the `use` keyword
--> tests/ui-toml/absolute_paths/absolute_paths.rs:37:13
|
LL | let _ = ::core::clone::Clone::clone(&0i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors
error: aborting due to 1 previous error

22 changes: 17 additions & 5 deletions tests/ui-toml/absolute_paths/absolute_paths.default.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,40 @@ LL | let _ = ::core::clone::Clone::clone(&0i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: consider bringing this path into scope with the `use` keyword
--> tests/ui-toml/absolute_paths/absolute_paths.rs:62:17
--> tests/ui-toml/absolute_paths/absolute_paths.rs:40:13
|
LL | let _ = <i32 as core::clone::Clone>::clone(&0i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: consider bringing this path into scope with the `use` keyword
--> tests/ui-toml/absolute_paths/absolute_paths.rs:43:13
|
LL | let _ = std::option::Option::None::<i32>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: consider bringing this path into scope with the `use` keyword
--> tests/ui-toml/absolute_paths/absolute_paths.rs:64:17
|
LL | impl<T: core::cmp::Eq> core::fmt::Display for X<T>
| ^^^^^^^^^^^^^

error: consider bringing this path into scope with the `use` keyword
--> tests/ui-toml/absolute_paths/absolute_paths.rs:67:18
--> tests/ui-toml/absolute_paths/absolute_paths.rs:69:18
|
LL | where T: core::clone::Clone
| ^^^^^^^^^^^^^^^^^^

error: consider bringing this path into scope with the `use` keyword
--> tests/ui-toml/absolute_paths/absolute_paths.rs:62:32
--> tests/ui-toml/absolute_paths/absolute_paths.rs:64:32
|
LL | impl<T: core::cmp::Eq> core::fmt::Display for X<T>
| ^^^^^^^^^^^^^^^^^^

error: consider bringing this path into scope with the `use` keyword
--> tests/ui-toml/absolute_paths/absolute_paths.rs:113:5
--> tests/ui-toml/absolute_paths/absolute_paths.rs:115:5
|
LL | crate::m1::S
| ^^^^^^^^^^^^

error: aborting due to 10 previous errors
error: aborting due to 12 previous errors

28 changes: 20 additions & 8 deletions tests/ui-toml/absolute_paths/absolute_paths.no_short.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -41,46 +41,58 @@ LL | let _ = ::core::clone::Clone::clone(&0i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: consider bringing this path into scope with the `use` keyword
--> tests/ui-toml/absolute_paths/absolute_paths.rs:62:17
--> tests/ui-toml/absolute_paths/absolute_paths.rs:40:13
|
LL | let _ = <i32 as core::clone::Clone>::clone(&0i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: consider bringing this path into scope with the `use` keyword
--> tests/ui-toml/absolute_paths/absolute_paths.rs:43:13
|
LL | let _ = std::option::Option::None::<i32>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: consider bringing this path into scope with the `use` keyword
--> tests/ui-toml/absolute_paths/absolute_paths.rs:64:17
|
LL | impl<T: core::cmp::Eq> core::fmt::Display for X<T>
| ^^^^^^^^^^^^^

error: consider bringing this path into scope with the `use` keyword
--> tests/ui-toml/absolute_paths/absolute_paths.rs:67:18
--> tests/ui-toml/absolute_paths/absolute_paths.rs:69:18
|
LL | where T: core::clone::Clone
| ^^^^^^^^^^^^^^^^^^

error: consider bringing this path into scope with the `use` keyword
--> tests/ui-toml/absolute_paths/absolute_paths.rs:62:32
--> tests/ui-toml/absolute_paths/absolute_paths.rs:64:32
|
LL | impl<T: core::cmp::Eq> core::fmt::Display for X<T>
| ^^^^^^^^^^^^^^^^^^

error: consider bringing this path into scope with the `use` keyword
--> tests/ui-toml/absolute_paths/absolute_paths.rs:110:14
--> tests/ui-toml/absolute_paths/absolute_paths.rs:112:14
|
LL | pub const _: crate::S = {
| ^^^^^^^^

error: consider bringing this path into scope with the `use` keyword
--> tests/ui-toml/absolute_paths/absolute_paths.rs:111:9
--> tests/ui-toml/absolute_paths/absolute_paths.rs:113:9
|
LL | let crate::S = m1::S;
| ^^^^^^^^

error: consider bringing this path into scope with the `use` keyword
--> tests/ui-toml/absolute_paths/absolute_paths.rs:113:5
--> tests/ui-toml/absolute_paths/absolute_paths.rs:115:5
|
LL | crate::m1::S
| ^^^^^^^^^^^^

error: consider bringing this path into scope with the `use` keyword
--> tests/ui-toml/absolute_paths/absolute_paths.rs:119:14
--> tests/ui-toml/absolute_paths/absolute_paths.rs:121:14
|
LL | let _ = <crate::S as Clone>::clone(&m1::S);
| ^^^^^^^^

error: aborting due to 13 previous errors
error: aborting due to 15 previous errors

10 changes: 6 additions & 4 deletions tests/ui-toml/absolute_paths/absolute_paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ fn main() {
//~[no_short]| absolute_paths
//~[no_short]| absolute_paths

// Currently treated as four parts.
// Treated as having three parts.
let _ = ::core::clone::Clone::clone(&0i32);
//~[default]^ absolute_paths
//~[no_short]| absolute_paths
//~[allow_long]| absolute_paths

// FIXME: `path` in `<_ as path>` doesn't actually exist in the HIR tree
let _ = <i32 as core::clone::Clone>::clone(&0i32);
//~[default]^ absolute_paths
//~[no_short]| absolute_paths
let _ = std::option::Option::None::<i32>;
//~[default]^ absolute_paths
//~[no_short]| absolute_paths

{
// FIXME: macro calls should be checked.
Expand Down

0 comments on commit e99594c

Please sign in to comment.