]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_infer/infer/region_constraints/leak_check.rs
Rollup merge of #70038 - DutchGhost:const-forget-tests, r=RalfJung
[rust.git] / src / librustc_infer / infer / region_constraints / leak_check.rs
index 74ffdc7a4f0872c1091a37fe3a88e978615691cd..6ebe3f575976041781f949a37602b05c68ce6abd 100644 (file)
@@ -34,7 +34,7 @@ pub fn leak_check(
         assert!(self.in_snapshot());
 
         // Go through each placeholder that we created.
-        for (_, &placeholder_region) in placeholder_map {
+        for &placeholder_region in placeholder_map.values() {
             // Find the universe this placeholder inhabits.
             let placeholder = match placeholder_region {
                 ty::RePlaceholder(p) => p,
@@ -85,7 +85,7 @@ impl<'tcx> TaintSet<'tcx> {
     fn new(directions: TaintDirections, initial_region: ty::Region<'tcx>) -> Self {
         let mut regions = FxHashSet::default();
         regions.insert(initial_region);
-        TaintSet { directions: directions, regions: regions }
+        TaintSet { directions, regions }
     }
 
     fn fixed_point(