mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Cleanup
This commit is contained in:
parent
a3c77f6ad1
commit
790e611c9c
@ -12,7 +12,7 @@ use crate::rustc::hir::{def_id, Body, FnDecl};
|
||||
use crate::rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
|
||||
use crate::rustc::mir::{
|
||||
self, traversal,
|
||||
visit::{MutatingUseContext, NonUseContext, PlaceContext, Visitor},
|
||||
visit::{MutatingUseContext, PlaceContext, Visitor},
|
||||
TerminatorKind,
|
||||
};
|
||||
use crate::rustc::ty;
|
||||
@ -279,10 +279,8 @@ impl<'tcx> mir::visit::Visitor<'tcx> for LocalUseVisitor {
|
||||
|
||||
fn visit_local(&mut self, local: &mir::Local, ctx: PlaceContext<'tcx>, _: mir::Location) {
|
||||
match ctx {
|
||||
PlaceContext::MutatingUse(MutatingUseContext::Drop) | PlaceContext::NonUse(NonUseContext::StorageDead) => {
|
||||
return;
|
||||
},
|
||||
_ => {},
|
||||
PlaceContext::MutatingUse(MutatingUseContext::Drop) | PlaceContext::NonUse(_) => return,
|
||||
_ => {}
|
||||
}
|
||||
|
||||
if *local == self.local {
|
||||
|
Loading…
Reference in New Issue
Block a user