@@ -79,7 +79,7 @@ pub fn contains_ty_adt_constructor_opaque<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'
79
79
return true ;
80
80
}
81
81
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 ( ) {
83
83
for & ( predicate, _span) in cx. tcx . explicit_item_bounds ( def_id) {
84
84
match predicate. kind ( ) . skip_binder ( ) {
85
85
// 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 {
250
250
is_must_use_ty ( cx, * ty)
251
251
} ,
252
252
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, .. } ) => {
254
254
for ( predicate, _) in cx. tcx . explicit_item_bounds ( * def_id) {
255
255
if let ty:: PredicateKind :: Clause ( ty:: Clause :: Trait ( trait_predicate) ) = predicate. kind ( ) . skip_binder ( ) {
256
256
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
631
631
Some ( ExprFnSig :: Closure ( decl, subs. as_closure ( ) . sig ( ) ) )
632
632
} ,
633
633
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) ) ,
635
635
ty:: FnPtr ( sig) => Some ( ExprFnSig :: Sig ( sig, None ) ) ,
636
636
ty:: Dynamic ( bounds, _, _) => {
637
637
let lang_items = cx. tcx . lang_items ( ) ;
@@ -1039,10 +1039,10 @@ pub fn make_projection<'tcx>(
1039
1039
}
1040
1040
}
1041
1041
1042
- Some ( AliasTy {
1042
+ Some ( tcx. mk_alias_ty (
1043
+ assoc_item. def_id ,
1043
1044
substs,
1044
- def_id : assoc_item. def_id ,
1045
- } )
1045
+ ) )
1046
1046
}
1047
1047
helper (
1048
1048
tcx,
0 commit comments