Move impl constness into impl trait header
This commit is contained in:
@@ -128,7 +128,9 @@ fn evaluate_host_effect_from_selection_candiate<'tcx>(
|
||||
Err(_) => Err(EvaluationFailure::NoSolution),
|
||||
Ok(Some(source)) => match source {
|
||||
ImplSource::UserDefined(impl_) => {
|
||||
if tcx.constness(impl_.impl_def_id) != hir::Constness::Const {
|
||||
if tcx.impl_trait_header(impl_.impl_def_id).unwrap().constness
|
||||
!= hir::Constness::Const
|
||||
{
|
||||
return Err(EvaluationFailure::NoSolution);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user