Deny useing tool paths
This commit is contained in:
parent
1767585509
commit
ebde2ab363
5 changed files with 37 additions and 11 deletions
8
tests/ui/resolve/tool-import.rs
Normal file
8
tests/ui/resolve/tool-import.rs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// edition: 2018
|
||||
|
||||
use clippy::time::Instant;
|
||||
//~^ `clippy` is a tool module
|
||||
|
||||
fn main() {
|
||||
Instant::now();
|
||||
}
|
||||
9
tests/ui/resolve/tool-import.stderr
Normal file
9
tests/ui/resolve/tool-import.stderr
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
error[E0433]: failed to resolve: `clippy` is a tool module, not a module
|
||||
--> $DIR/tool-import.rs:3:5
|
||||
|
|
||||
LL | use clippy::time::Instant;
|
||||
| ^^^^^^ `clippy` is a tool module, not a module
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0433`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue