Move impl constness into impl trait header
This commit is contained in:
parent
c0e0d8f874
commit
2ffe3b1e70
8 changed files with 35 additions and 33 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue