Skip to content

Commit 8270341

Browse files
committed
fix tests
1 parent 3d82fa2 commit 8270341

File tree

13 files changed

+45
-2
lines changed

13 files changed

+45
-2
lines changed

tests/ui-cargo/use_crate_prefix_for_self_imports/fail/Cargo.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error: this import is not clear
2-
--> src/main.rs:1:5
2+
--> src/main.rs:3:5
33
|
4-
1 | use foo::Foo;
4+
3 | use foo::Foo;
55
| ^^^ help: prefix with `crate::`: `crate::foo`
66
|
77
= note: `-D clippy::use-crate-prefix-for-self-imports` implied by `-D warnings`

tests/ui-cargo/use_crate_prefix_for_self_imports/fail/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![warn(clippy::use_crate_prefix_for_self_imports)]
2+
13
use foo::Foo;
24

35
mod foo;

tests/ui-cargo/use_crate_prefix_for_self_imports/pass/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![warn(clippy::use_crate_prefix_for_self_imports)]
2+
13
use crate::foo::Foo;
24

35
mod foo;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[package]
2+
name = "pass_attribute"
3+
version = "0.1.0"
4+
edition = "2021"
5+
publish = false
6+
7+
[dependencies]
8+
9+
[features]
10+
default = ["bar"]
11+
bar = []
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub struct Foo;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#![warn(clippy::use_crate_prefix_for_self_imports)]
2+
3+
#[cfg(feature = "bar")]
4+
mod foo;
5+
#[cfg(feature = "bar")]
6+
pub use foo::Foo;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[package]
2+
name = "pass_attribute_2"
3+
version = "0.1.0"
4+
edition = "2021"
5+
publish = false
6+
7+
[dependencies]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub struct Foo;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#![warn(clippy::use_crate_prefix_for_self_imports)]
2+
3+
mod foo;
4+
#[doc(hidden)]
5+
pub use foo::Foo;

tests/ui-cargo/use_crate_prefix_for_self_imports/pass_sibling/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![warn(clippy::use_crate_prefix_for_self_imports)]
2+
13
mod foo;
24
use foo::Foo;
35

tests/ui-cargo/use_crate_prefix_for_self_imports/pass_sibling_2/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![warn(clippy::use_crate_prefix_for_self_imports)]
2+
13
use foo::Foo;
24
mod foo;
35

tests/ui-cargo/use_crate_prefix_for_self_imports/pass_sibling_3/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![warn(clippy::use_crate_prefix_for_self_imports)]
2+
13
mod foo;
24
pub use foo::{Bar, Foo};
35

tests/ui-cargo/use_crate_prefix_for_self_imports/pass_sibling_4/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![warn(clippy::use_crate_prefix_for_self_imports)]
2+
13
pub use foo::{Bar, Foo};
24
mod foo;
35

0 commit comments

Comments
 (0)