Skip to content

Commit c2c06f9

Browse files
matthiaskrgrgitbot
authored and
gitbot
committed
Rollup merge of rust-lang#134255 - bjoernager:master, r=Noratrieb
Update includes in `/library/core/src/error.rs`. This PR removes the `crate::fmt::Result` include in `/library/core/src/error.rs`. The main issue with this `use` statement is that it shadows the `Result` type from the prelude (i.e. `crate::result::Result`). This indirectly makes all docs references to `Result` in this module point to the wrong type (but only in `core::error` - not `std::error`, wherein this include isn't present to begin with). Fixes: rust-lang#134169
2 parents 1c0b879 + 70a1177 commit c2c06f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/error.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![stable(feature = "error_in_core", since = "1.81.0")]
33

44
use crate::any::TypeId;
5-
use crate::fmt::{Debug, Display, Formatter, Result};
5+
use crate::fmt::{self, Debug, Display, Formatter};
66

77
/// `Error` is a trait representing the basic expectations for error values,
88
/// i.e., values of type `E` in [`Result<T, E>`].
@@ -857,7 +857,7 @@ impl<'a> Request<'a> {
857857

858858
#[unstable(feature = "error_generic_member_access", issue = "99301")]
859859
impl<'a> Debug for Request<'a> {
860-
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
860+
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
861861
f.debug_struct("Request").finish_non_exhaustive()
862862
}
863863
}

0 commit comments

Comments
 (0)