Skip to content

Commit

Permalink
Auto merge of #4047 - rust-lang:rustup, r=Centril
Browse files Browse the repository at this point in the history
Rustup to rustc 1.36.0-nightly (f843ad6 2019-04-30)

None
  • Loading branch information
bors committed Apr 30, 2019
2 parents f1eda09 + 83519d3 commit d0ff1a5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions clippy_lints/src/redundant_clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ impl<'tcx> mir::visit::Visitor<'tcx> for LocalUseVisitor {
fn visit_basic_block_data(&mut self, block: mir::BasicBlock, data: &mir::BasicBlockData<'tcx>) {
let statements = &data.statements;
for (statement_index, statement) in statements.iter().enumerate() {
self.visit_statement(block, statement, mir::Location { block, statement_index });
self.visit_statement(statement, mir::Location { block, statement_index });

// Once flagged, skip remaining statements
if self.used_other_than_drop {
Expand All @@ -314,7 +314,6 @@ impl<'tcx> mir::visit::Visitor<'tcx> for LocalUseVisitor {
}

self.visit_terminator(
block,
data.terminator(),
mir::Location {
block,
Expand All @@ -323,7 +322,7 @@ 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, _: mir::Location) {
match ctx {
PlaceContext::MutatingUse(MutatingUseContext::Drop) | PlaceContext::NonUse(_) => return,
_ => {},
Expand Down

0 comments on commit d0ff1a5

Please sign in to comment.