about summary refs log tree commit diff
path: root/src/librustc_mir/util
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2020-03-03 01:19:00 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2020-03-03 03:15:03 +0100
commitd3e5177f816d723cbce31ae7a7779feca8a69724 (patch)
tree6b36c419c3eb8150104eb51c4dd0758864f23046 /src/librustc_mir/util
parent97b3d816152774e45d01d44cd5b44565dc7aba58 (diff)
downloadrust-d3e5177f816d723cbce31ae7a7779feca8a69724.tar.gz
rust-d3e5177f816d723cbce31ae7a7779feca8a69724.zip
Use .next() instead of .nth(0) on iterators.
Diffstat (limited to 'src/librustc_mir/util')
-rw-r--r--src/librustc_mir/util/elaborate_drops.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_mir/util/elaborate_drops.rs b/src/librustc_mir/util/elaborate_drops.rs
index f7239ae55fa..a928ab6a009 100644
--- a/src/librustc_mir/util/elaborate_drops.rs
+++ b/src/librustc_mir/util/elaborate_drops.rs
@@ -549,7 +549,7 @@ where
         debug!("destructor_call_block({:?}, {:?})", self, succ);
         let tcx = self.tcx();
         let drop_trait = tcx.lang_items().drop_trait().unwrap();
-        let drop_fn = tcx.associated_items(drop_trait).in_definition_order().nth(0).unwrap();
+        let drop_fn = tcx.associated_items(drop_trait).in_definition_order().next().unwrap();
         let ty = self.place_ty(self.place);
         let substs = tcx.mk_substs_trait(ty, &[]);