@@ -36,10 +36,10 @@ impl<'a, 'b> Pretty<'a, Allocator<Lean>, Span> for &'b ItemKind {
36
36
match self {
37
37
ItemKind :: Fn {
38
38
name,
39
- generics,
39
+ generics : _ ,
40
40
body,
41
41
params,
42
- safety,
42
+ safety : _ ,
43
43
} => {
44
44
// Generics are ignored for now
45
45
docs ! [
@@ -59,37 +59,42 @@ impl<'a, 'b> Pretty<'a, Allocator<Lean>, Span> for &'b ItemKind {
59
59
. nest ( INDENT )
60
60
. group ( )
61
61
}
62
- ItemKind :: TyAlias { name, generics, ty } => {
63
- docs ! [ allocator, "abbrev " , name, allocator. reflow( " := " ) , ty] . group ( )
64
- }
65
- ItemKind :: Type {
62
+ ItemKind :: TyAlias {
66
63
name,
67
- generics,
68
- variants,
69
- is_struct,
64
+ generics : _,
65
+ ty,
66
+ } => docs ! [ allocator, "abbrev " , name, allocator. reflow( " := " ) , ty] . group ( ) ,
67
+ ItemKind :: Type {
68
+ name : _,
69
+ generics : _,
70
+ variants : _,
71
+ is_struct : _,
70
72
} => print_todo ! ( allocator) ,
71
73
ItemKind :: Trait {
72
- name,
73
- generics,
74
- items,
74
+ name : _ ,
75
+ generics : _ ,
76
+ items : _ ,
75
77
} => print_todo ! ( allocator) ,
76
78
ItemKind :: Impl {
77
- generics,
78
- self_ty,
79
- of_trait,
80
- items,
81
- parent_bounds,
82
- safety,
79
+ generics : _ ,
80
+ self_ty : _ ,
81
+ of_trait : _ ,
82
+ items : _ ,
83
+ parent_bounds : _ ,
84
+ safety : _ ,
83
85
} => print_todo ! ( allocator) ,
84
- ItemKind :: Alias { name, item } => print_todo ! ( allocator) ,
86
+ ItemKind :: Alias { name : _ , item : _ } => print_todo ! ( allocator) ,
85
87
ItemKind :: Use {
86
- path,
87
- is_external,
88
- rename,
88
+ path : _ ,
89
+ is_external : _ ,
90
+ rename : _ ,
89
91
} => allocator. nil ( ) ,
90
- ItemKind :: Quote { quote, origin } => print_todo ! ( allocator) ,
91
- ItemKind :: Error ( diagnostic) => print_todo ! ( allocator) ,
92
- ItemKind :: Resugared ( resugared_ty_kind) => print_todo ! ( allocator) ,
92
+ ItemKind :: Quote {
93
+ quote : _,
94
+ origin : _,
95
+ } => print_todo ! ( allocator) ,
96
+ ItemKind :: Error ( _diagnostic) => print_todo ! ( allocator) ,
97
+ ItemKind :: Resugared ( _resugared_ty_kind) => print_todo ! ( allocator) ,
93
98
ItemKind :: NotImplementedYet => allocator. text ( "-- unimplemented yet" ) ,
94
99
}
95
100
}
@@ -124,9 +129,9 @@ impl<'a, 'b> Pretty<'a, Allocator<Lean>, Span> for &'b TyKind {
124
129
)
125
130
. parens ( ) ,
126
131
TyKind :: Ref {
127
- inner,
128
- mutable,
129
- region,
132
+ inner : _ ,
133
+ mutable : _ ,
134
+ region : _ ,
130
135
} => print_todo ! ( allocator) ,
131
136
TyKind :: Param ( local_id) => local_id. pretty ( allocator) ,
132
137
TyKind :: Slice ( ty) => docs ! [ allocator, "Array " , ty] . parens ( ) ,
@@ -136,11 +141,11 @@ impl<'a, 'b> Pretty<'a, Allocator<Lean>, Span> for &'b TyKind {
136
141
. group ( )
137
142
}
138
143
TyKind :: RawPointer => print_todo ! ( allocator) ,
139
- TyKind :: AssociatedType { impl_, item } => print_todo ! ( allocator) ,
140
- TyKind :: Opaque ( global_id ) => print_todo ! ( allocator) ,
141
- TyKind :: Dyn ( dyn_trait_goals ) => print_todo ! ( allocator) ,
142
- TyKind :: Resugared ( resugared_ty_kind ) => print_todo ! ( allocator) ,
143
- TyKind :: Error ( diagnostic ) => print_todo ! ( allocator) ,
144
+ TyKind :: AssociatedType { impl_ : _ , item : _ } => print_todo ! ( allocator) ,
145
+ TyKind :: Opaque ( _global_id ) => print_todo ! ( allocator) ,
146
+ TyKind :: Dyn ( _dyn_trait_goals ) => print_todo ! ( allocator) ,
147
+ TyKind :: Resugared ( _resugared_ty_kind ) => print_todo ! ( allocator) ,
148
+ TyKind :: Error ( _diagnostic ) => print_todo ! ( allocator) ,
144
149
}
145
150
}
146
151
}
@@ -184,10 +189,10 @@ impl<'a, 'b> Pretty<'a, Allocator<Lean>, Span> for &'b PatKind {
184
189
. nest ( INDENT )
185
190
. group ( )
186
191
}
187
- PatKind :: Or { sub_pats } => print_todo ! ( allocator) ,
188
- PatKind :: Array { args } => print_todo ! ( allocator) ,
189
- PatKind :: Deref { sub_pat } => print_todo ! ( allocator) ,
190
- PatKind :: Constant { lit } => print_todo ! ( allocator) ,
192
+ PatKind :: Or { sub_pats : _ } => print_todo ! ( allocator) ,
193
+ PatKind :: Array { args : _ } => print_todo ! ( allocator) ,
194
+ PatKind :: Deref { sub_pat : _ } => print_todo ! ( allocator) ,
195
+ PatKind :: Constant { lit : _ } => print_todo ! ( allocator) ,
191
196
PatKind :: Binding {
192
197
mutable,
193
198
var,
@@ -198,13 +203,13 @@ impl<'a, 'b> Pretty<'a, Allocator<Lean>, Span> for &'b PatKind {
198
203
_ => panic ! ( ) ,
199
204
} ,
200
205
PatKind :: Construct {
201
- constructor,
202
- is_record,
203
- is_struct,
204
- fields,
206
+ constructor : _ ,
207
+ is_record : _ ,
208
+ is_struct : _ ,
209
+ fields : _ ,
205
210
} => print_todo ! ( allocator) ,
206
- PatKind :: Resugared ( resugared_pat_kind ) => print_todo ! ( allocator) ,
207
- PatKind :: Error ( diagnostic ) => print_todo ! ( allocator) ,
211
+ PatKind :: Resugared ( _resugared_pat_kind ) => print_todo ! ( allocator) ,
212
+ PatKind :: Error ( _diagnostic ) => print_todo ! ( allocator) ,
208
213
}
209
214
}
210
215
}
@@ -238,9 +243,9 @@ impl<'a, 'b> Pretty<'a, Allocator<Lean>, Span> for &'b ExprKind {
238
243
ExprKind :: App {
239
244
head,
240
245
args,
241
- generic_args,
242
- bounds_impls,
243
- trait_,
246
+ generic_args : _ ,
247
+ bounds_impls : _ ,
248
+ trait_ : _ ,
244
249
} => {
245
250
let separator = allocator. line ( ) ;
246
251
head. pretty ( allocator)
@@ -261,10 +266,10 @@ impl<'a, 'b> Pretty<'a, Allocator<Lean>, Span> for &'b ExprKind {
261
266
. group ( ) ,
262
267
ExprKind :: Construct {
263
268
constructor,
264
- is_record,
265
- is_struct,
269
+ is_record : _ ,
270
+ is_struct : _ ,
266
271
fields,
267
- base,
272
+ base : _ ,
268
273
} => {
269
274
// Should be turned into a resugaring once https://github.com/cryspen/hax/pull/1528 have been merged
270
275
let record_args = if fields. len ( ) > 0 {
@@ -295,11 +300,20 @@ impl<'a, 'b> Pretty<'a, Allocator<Lean>, Span> for &'b ExprKind {
295
300
. group ( )
296
301
. nest ( INDENT )
297
302
}
298
- ExprKind :: Match { scrutinee, arms } => print_todo ! ( allocator) ,
299
- ExprKind :: Tuple ( exprs) => print_todo ! ( allocator) ,
300
- ExprKind :: Borrow { mutable, inner } => print_todo ! ( allocator) ,
301
- ExprKind :: AddressOf { mutable, inner } => print_todo ! ( allocator) ,
302
- ExprKind :: Deref ( expr) => print_todo ! ( allocator) ,
303
+ ExprKind :: Match {
304
+ scrutinee : _,
305
+ arms : _,
306
+ } => print_todo ! ( allocator) ,
307
+ ExprKind :: Tuple ( _exprs) => print_todo ! ( allocator) ,
308
+ ExprKind :: Borrow {
309
+ mutable : _,
310
+ inner : _,
311
+ } => print_todo ! ( allocator) ,
312
+ ExprKind :: AddressOf {
313
+ mutable : _,
314
+ inner : _,
315
+ } => print_todo ! ( allocator) ,
316
+ ExprKind :: Deref ( _expr) => print_todo ! ( allocator) ,
303
317
ExprKind :: Let { lhs, rhs, body } => {
304
318
docs ! [
305
319
allocator,
@@ -319,21 +333,21 @@ impl<'a, 'b> Pretty<'a, Allocator<Lean>, Span> for &'b ExprKind {
319
333
. nest ( INDENT )
320
334
. parens ( )
321
335
. group ( ) ,
322
- ExprKind :: Assign { lhs, value } => print_todo ! ( allocator) ,
336
+ ExprKind :: Assign { lhs : _ , value : _ } => print_todo ! ( allocator) ,
323
337
ExprKind :: Loop {
324
- body,
325
- kind,
326
- state,
327
- control_flow,
328
- label,
338
+ body : _ ,
339
+ kind : _ ,
340
+ state : _ ,
341
+ control_flow : _ ,
342
+ label : _ ,
329
343
} => print_todo ! ( allocator) ,
330
- ExprKind :: Break { value, label } => print_todo ! ( allocator) ,
331
- ExprKind :: Return { value } => print_todo ! ( allocator) ,
332
- ExprKind :: Continue { label } => print_todo ! ( allocator) ,
344
+ ExprKind :: Break { value : _ , label : _ } => print_todo ! ( allocator) ,
345
+ ExprKind :: Return { value : _ } => print_todo ! ( allocator) ,
346
+ ExprKind :: Continue { label : _ } => print_todo ! ( allocator) ,
333
347
ExprKind :: Closure {
334
348
params,
335
349
body,
336
- captures,
350
+ captures : _ ,
337
351
} => docs ! [
338
352
allocator,
339
353
allocator. reflow( "fun " ) ,
@@ -345,10 +359,13 @@ impl<'a, 'b> Pretty<'a, Allocator<Lean>, Span> for &'b ExprKind {
345
359
. nest ( INDENT )
346
360
. group ( )
347
361
. parens ( ) ,
348
- ExprKind :: Block { body, safety_mode } => print_todo ! ( allocator) ,
349
- ExprKind :: Quote { contents } => print_todo ! ( allocator) ,
350
- ExprKind :: Resugared ( resugared_expr_kind) => print_todo ! ( allocator) ,
351
- ExprKind :: Error ( diagnostic) => print_todo ! ( allocator) ,
362
+ ExprKind :: Block {
363
+ body : _,
364
+ safety_mode : _,
365
+ } => print_todo ! ( allocator) ,
366
+ ExprKind :: Quote { contents : _ } => print_todo ! ( allocator) ,
367
+ ExprKind :: Resugared ( _resugared_expr_kind) => print_todo ! ( allocator) ,
368
+ ExprKind :: Error ( _diagnostic) => print_todo ! ( allocator) ,
352
369
}
353
370
}
354
371
}
@@ -363,13 +380,13 @@ impl<'a, 'b> Pretty<'a, Allocator<Lean>, Span> for &'b Literal {
363
380
Literal :: Bool ( b) => format!( "{}" , b) ,
364
381
Literal :: Int {
365
382
value,
366
- negative,
367
- kind,
383
+ negative: _ ,
384
+ kind: _ ,
368
385
} => format!( "{}" , value) ,
369
386
Literal :: Float {
370
- value,
371
- negative,
372
- kind,
387
+ value: _ ,
388
+ negative: _ ,
389
+ kind: _ ,
373
390
} => todo!( ) ,
374
391
}
375
392
]
0 commit comments