@@ -79,7 +79,7 @@ pub fn contains_ty_adt_constructor_opaque<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'
7979 return true ;
8080 }
8181
82- if let ty:: Alias ( ty:: Opaque , ty:: AliasTy { def_id, substs : _ } ) = * inner_ty. kind ( ) {
82+ if let ty:: Alias ( ty:: Opaque , ty:: AliasTy { def_id, .. } ) = * inner_ty. kind ( ) {
8383 for & ( predicate, _span) in cx. tcx . explicit_item_bounds ( def_id) {
8484 match predicate. kind ( ) . skip_binder ( ) {
8585 // For `impl Trait<U>`, it will register a predicate of `T: Trait<U>`, so we go through
@@ -250,7 +250,7 @@ pub fn is_must_use_ty<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool {
250250 is_must_use_ty ( cx, * ty)
251251 } ,
252252 ty:: Tuple ( substs) => substs. iter ( ) . any ( |ty| is_must_use_ty ( cx, ty) ) ,
253- ty:: Alias ( ty:: Opaque , ty:: AliasTy { def_id, substs : _ } ) => {
253+ ty:: Alias ( ty:: Opaque , ty:: AliasTy { def_id, .. } ) => {
254254 for ( predicate, _) in cx. tcx . explicit_item_bounds ( * def_id) {
255255 if let ty:: PredicateKind :: Clause ( ty:: Clause :: Trait ( trait_predicate) ) = predicate. kind ( ) . skip_binder ( ) {
256256 if cx. tcx . has_attr ( trait_predicate. trait_ref . def_id , sym:: must_use) {
@@ -631,7 +631,7 @@ pub fn ty_sig<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option<ExprFnSig<'t
631631 Some ( ExprFnSig :: Closure ( decl, subs. as_closure ( ) . sig ( ) ) )
632632 } ,
633633 ty:: FnDef ( id, subs) => Some ( ExprFnSig :: Sig ( cx. tcx . bound_fn_sig ( id) . subst ( cx. tcx , subs) , Some ( id) ) ) ,
634- ty:: Alias ( ty:: Opaque , ty:: AliasTy { def_id, substs : _ } ) => sig_from_bounds ( cx, ty, cx. tcx . item_bounds ( def_id) , cx. tcx . opt_parent ( def_id) ) ,
634+ ty:: Alias ( ty:: Opaque , ty:: AliasTy { def_id, .. } ) => sig_from_bounds ( cx, ty, cx. tcx . item_bounds ( def_id) , cx. tcx . opt_parent ( def_id) ) ,
635635 ty:: FnPtr ( sig) => Some ( ExprFnSig :: Sig ( sig, None ) ) ,
636636 ty:: Dynamic ( bounds, _, _) => {
637637 let lang_items = cx. tcx . lang_items ( ) ;
@@ -1039,10 +1039,10 @@ pub fn make_projection<'tcx>(
10391039 }
10401040 }
10411041
1042- Some ( AliasTy {
1042+ Some ( tcx. mk_alias_ty (
1043+ assoc_item. def_id ,
10431044 substs,
1044- def_id : assoc_item. def_id ,
1045- } )
1045+ ) )
10461046 }
10471047 helper (
10481048 tcx,
0 commit comments