@@ -184,7 +184,7 @@ pub enum TyKind<I: Interner> {
184184 /// while for TAIT it is used for the generic parameters of the alias.
185185 ///
186186 /// During codegen, `tcx.type_of(def_id)` can be used to get the underlying type.
187- Opaque ( I :: DefId , I :: SubstsRef ) ,
187+ Opaque ( I :: OpaqueTy ) ,
188188
189189 /// A type parameter; for example, `T` in `fn f<T>(x: T) {}`.
190190 Param ( I :: ParamTy ) ,
@@ -253,7 +253,7 @@ const fn tykind_discriminant<I: Interner>(value: &TyKind<I>) -> usize {
253253 Never => 18 ,
254254 Tuple ( _) => 19 ,
255255 Projection ( _) => 20 ,
256- Opaque ( _, _ ) => 21 ,
256+ Opaque ( _) => 21 ,
257257 Param ( _) => 22 ,
258258 Bound ( _, _) => 23 ,
259259 Placeholder ( _) => 24 ,
@@ -287,7 +287,7 @@ impl<I: Interner> Clone for TyKind<I> {
287287 Never => Never ,
288288 Tuple ( t) => Tuple ( t. clone ( ) ) ,
289289 Projection ( p) => Projection ( p. clone ( ) ) ,
290- Opaque ( d , s ) => Opaque ( d . clone ( ) , s . clone ( ) ) ,
290+ Opaque ( o ) => Opaque ( o . clone ( ) ) ,
291291 Param ( p) => Param ( p. clone ( ) ) ,
292292 Bound ( d, b) => Bound ( d. clone ( ) , b. clone ( ) ) ,
293293 Placeholder ( p) => Placeholder ( p. clone ( ) ) ,
@@ -324,7 +324,7 @@ impl<I: Interner> PartialEq for TyKind<I> {
324324 ( GeneratorWitness ( a_g) , GeneratorWitness ( b_g) ) => a_g == b_g,
325325 ( Tuple ( a_t) , Tuple ( b_t) ) => a_t == b_t,
326326 ( Projection ( a_p) , Projection ( b_p) ) => a_p == b_p,
327- ( Opaque ( a_d , a_s ) , Opaque ( b_d , b_s ) ) => a_d == b_d && a_s == b_s ,
327+ ( Opaque ( a_o ) , Opaque ( b_o ) ) => a_o == b_o ,
328328 ( Param ( a_p) , Param ( b_p) ) => a_p == b_p,
329329 ( Bound ( a_d, a_b) , Bound ( b_d, b_b) ) => a_d == b_d && a_b == b_b,
330330 ( Placeholder ( a_p) , Placeholder ( b_p) ) => a_p == b_p,
@@ -382,7 +382,7 @@ impl<I: Interner> Ord for TyKind<I> {
382382 ( GeneratorWitness ( a_g) , GeneratorWitness ( b_g) ) => a_g. cmp ( b_g) ,
383383 ( Tuple ( a_t) , Tuple ( b_t) ) => a_t. cmp ( b_t) ,
384384 ( Projection ( a_p) , Projection ( b_p) ) => a_p. cmp ( b_p) ,
385- ( Opaque ( a_d , a_s ) , Opaque ( b_d , b_s ) ) => a_d . cmp ( b_d ) . then_with ( || a_s . cmp ( b_s ) ) ,
385+ ( Opaque ( a_o ) , Opaque ( b_o ) ) => a_o . cmp ( b_o ) ,
386386 ( Param ( a_p) , Param ( b_p) ) => a_p. cmp ( b_p) ,
387387 ( Bound ( a_d, a_b) , Bound ( b_d, b_b) ) => a_d. cmp ( b_d) . then_with ( || a_b. cmp ( b_b) ) ,
388388 ( Placeholder ( a_p) , Placeholder ( b_p) ) => a_p. cmp ( b_p) ,
@@ -444,9 +444,8 @@ impl<I: Interner> hash::Hash for TyKind<I> {
444444 GeneratorWitness ( g) => g. hash ( state) ,
445445 Tuple ( t) => t. hash ( state) ,
446446 Projection ( p) => p. hash ( state) ,
447- Opaque ( d, s) => {
448- d. hash ( state) ;
449- s. hash ( state)
447+ Opaque ( o) => {
448+ o. hash ( state) ;
450449 }
451450 Param ( p) => p. hash ( state) ,
452451 Bound ( d, b) => {
@@ -486,7 +485,7 @@ impl<I: Interner> fmt::Debug for TyKind<I> {
486485 Never => f. write_str ( "Never" ) ,
487486 Tuple ( t) => f. debug_tuple_field1_finish ( "Tuple" , t) ,
488487 Projection ( p) => f. debug_tuple_field1_finish ( "Projection" , p) ,
489- Opaque ( d , s ) => f. debug_tuple_field2_finish ( "Opaque" , d , s ) ,
488+ Opaque ( o ) => f. debug_tuple_field1_finish ( "Opaque" , o ) ,
490489 Param ( p) => f. debug_tuple_field1_finish ( "Param" , p) ,
491490 Bound ( d, b) => f. debug_tuple_field2_finish ( "Bound" , d, b) ,
492491 Placeholder ( p) => f. debug_tuple_field1_finish ( "Placeholder" , p) ,
@@ -515,6 +514,7 @@ where
515514 I :: ListTy : Encodable < E > ,
516515 I :: ProjectionTy : Encodable < E > ,
517516 I :: ParamTy : Encodable < E > ,
517+ I :: OpaqueTy : Encodable < E > ,
518518 I :: BoundTy : Encodable < E > ,
519519 I :: PlaceholderType : Encodable < E > ,
520520 I :: InferTy : Encodable < E > ,
@@ -589,9 +589,8 @@ where
589589 Projection ( p) => e. emit_enum_variant ( disc, |e| {
590590 p. encode ( e) ;
591591 } ) ,
592- Opaque ( def_id, substs) => e. emit_enum_variant ( disc, |e| {
593- def_id. encode ( e) ;
594- substs. encode ( e) ;
592+ Opaque ( o) => e. emit_enum_variant ( disc, |e| {
593+ o. encode ( e) ;
595594 } ) ,
596595 Param ( p) => e. emit_enum_variant ( disc, |e| {
597596 p. encode ( e) ;
@@ -632,6 +631,7 @@ where
632631 I :: ListTy : Decodable < D > ,
633632 I :: ProjectionTy : Decodable < D > ,
634633 I :: ParamTy : Decodable < D > ,
634+ I :: OpaqueTy : Decodable < D > ,
635635 I :: BoundTy : Decodable < D > ,
636636 I :: PlaceholderType : Decodable < D > ,
637637 I :: InferTy : Decodable < D > ,
@@ -661,7 +661,7 @@ where
661661 18 => Never ,
662662 19 => Tuple ( Decodable :: decode ( d) ) ,
663663 20 => Projection ( Decodable :: decode ( d) ) ,
664- 21 => Opaque ( Decodable :: decode ( d) , Decodable :: decode ( d ) ) ,
664+ 21 => Opaque ( Decodable :: decode ( d) ) ,
665665 22 => Param ( Decodable :: decode ( d) ) ,
666666 23 => Bound ( Decodable :: decode ( d) , Decodable :: decode ( d) ) ,
667667 24 => Placeholder ( Decodable :: decode ( d) ) ,
@@ -698,6 +698,7 @@ where
698698 I :: ProjectionTy : HashStable < CTX > ,
699699 I :: BoundTy : HashStable < CTX > ,
700700 I :: ParamTy : HashStable < CTX > ,
701+ I :: OpaqueTy : HashStable < CTX > ,
701702 I :: PlaceholderType : HashStable < CTX > ,
702703 I :: InferTy : HashStable < CTX > ,
703704 I :: ErrorGuaranteed : HashStable < CTX > ,
@@ -775,9 +776,8 @@ where
775776 Projection ( p) => {
776777 p. hash_stable ( __hcx, __hasher) ;
777778 }
778- Opaque ( def_id, substs) => {
779- def_id. hash_stable ( __hcx, __hasher) ;
780- substs. hash_stable ( __hcx, __hasher) ;
779+ Opaque ( o) => {
780+ o. hash_stable ( __hcx, __hasher) ;
781781 }
782782 Param ( p) => {
783783 p. hash_stable ( __hcx, __hasher) ;
0 commit comments