mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +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::lint::{LateContext, LateLintPass, LintArray, LintPass};
|
||||||
use crate::rustc::mir::{
|
use crate::rustc::mir::{
|
||||||
self, traversal,
|
self, traversal,
|
||||||
visit::{MutatingUseContext, NonUseContext, PlaceContext, Visitor},
|
visit::{MutatingUseContext, PlaceContext, Visitor},
|
||||||
TerminatorKind,
|
TerminatorKind,
|
||||||
};
|
};
|
||||||
use crate::rustc::ty;
|
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) {
|
fn visit_local(&mut self, local: &mir::Local, ctx: PlaceContext<'tcx>, _: mir::Location) {
|
||||||
match ctx {
|
match ctx {
|
||||||
PlaceContext::MutatingUse(MutatingUseContext::Drop) | PlaceContext::NonUse(NonUseContext::StorageDead) => {
|
PlaceContext::MutatingUse(MutatingUseContext::Drop) | PlaceContext::NonUse(_) => return,
|
||||||
return;
|
_ => {}
|
||||||
},
|
|
||||||
_ => {},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if *local == self.local {
|
if *local == self.local {
|
||||||
|
Loading…
Reference in New Issue
Block a user