File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
crates/formality-prove/src Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change
1
+ use std:: fmt;
2
+
1
3
use formality_core:: { set, Set , Upcast } ;
2
4
use formality_macros:: term;
3
5
use formality_types:: grammar:: {
@@ -141,13 +143,23 @@ pub struct NegImplDeclBoundData {
141
143
}
142
144
143
145
#[ term]
146
+ #[ customize( debug) ]
144
147
#[ derive( Default ) ]
145
148
pub enum Safety {
146
149
#[ default]
147
150
Safe ,
148
151
Unsafe ,
149
152
}
150
153
154
+ impl fmt:: Debug for Safety {
155
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
156
+ match self {
157
+ Safety :: Safe => write ! ( f, "safe" ) ,
158
+ Safety :: Unsafe => write ! ( f, "unsafe" ) ,
159
+ }
160
+ }
161
+ }
162
+
151
163
/// A "trait declaration" declares a trait that exists, its generics, and its where-clauses.
152
164
/// It doesn't capture the trait items, which will be transformed into other sorts of rules.
153
165
///
You can’t perform that action at this time.
0 commit comments