@@ -110,7 +110,6 @@ use rustc_infer::infer::{self, InferCtxt, InferOk, InferResult, TyCtxtInferExt};
110
110
use rustc_middle:: hir:: map:: blocks:: FnLikeNode ;
111
111
use rustc_middle:: middle:: region;
112
112
use rustc_middle:: mir:: interpret:: ConstValue ;
113
- use rustc_middle:: traits:: util:: impl_is_default;
114
113
use rustc_middle:: ty:: adjustment:: {
115
114
Adjust , Adjustment , AllowTwoPhase , AutoBorrow , AutoBorrowMutability , PointerCast ,
116
115
} ;
@@ -1943,7 +1942,7 @@ fn check_specialization_validity<'tcx>(
1943
1942
// grandparent. In that case, if parent is a `default impl`, inherited items use the
1944
1943
// "defaultness" from the grandparent, else they are final.
1945
1944
None => {
1946
- if impl_is_default ( tcx, parent_impl. def_id ( ) ) {
1945
+ if tcx. impl_defaultness ( parent_impl. def_id ( ) ) . is_default ( ) {
1947
1946
None
1948
1947
} else {
1949
1948
Some ( Err ( parent_impl. def_id ( ) ) )
@@ -2118,7 +2117,7 @@ fn check_impl_items_against_trait<'tcx>(
2118
2117
. map ( |node_item| !node_item. defining_node . is_from_trait ( ) )
2119
2118
. unwrap_or ( false ) ;
2120
2119
2121
- if !is_implemented && ! impl_is_default ( tcx, impl_id) {
2120
+ if !is_implemented && tcx. impl_defaultness ( impl_id) . is_final ( ) {
2122
2121
if !trait_item. defaultness . has_value ( ) {
2123
2122
missing_items. push ( * trait_item) ;
2124
2123
}
0 commit comments