Skip to content

Commit e13a701

Browse files
committed
Redefine Debug instead of importing it
This reverts commit 7e2548f. Now I know why it was redefined: it seems like it's potentially because of the orphan rule. Here are the error messages: error[E0119]: conflicting implementations of trait `std::fmt::Debug` for type `!`: --> src/primitive_docs.rs:236:1 | 6 | impl Debug for ! { | ^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: - impl std::fmt::Debug for !; error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> src/primitive_docs.rs:236:1 | 6 | impl Debug for ! { | ^^^^^^^^^^^^^^^- | | | | | `!` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead
1 parent 37ea97c commit e13a701

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

library/std/src/primitive_docs.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,10 @@ mod prim_bool {}
233233
///
234234
/// ```
235235
/// #![feature(never_type)]
236-
/// # use std::fmt::{self, Debug};
236+
/// # use std::fmt;
237+
/// # trait Debug {
238+
/// # fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result;
239+
/// # }
237240
/// impl Debug for ! {
238241
/// fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
239242
/// *self

0 commit comments

Comments
 (0)