Avoid duplicate type sanitization of local decls
The type of the local decl is already sanitized in `visit_local_decl`.
This commit is contained in:
parent
e4106065bf
commit
5593e7e2ba
1 changed files with 1 additions and 3 deletions
|
@ -477,9 +477,7 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for TypeVerifier<'a, 'b, 'tcx> {
|
||||||
|
|
||||||
fn visit_body(&mut self, body: &Body<'tcx>) {
|
fn visit_body(&mut self, body: &Body<'tcx>) {
|
||||||
self.sanitize_type(&"return type", body.return_ty());
|
self.sanitize_type(&"return type", body.return_ty());
|
||||||
for local_decl in &body.local_decls {
|
// The types of local_decls are checked above which is called in super_body.
|
||||||
self.sanitize_type(local_decl, local_decl.ty);
|
|
||||||
}
|
|
||||||
self.super_body(body);
|
self.super_body(body);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue