diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-03 01:19:00 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-03 03:15:03 +0100 |
| commit | d3e5177f816d723cbce31ae7a7779feca8a69724 (patch) | |
| tree | 6b36c419c3eb8150104eb51c4dd0758864f23046 /src/librustc_mir/util | |
| parent | 97b3d816152774e45d01d44cd5b44565dc7aba58 (diff) | |
| download | rust-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.rs | 2 |
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, &[]); |
