@@ -110,7 +110,6 @@ use rustc_infer::infer::{self, InferCtxt, InferOk, InferResult, TyCtxtInferExt};
110110use rustc_middle:: hir:: map:: blocks:: FnLikeNode ;
111111use rustc_middle:: middle:: region;
112112use rustc_middle:: mir:: interpret:: ConstValue ;
113- use rustc_middle:: traits:: util:: impl_is_default;
114113use rustc_middle:: ty:: adjustment:: {
115114 Adjust , Adjustment , AllowTwoPhase , AutoBorrow , AutoBorrowMutability , PointerCast ,
116115} ;
@@ -1943,7 +1942,7 @@ fn check_specialization_validity<'tcx>(
19431942 // grandparent. In that case, if parent is a `default impl`, inherited items use the
19441943 // "defaultness" from the grandparent, else they are final.
19451944 None => {
1946- if impl_is_default ( tcx, parent_impl. def_id ( ) ) {
1945+ if tcx. impl_defaultness ( parent_impl. def_id ( ) ) . is_default ( ) {
19471946 None
19481947 } else {
19491948 Some ( Err ( parent_impl. def_id ( ) ) )
@@ -2118,7 +2117,7 @@ fn check_impl_items_against_trait<'tcx>(
21182117 . map ( |node_item| !node_item. defining_node . is_from_trait ( ) )
21192118 . unwrap_or ( false ) ;
21202119
2121- if !is_implemented && ! impl_is_default ( tcx, impl_id) {
2120+ if !is_implemented && tcx. impl_defaultness ( impl_id) . is_final ( ) {
21222121 if !trait_item. defaultness . has_value ( ) {
21232122 missing_items. push ( * trait_item) ;
21242123 }
0 commit comments