about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/impl_wf_check
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2024-02-20 14:29:50 +0100
committerLeón Orell Valerian Liehr <me@fmease.dev>2024-02-20 17:31:59 +0100
commit1b3df6f068cb676486c511890148dbb7981b62b1 (patch)
treee453210d3ca06793f746a8260bc6b500142e3665 /compiler/rustc_hir_analysis/src/impl_wf_check
parentda01cced15b1a59e5eb40bdf5bb0be9a143d4e5a (diff)
Use expand_weak_alias_tys when collecting constrained generics params in impls
Diffstat (limited to 'compiler/rustc_hir_analysis/src/impl_wf_check')
-rw-r--r--compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs b/compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs
index bd4fce81377..be1be1a1354 100644
--- a/compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs
+++ b/compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs
@@ -133,7 +133,7 @@ fn check_always_applicable(
 
     res = res.and(check_constness(tcx, impl1_def_id, impl2_node, span));
     res = res.and(check_static_lifetimes(tcx, &parent_args, span));
-    res = res.and(check_duplicate_params(tcx, impl1_args, &parent_args, span));
+    res = res.and(check_duplicate_params(tcx, impl1_args, parent_args, span));
     res = res.and(check_predicates(tcx, impl1_def_id, impl1_args, impl2_node, impl2_args, span));
 
     res
@@ -266,15 +266,15 @@ fn unconstrained_parent_impl_args<'tcx>(
                 continue;
             }
 
-            unconstrained_parameters.extend(cgp::parameters_for(tcx, &projection_ty, true));
+            unconstrained_parameters.extend(cgp::parameters_for(tcx, projection_ty, true));
 
-            for param in cgp::parameters_for(tcx, &projected_ty, false) {
+            for param in cgp::parameters_for(tcx, projected_ty, false) {
                 if !unconstrained_parameters.contains(&param) {
                     constrained_params.insert(param.0);
                 }
             }
 
-            unconstrained_parameters.extend(cgp::parameters_for(tcx, &projected_ty, true));
+            unconstrained_parameters.extend(cgp::parameters_for(tcx, projected_ty, true));
         }
     }
 
@@ -309,7 +309,7 @@ fn unconstrained_parent_impl_args<'tcx>(
 fn check_duplicate_params<'tcx>(
     tcx: TyCtxt<'tcx>,
     impl1_args: GenericArgsRef<'tcx>,
-    parent_args: &Vec<GenericArg<'tcx>>,
+    parent_args: Vec<GenericArg<'tcx>>,
     span: Span,
 ) -> Result<(), ErrorGuaranteed> {
     let mut base_params = cgp::parameters_for(tcx, parent_args, true);