@@ -1546,10 +1546,10 @@ impl<'a, 'gcx, 'tcx> TyS<'tcx> {
15461546 /// Checks whether a type is definitely uninhabited. This is
15471547 /// conservative: for some types that are uninhabited we return `false`,
15481548 /// but we only return `true` for types that are definitely uninhabited.
1549- /// `ty.conservative_is_uninhabited ` implies that any value of type `ty`
1549+ /// `ty.conservative_is_privately_uninhabited ` implies that any value of type `ty`
15501550 /// will be `Abi::Uninhabited`. (Note that uninhabited types may have nonzero
15511551 /// size, to account for partial initialisation. See #49298 for details.)
1552- pub fn conservative_is_uninhabited ( & self , tcx : TyCtxt < ' a , ' gcx , ' tcx > ) -> bool {
1552+ pub fn conservative_is_privately_uninhabited ( & self , tcx : TyCtxt < ' a , ' gcx , ' tcx > ) -> bool {
15531553 // FIXME(varkor): we can make this less conversative by substituting concrete
15541554 // type arguments.
15551555 match self . sty {
@@ -1565,16 +1565,16 @@ impl<'a, 'gcx, 'tcx> TyS<'tcx> {
15651565 // one uninhabited field.
15661566 def. variants . iter ( ) . all ( |var| {
15671567 var. fields . iter ( ) . any ( |field| {
1568- tcx. type_of ( field. did ) . conservative_is_uninhabited ( tcx)
1568+ tcx. type_of ( field. did ) . conservative_is_privately_uninhabited ( tcx)
15691569 } )
15701570 } )
15711571 }
1572- ty:: Tuple ( tys) => tys. iter ( ) . any ( |ty| ty. conservative_is_uninhabited ( tcx) ) ,
1572+ ty:: Tuple ( tys) => tys. iter ( ) . any ( |ty| ty. conservative_is_privately_uninhabited ( tcx) ) ,
15731573 ty:: Array ( ty, len) => {
15741574 match len. assert_usize ( tcx) {
15751575 // If the array is definitely non-empty, it's uninhabited if
15761576 // the type of its elements is uninhabited.
1577- Some ( n) if n != 0 => ty. conservative_is_uninhabited ( tcx) ,
1577+ Some ( n) if n != 0 => ty. conservative_is_privately_uninhabited ( tcx) ,
15781578 _ => false
15791579 }
15801580 }
0 commit comments