]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_hir/src/hir.rs
Rollup merge of #81682 - JulianKnodt:bit_set_iter_benchmarks, r=oli-obk
[rust.git] / compiler / rustc_hir / src / hir.rs
index 35170fa7c1d0250cd27e7430b13a0b61c3fcf927..67a15418ea4957af0a5e5f604cb65cc6c73999a6 100644 (file)
@@ -358,7 +358,7 @@ pub fn span(&self) -> Option<Span> {
             .iter()
             .filter(|arg| !arg.is_synthetic())
             .map(|arg| arg.span())
-            .fold_first(|span1, span2| span1.to(span2))
+            .reduce(|span1, span2| span1.to(span2))
     }
 
     /// Returns span encompassing arguments and their surrounding `<>` or `()`
@@ -1543,10 +1543,10 @@ pub fn is_range_literal(expr: &Expr<'_>) -> bool {
             **qpath,
             QPath::LangItem(
                 LangItem::Range
-                | LangItem::RangeTo
-                | LangItem::RangeFrom
-                | LangItem::RangeFull
-                | LangItem::RangeToInclusive,
+                    | LangItem::RangeTo
+                    | LangItem::RangeFrom
+                    | LangItem::RangeFull
+                    | LangItem::RangeToInclusive,
                 _,
             )
         ),
@@ -2015,6 +2015,7 @@ pub struct TypeBinding<'hir> {
     pub hir_id: HirId,
     #[stable_hasher(project(name))]
     pub ident: Ident,
+    pub gen_args: &'hir GenericArgs<'hir>,
     pub kind: TypeBindingKind<'hir>,
     pub span: Span,
 }