@@ -114,14 +114,11 @@ fn write_path(out: &mut String, path: &Vec<PathElem>) {
114
114
ClosureVar ( name) => write ! ( out, ".<closure-var({})>" , name) ,
115
115
TupleElem ( idx) => write ! ( out, ".{}" , idx) ,
116
116
ArrayElem ( idx) => write ! ( out, "[{}]" , idx) ,
117
- Deref =>
118
- // This does not match Rust syntax, but it is more readable for long paths -- and
117
+ // `.<deref>` does not match Rust syntax, but it is more readable for long paths -- and
119
118
// some of the other items here also are not Rust syntax. Actually we can't
120
119
// even use the usual syntax because we are just showing the projections,
121
120
// not the root.
122
- {
123
- write ! ( out, ".<deref>" )
124
- }
121
+ Deref => write ! ( out, ".<deref>" ) ,
125
122
Tag => write ! ( out, ".<enum-tag>" ) ,
126
123
DynDowncast => write ! ( out, ".<dyn-downcast>" ) ,
127
124
}
@@ -206,9 +203,8 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, 'tcx, M
206
203
ty:: Adt ( def, ..) if def. is_enum ( ) => {
207
204
// we might be projecting *to* a variant, or to a field *in*a variant.
208
205
match layout. variants {
209
- layout:: Variants :: Single { index } =>
210
- // Inside a variant
211
- {
206
+ layout:: Variants :: Single { index } => {
207
+ // Inside a variant
212
208
PathElem :: Field ( def. variants [ index] . fields [ field] . ident . name )
213
209
}
214
210
_ => bug ! ( ) ,
0 commit comments