@@ -338,13 +338,14 @@ pub fn unexpected_hidden_region_diagnostic<'tcx>(
338338
339339impl < ' tcx > InferCtxt < ' tcx > {
340340 pub fn get_impl_future_output_ty ( & self , ty : Ty < ' tcx > ) -> Option < Ty < ' tcx > > {
341- // FIXME(alias): Merge these
342341 let ( def_id, substs) = match * ty. kind ( ) {
343- ty:: Alias ( ty:: Opaque , ty:: AliasTy { def_id, substs } ) => ( def_id, substs) ,
344- ty:: Alias ( ty:: Projection , data)
345- if self . tcx . def_kind ( data. def_id ) == DefKind :: ImplTraitPlaceholder =>
342+ ty:: Alias ( _, ty:: AliasTy { def_id, substs } )
343+ if matches ! (
344+ self . tcx. def_kind( def_id) ,
345+ DefKind :: OpaqueTy | DefKind :: ImplTraitPlaceholder
346+ ) =>
346347 {
347- ( data . def_id , data . substs )
348+ ( def_id, substs)
348349 }
349350 _ => return None ,
350351 } ;
@@ -1730,7 +1731,6 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
17301731 TypeError :: Sorts ( values) => {
17311732 let extra = expected == found;
17321733 let sort_string = |ty : Ty < ' tcx > , path : Option < PathBuf > | {
1733- // FIXME(alias): Merge these
17341734 let mut s = match ( extra, ty. kind ( ) ) {
17351735 ( true , ty:: Alias ( ty:: Opaque , ty:: AliasTy { def_id, .. } ) ) => {
17361736 let sm = self . tcx . sess . source_map ( ) ;
0 commit comments