Some style nits
This commit is contained in:
parent
8b1530260c
commit
e405dabf7d
3 changed files with 4 additions and 4 deletions
|
@ -1163,7 +1163,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
|
||||||
tcx,
|
tcx,
|
||||||
self.param_env,
|
self.param_env,
|
||||||
proj,
|
proj,
|
||||||
|this, field, _| {
|
|this, field, ()| {
|
||||||
let ty = this.field_ty(tcx, field);
|
let ty = this.field_ty(tcx, field);
|
||||||
self.normalize(ty, locations)
|
self.normalize(ty, locations)
|
||||||
},
|
},
|
||||||
|
|
|
@ -66,14 +66,14 @@ pub fn as_constant_inner<'tcx>(
|
||||||
|
|
||||||
let literal = ConstantKind::Val(ConstValue::Scalar(Scalar::Int(lit)), ty);
|
let literal = ConstantKind::Val(ConstValue::Scalar(Scalar::Int(lit)), ty);
|
||||||
|
|
||||||
Constant { span, user_ty: user_ty, literal }
|
Constant { span, user_ty, literal }
|
||||||
}
|
}
|
||||||
ExprKind::ZstLiteral { ref user_ty } => {
|
ExprKind::ZstLiteral { ref user_ty } => {
|
||||||
let user_ty = user_ty.as_ref().map(push_cuta).flatten();
|
let user_ty = user_ty.as_ref().map(push_cuta).flatten();
|
||||||
|
|
||||||
let literal = ConstantKind::Val(ConstValue::ZeroSized, ty);
|
let literal = ConstantKind::Val(ConstValue::ZeroSized, ty);
|
||||||
|
|
||||||
Constant { span, user_ty: user_ty, literal }
|
Constant { span, user_ty, literal }
|
||||||
}
|
}
|
||||||
ExprKind::NamedConst { def_id, substs, ref user_ty } => {
|
ExprKind::NamedConst { def_id, substs, ref user_ty } => {
|
||||||
let user_ty = user_ty.as_ref().map(push_cuta).flatten();
|
let user_ty = user_ty.as_ref().map(push_cuta).flatten();
|
||||||
|
|
|
@ -2210,7 +2210,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||||
BindingMode::ByValue => ty::BindingMode::BindByValue(mutability),
|
BindingMode::ByValue => ty::BindingMode::BindByValue(mutability),
|
||||||
BindingMode::ByRef(_) => ty::BindingMode::BindByReference(mutability),
|
BindingMode::ByRef(_) => ty::BindingMode::BindByReference(mutability),
|
||||||
};
|
};
|
||||||
let local = LocalDecl::<'tcx> {
|
let local = LocalDecl {
|
||||||
mutability,
|
mutability,
|
||||||
ty: var_ty,
|
ty: var_ty,
|
||||||
user_ty: if user_ty.is_empty() { None } else { Some(Box::new(user_ty)) },
|
user_ty: if user_ty.is_empty() { None } else { Some(Box::new(user_ty)) },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue