diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-05-29 04:49:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-29 04:49:42 +0200 |
| commit | d3a69636c910afd8b9f62bb583568bf28c4cccb6 (patch) | |
| tree | ee00ad5cec697d92626dff00d352e009175b0f2b /compiler/rustc_hir_analysis/src/check/wfcheck.rs | |
| parent | 1c46b4a4a9f5a3adfc2d6522caca435e78d2da33 (diff) | |
| parent | 550aed825b3a630b5b2bd235e193bfce065268c2 (diff) | |
| download | rust-d3a69636c910afd8b9f62bb583568bf28c4cccb6.tar.gz rust-d3a69636c910afd8b9f62bb583568bf28c4cccb6.zip | |
Rollup merge of #141638 - oli-obk:builtin-index, r=lcnr
Use `builtin_index` instead of hand-rolling it Just using the dedicated method more
Diffstat (limited to 'compiler/rustc_hir_analysis/src/check/wfcheck.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/wfcheck.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs index 063dbbcaecb..f85ff5a6f4b 100644 --- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs +++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs @@ -1046,8 +1046,7 @@ fn check_param_wf(tcx: TyCtxt<'_>, param: &hir::GenericParam<'_>) -> Result<(), match ty.kind() { ty::Adt(adt_def, ..) => adt_def.did().is_local(), // Arrays and slices use the inner type's `ConstParamTy`. - ty::Array(ty, ..) => ty_is_local(*ty), - ty::Slice(ty) => ty_is_local(*ty), + ty::Array(ty, ..) | ty::Slice(ty) => ty_is_local(*ty), // `&` references use the inner type's `ConstParamTy`. // `&mut` are not supported. ty::Ref(_, ty, ast::Mutability::Not) => ty_is_local(*ty), |
