File tree 3 files changed +10
-4
lines changed
src/tools/clippy/tests/ui
3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ fn std_instead_of_core() {
45
45
46
46
let _ = std::env!("PATH");
47
47
48
- // do not lint until `error_in_core` is stable
49
- use std::error::Error;
48
+ use core::error::Error;
49
+ //~^ ERROR: used import from `std` instead of `core`
50
50
51
51
// lint items re-exported from private modules, `core::iter::traits::iterator::Iterator`
52
52
use core::iter::Iterator;
Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ fn std_instead_of_core() {
45
45
46
46
let _ = std:: env!( "PATH" ) ;
47
47
48
- // do not lint until `error_in_core` is stable
49
48
use std:: error:: Error ;
49
+ //~^ ERROR: used import from `std` instead of `core`
50
50
51
51
// lint items re-exported from private modules, `core::iter::traits::iterator::Iterator`
52
52
use std:: iter:: Iterator ;
Original file line number Diff line number Diff line change @@ -49,6 +49,12 @@ error: used import from `std` instead of `core`
49
49
LL | let cell_absolute = ::std::cell::Cell::new(8u32);
50
50
| ^^^ help: consider importing the item from `core`: `core`
51
51
52
+ error: used import from `std` instead of `core`
53
+ --> tests/ui/std_instead_of_core.rs:48:9
54
+ |
55
+ LL | use std::error::Error;
56
+ | ^^^ help: consider importing the item from `core`: `core`
57
+
52
58
error: used import from `std` instead of `core`
53
59
--> tests/ui/std_instead_of_core.rs:52:9
54
60
|
@@ -79,5 +85,5 @@ LL | use alloc::slice::from_ref;
79
85
= note: `-D clippy::alloc-instead-of-core` implied by `-D warnings`
80
86
= help: to override `-D warnings` add `#[allow(clippy::alloc_instead_of_core)]`
81
87
82
- error: aborting due to 12 previous errors
88
+ error: aborting due to 13 previous errors
83
89
You can’t perform that action at this time.
0 commit comments