From 1c544108b1e10124b3a9f45a68c1cb36c1c45e90 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Thu, 23 Feb 2023 11:54:09 +0000 Subject: [PATCH] Check the correct trait when checking `ConstParamTy` impls --- compiler/rustc_trait_selection/src/traits/misc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_trait_selection/src/traits/misc.rs b/compiler/rustc_trait_selection/src/traits/misc.rs index 3c43758e50d..cb8f64dd2e8 100644 --- a/compiler/rustc_trait_selection/src/traits/misc.rs +++ b/compiler/rustc_trait_selection/src/traits/misc.rs @@ -107,7 +107,7 @@ pub fn type_allowed_to_implement_const_param_ty<'tcx>( adt, substs, parent_cause, - hir::LangItem::Copy, + hir::LangItem::ConstParamTy, ) .map_err(ConstParamTyImplementationError::InfrigingFields)?;