]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/thir.rs
Merge all `TypeVisitable for &List<T>` impls into one generic one
[rust.git] / compiler / rustc_middle / src / thir.rs
index 0214610f687ed7ef6932e07be6c0db5af01e7df1..165b9103968d04cc9d6d1375ff28ed0062cc3ec4 100644 (file)
@@ -73,6 +73,8 @@ fn index(&self, index: $id) -> &Self::Output {
     }
 }
 
+pub const UPVAR_ENV_PARAM: ParamId = ParamId::from_u32(0);
+
 thir_with_elements! {
     arms: ArmId => Arm<'tcx> => "a{}",
     blocks: BlockId => Block => "b{}",
@@ -84,8 +86,8 @@ fn index(&self, index: $id) -> &Self::Output {
 /// Description of a type-checked function parameter.
 #[derive(Clone, Debug, HashStable)]
 pub struct Param<'tcx> {
-    /// The pattern that appears in the parameter list.
-    pub pat: Box<Pat<'tcx>>,
+    /// The pattern that appears in the parameter list, or None for implicit parameters.
+    pub pat: Option<Box<Pat<'tcx>>>,
     /// The possibly inferred type.
     pub ty: Ty<'tcx>,
     /// Span of the explicitly provided type, or None if inferred for closures.
@@ -93,7 +95,7 @@ pub struct Param<'tcx> {
     /// Whether this param is `self`, and how it is bound.
     pub self_kind: Option<hir::ImplicitSelfKind>,
     /// HirId for lints.
-    pub hir_id: hir::HirId,
+    pub hir_id: Option<hir::HirId>,
 }
 
 #[derive(Copy, Clone, Debug, HashStable)]