mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Some style nits
This commit is contained in:
parent
8b1530260c
commit
e405dabf7d
@ -1163,7 +1163,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
|
||||
tcx,
|
||||
self.param_env,
|
||||
proj,
|
||||
|this, field, _| {
|
||||
|this, field, ()| {
|
||||
let ty = this.field_ty(tcx, field);
|
||||
self.normalize(ty, locations)
|
||||
},
|
||||
|
@ -66,14 +66,14 @@ pub fn as_constant_inner<'tcx>(
|
||||
|
||||
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 } => {
|
||||
let user_ty = user_ty.as_ref().map(push_cuta).flatten();
|
||||
|
||||
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 } => {
|
||||
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::ByRef(_) => ty::BindingMode::BindByReference(mutability),
|
||||
};
|
||||
let local = LocalDecl::<'tcx> {
|
||||
let local = LocalDecl {
|
||||
mutability,
|
||||
ty: var_ty,
|
||||
user_ty: if user_ty.is_empty() { None } else { Some(Box::new(user_ty)) },
|
||||
|
Loading…
Reference in New Issue
Block a user