Skip to content

Commit f275ca0

Browse files
committed
bless std_instead_of_core
1 parent c6f1934 commit f275ca0

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

src/tools/clippy/tests/ui/std_instead_of_core.fixed

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ fn std_instead_of_core() {
4545

4646
let _ = std::env!("PATH");
4747

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`
5050

5151
// lint items re-exported from private modules, `core::iter::traits::iterator::Iterator`
5252
use core::iter::Iterator;

src/tools/clippy/tests/ui/std_instead_of_core.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ fn std_instead_of_core() {
4545

4646
let _ = std::env!("PATH");
4747

48-
// do not lint until `error_in_core` is stable
4948
use std::error::Error;
49+
//~^ ERROR: used import from `std` instead of `core`
5050

5151
// lint items re-exported from private modules, `core::iter::traits::iterator::Iterator`
5252
use std::iter::Iterator;

src/tools/clippy/tests/ui/std_instead_of_core.stderr

+7-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ error: used import from `std` instead of `core`
4949
LL | let cell_absolute = ::std::cell::Cell::new(8u32);
5050
| ^^^ help: consider importing the item from `core`: `core`
5151

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+
5258
error: used import from `std` instead of `core`
5359
--> tests/ui/std_instead_of_core.rs:52:9
5460
|
@@ -79,5 +85,5 @@ LL | use alloc::slice::from_ref;
7985
= note: `-D clippy::alloc-instead-of-core` implied by `-D warnings`
8086
= help: to override `-D warnings` add `#[allow(clippy::alloc_instead_of_core)]`
8187

82-
error: aborting due to 12 previous errors
88+
error: aborting due to 13 previous errors
8389

0 commit comments

Comments
 (0)