@@ -338,13 +338,14 @@ pub fn unexpected_hidden_region_diagnostic<'tcx>(
338
338
339
339
impl < ' tcx > InferCtxt < ' tcx > {
340
340
pub fn get_impl_future_output_ty ( & self , ty : Ty < ' tcx > ) -> Option < Ty < ' tcx > > {
341
- // FIXME(alias): Merge these
342
341
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
+ ) =>
346
347
{
347
- ( data . def_id , data . substs )
348
+ ( def_id, substs)
348
349
}
349
350
_ => return None ,
350
351
} ;
@@ -1730,7 +1731,6 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
1730
1731
TypeError :: Sorts ( values) => {
1731
1732
let extra = expected == found;
1732
1733
let sort_string = |ty : Ty < ' tcx > , path : Option < PathBuf > | {
1733
- // FIXME(alias): Merge these
1734
1734
let mut s = match ( extra, ty. kind ( ) ) {
1735
1735
( true , ty:: Alias ( ty:: Opaque , ty:: AliasTy { def_id, .. } ) ) => {
1736
1736
let sm = self . tcx . sess . source_map ( ) ;
0 commit comments