Skip to content

Commit 6b2b871

Browse files
authored
Merge pull request #299 from quartiq/core
`std::fmt` -> `core::fmt`
2 parents 870d11b + ce974bc commit 6b2b871

File tree

11 files changed

+12
-12
lines changed

11 files changed

+12
-12
lines changed

build/probe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#![feature(error_generic_member_access)]
66

77
use std::error::{Error, Request};
8-
use std::fmt::{self, Debug, Display};
8+
use core::fmt::{self, Debug, Display};
99

1010
struct MyError(Thing);
1111
struct Thing;

src/aserror.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use std::error::Error;
2-
use std::panic::UnwindSafe;
2+
use core::panic::UnwindSafe;
33

44
#[doc(hidden)]
55
pub trait AsDynError<'a>: Sealed {

src/display.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::fmt::Display;
1+
use core::fmt::Display;
22
use std::path::{self, Path, PathBuf};
33

44
#[doc(hidden)]

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
//! which may be arbitrary expressions. For example:
6363
//!
6464
//! ```rust
65-
//! # use std::i32;
65+
//! # use core::i32;
6666
//! # use thiserror::Error;
6767
//! #
6868
//! #[derive(Error, Debug)]
@@ -129,7 +129,7 @@
129129
//! std::error::Error` will work as a source.
130130
//!
131131
//! ```rust
132-
//! # use std::fmt::{self, Display};
132+
//! # use core::fmt::{self, Display};
133133
//! # use thiserror::Error;
134134
//! #
135135
//! #[derive(Error, Debug)]

tests/test_display.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![allow(clippy::needless_raw_string_hashes, clippy::uninlined_format_args)]
22

3-
use std::fmt::{self, Display};
3+
use core::fmt::{self, Display};
44
use thiserror::Error;
55

66
fn assert<T: Display>(expected: &str, value: T) {

tests/test_error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![allow(dead_code)]
22

3-
use std::fmt::{self, Display};
3+
use core::fmt::{self, Display};
44
use std::io;
55
use thiserror::Error;
66

tests/test_expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![allow(clippy::iter_cloned_collect, clippy::uninlined_format_args)]
22

3-
use std::fmt::Display;
3+
use core::fmt::Display;
44
use thiserror::Error;
55

66
// Some of the elaborate cases from the rcc codebase, which is a C compiler in

tests/test_generics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![allow(clippy::needless_late_init, clippy::uninlined_format_args)]
22

3-
use std::fmt::{self, Debug, Display};
3+
use core::fmt::{self, Debug, Display};
44
use thiserror::Error;
55

66
pub struct NoFormat;

tests/test_path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
use core::fmt::Display;
12
use ref_cast::RefCast;
2-
use std::fmt::Display;
33
use std::path::{Path, PathBuf};
44
use thiserror::Error;
55

tests/ui/fallback-impl-with-display.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::fmt::{self, Display};
1+
use core::fmt::{self, Display};
22
use thiserror::Error;
33

44
#[derive(Error, Debug)]

tests/ui/lifetime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::fmt::Debug;
1+
use core::fmt::Debug;
22
use thiserror::Error;
33

44
#[derive(Error, Debug)]

0 commit comments

Comments
 (0)