File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -121,25 +121,25 @@ pub trait Map<'hir> {
121
121
// Used when no map is actually available, forcing manual implementation of nested visitors.
122
122
impl < ' hir > Map < ' hir > for ! {
123
123
fn hir_node ( & self , _: HirId ) -> Node < ' hir > {
124
- * self ;
124
+ unreachable ! ( ) ;
125
125
}
126
126
fn hir_node_by_def_id ( & self , _: LocalDefId ) -> Node < ' hir > {
127
127
* self ;
128
128
}
129
129
fn body ( & self , _: BodyId ) -> & ' hir Body < ' hir > {
130
- * self ;
130
+ unreachable ! ( ) ;
131
131
}
132
132
fn item ( & self , _: ItemId ) -> & ' hir Item < ' hir > {
133
- * self ;
133
+ unreachable ! ( ) ;
134
134
}
135
135
fn trait_item ( & self , _: TraitItemId ) -> & ' hir TraitItem < ' hir > {
136
- * self ;
136
+ unreachable ! ( ) ;
137
137
}
138
138
fn impl_item ( & self , _: ImplItemId ) -> & ' hir ImplItem < ' hir > {
139
- * self ;
139
+ unreachable ! ( ) ;
140
140
}
141
141
fn foreign_item ( & self , _: ForeignItemId ) -> & ' hir ForeignItem < ' hir > {
142
- * self ;
142
+ unreachable ! ( ) ;
143
143
}
144
144
}
145
145
@@ -203,7 +203,7 @@ use nested_filter::NestedFilter;
203
203
/// to monitor future changes to `Visitor` in case a new method with a
204
204
/// new default implementation gets introduced.)
205
205
pub trait Visitor < ' v > : Sized {
206
- // this type should not be overridden, it exists for convenient usage as `Self::Map`
206
+ // This type should not be overridden, it exists for convenient usage as `Self::Map`.
207
207
type Map : Map < ' v > = <Self :: NestedFilter as NestedFilter < ' v > >:: Map ;
208
208
209
209
///////////////////////////////////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments