use rustc::hir::def_id::DefId;
use rustc::middle::region;
use rustc::ty::subst::Substs;
-use rustc::ty::{AdtDef, UpvarSubsts, Region, Ty, Const};
+use rustc::ty::{AdtDef, CanonicalTy, UpvarSubsts, Region, Ty, Const};
use rustc::hir;
use syntax::ast;
use syntax_pos::Span;
adt_def: &'tcx AdtDef,
variant_index: usize,
substs: &'tcx Substs<'tcx>,
+
+ /// Optional user-given substs: for something like `let x =
+ /// Bar::<T> { ... }`.
+ user_ty: Option<CanonicalTy<'tcx>>,
+
fields: Vec<FieldExprRef<'tcx>>,
base: Option<FruInfo<'tcx>>
},
},
Literal {
literal: &'tcx Const<'tcx>,
+
+ /// Optional user-given type: for something like
+ /// `collect::<Vec<_>>`, this would be present and would
+ /// indicate that `Vec<_>` was explicitly specified.
+ ///
+ /// Needed for NLL to impose user-given type constraints.
+ user_ty: Option<CanonicalTy<'tcx>>,
},
InlineAsm {
asm: &'tcx hir::InlineAsm,