]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/util/patch.rs
Rollup merge of #69734 - tmiasko:di-enumerator, r=ecstatic-morse
[rust.git] / src / librustc_mir / util / patch.rs
index f6a4eb38a2ebb7220441daa619578876f48717d2..473692a43f3e95937765a74ad5df13ccfa2d36db 100644 (file)
@@ -1,7 +1,7 @@
 use rustc::mir::*;
 use rustc::ty::Ty;
 use rustc_index::vec::{Idx, IndexVec};
-use syntax_pos::Span;
+use rustc_span::Span;
 
 /// This struct represents a patch to MIR, which can add
 /// new statements and basic blocks and patch over block
@@ -37,7 +37,7 @@ pub fn new(body: &Body<'tcx>) -> Self {
         let mut resume_stmt_block = None;
         for (bb, block) in body.basic_blocks().iter_enumerated() {
             if let TerminatorKind::Resume = block.terminator().kind {
-                if block.statements.len() > 0 {
+                if !block.statements.is_empty() {
                     assert!(resume_stmt_block.is_none());
                     resume_stmt_block = Some(bb);
                 } else {