Skip to content

Commit a8cde85

Browse files
committed
Add ocx.select_where_possible
1 parent 158f7e8 commit a8cde85

File tree

1 file changed

+5
-1
lines changed
  • compiler/rustc_trait_selection/src/traits

1 file changed

+5
-1
lines changed

compiler/rustc_trait_selection/src/traits/misc.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ pub fn type_allowed_to_implement_const_param_ty<'tcx>(
154154
parent_cause.clone(),
155155
param_env,
156156
ty::ClauseKind::UnstableFeature(sym::unsized_const_params),
157-
))
157+
));
158+
159+
if !ocx.select_where_possible().is_empty() {
160+
return Err(ConstParamTyImplementationError::UnsizedConstParamsFeatureRequired);
161+
}
158162
}
159163

160164
ocx.register_bound(

0 commit comments

Comments
 (0)