Skip to content

Commit 0547847

Browse files
committed
simplify Safety pretty-printing
No need to customize the Debug impl any more
1 parent ddbb916 commit 0547847

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

crates/formality-prove/src/decls.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use std::fmt;
2-
31
use formality_core::{set, Set, Upcast};
42
use formality_macros::term;
53
use formality_types::grammar::{
@@ -144,23 +142,13 @@ pub struct NegImplDeclBoundData {
144142

145143
/// Mark a trait or trait impl as `unsafe`.
146144
#[term]
147-
#[customize(debug)]
148145
#[derive(Default)]
149146
pub enum Safety {
150147
#[default]
151148
Safe,
152149
Unsafe,
153150
}
154151

155-
impl fmt::Debug for Safety {
156-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
157-
match self {
158-
Safety::Safe => write!(f, "safe"),
159-
Safety::Unsafe => write!(f, "unsafe"),
160-
}
161-
}
162-
}
163-
164152
/// A "trait declaration" declares a trait that exists, its generics, and its where-clauses.
165153
/// It doesn't capture the trait items, which will be transformed into other sorts of rules.
166154
///

0 commit comments

Comments
 (0)