Add super_local
method to the MIR visitors.
`visit_local` is the only method that doesn't call a corresponding `super_local` method. This is valid, because `super_local` would be empty. But it's inconsistent with every other case; we have multiple other empty `super` methods: `super_span`, `super_ty`, etc. This commit adds an empty `super_local` and makes `visit_local` call it.
This commit is contained in:
parent
5986ff05d8
commit
cee430b2ce
1 changed files with 14 additions and 4 deletions
|
@ -270,10 +270,12 @@ macro_rules! make_mir_visitor {
|
|||
|
||||
fn visit_local(
|
||||
&mut self,
|
||||
_local: $(& $mutability)? Local,
|
||||
_context: PlaceContext,
|
||||
_location: Location,
|
||||
) {}
|
||||
local: $(& $mutability)? Local,
|
||||
context: PlaceContext,
|
||||
location: Location,
|
||||
) {
|
||||
self.super_local(local, context, location)
|
||||
}
|
||||
|
||||
fn visit_source_scope(
|
||||
&mut self,
|
||||
|
@ -868,6 +870,14 @@ macro_rules! make_mir_visitor {
|
|||
}
|
||||
}
|
||||
|
||||
fn super_local(
|
||||
&mut self,
|
||||
_local: $(& $mutability)? Local,
|
||||
_context: PlaceContext,
|
||||
_location: Location,
|
||||
) {
|
||||
}
|
||||
|
||||
fn super_var_debug_info(
|
||||
&mut self,
|
||||
var_debug_info: & $($mutability)? VarDebugInfo<'tcx>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue