diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-12-19 13:14:03 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-12-20 13:43:11 +0000 |
| commit | e405dabf7dc99cbcd5f483592e8f9b5ea621d110 (patch) | |
| tree | ff1231e31a23830daaf8c54cb73b1c7b478aa673 | |
| parent | 8b1530260c66069ce1f5cd8d5d32a98b9e1b49cb (diff) | |
| download | rust-e405dabf7dc99cbcd5f483592e8f9b5ea621d110.tar.gz rust-e405dabf7dc99cbcd5f483592e8f9b5ea621d110.zip | |
Some style nits
| -rw-r--r-- | compiler/rustc_borrowck/src/type_check/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_mir_build/src/build/expr/as_constant.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_mir_build/src/build/matches/mod.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_borrowck/src/type_check/mod.rs b/compiler/rustc_borrowck/src/type_check/mod.rs index 36397227d88..2973f8b7f85 100644 --- a/compiler/rustc_borrowck/src/type_check/mod.rs +++ b/compiler/rustc_borrowck/src/type_check/mod.rs @@ -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) }, diff --git a/compiler/rustc_mir_build/src/build/expr/as_constant.rs b/compiler/rustc_mir_build/src/build/expr/as_constant.rs index 3b7ed818dc9..1d96893c7a3 100644 --- a/compiler/rustc_mir_build/src/build/expr/as_constant.rs +++ b/compiler/rustc_mir_build/src/build/expr/as_constant.rs @@ -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(); diff --git a/compiler/rustc_mir_build/src/build/matches/mod.rs b/compiler/rustc_mir_build/src/build/matches/mod.rs index 7edcd46a34f..f90aba80bf3 100644 --- a/compiler/rustc_mir_build/src/build/matches/mod.rs +++ b/compiler/rustc_mir_build/src/build/matches/mod.rs @@ -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)) }, |
