@@ -184,7 +184,7 @@ pub enum TyKind<I: Interner> {
184
184
/// while for TAIT it is used for the generic parameters of the alias.
185
185
///
186
186
/// 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 ) ,
188
188
189
189
/// A type parameter; for example, `T` in `fn f<T>(x: T) {}`.
190
190
Param ( I :: ParamTy ) ,
@@ -253,7 +253,7 @@ const fn tykind_discriminant<I: Interner>(value: &TyKind<I>) -> usize {
253
253
Never => 18 ,
254
254
Tuple ( _) => 19 ,
255
255
Projection ( _) => 20 ,
256
- Opaque ( _, _ ) => 21 ,
256
+ Opaque ( _) => 21 ,
257
257
Param ( _) => 22 ,
258
258
Bound ( _, _) => 23 ,
259
259
Placeholder ( _) => 24 ,
@@ -287,7 +287,7 @@ impl<I: Interner> Clone for TyKind<I> {
287
287
Never => Never ,
288
288
Tuple ( t) => Tuple ( t. clone ( ) ) ,
289
289
Projection ( p) => Projection ( p. clone ( ) ) ,
290
- Opaque ( d , s ) => Opaque ( d . clone ( ) , s . clone ( ) ) ,
290
+ Opaque ( o ) => Opaque ( o . clone ( ) ) ,
291
291
Param ( p) => Param ( p. clone ( ) ) ,
292
292
Bound ( d, b) => Bound ( d. clone ( ) , b. clone ( ) ) ,
293
293
Placeholder ( p) => Placeholder ( p. clone ( ) ) ,
@@ -324,7 +324,7 @@ impl<I: Interner> PartialEq for TyKind<I> {
324
324
( GeneratorWitness ( a_g) , GeneratorWitness ( b_g) ) => a_g == b_g,
325
325
( Tuple ( a_t) , Tuple ( b_t) ) => a_t == b_t,
326
326
( 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 ,
328
328
( Param ( a_p) , Param ( b_p) ) => a_p == b_p,
329
329
( Bound ( a_d, a_b) , Bound ( b_d, b_b) ) => a_d == b_d && a_b == b_b,
330
330
( Placeholder ( a_p) , Placeholder ( b_p) ) => a_p == b_p,
@@ -382,7 +382,7 @@ impl<I: Interner> Ord for TyKind<I> {
382
382
( GeneratorWitness ( a_g) , GeneratorWitness ( b_g) ) => a_g. cmp ( b_g) ,
383
383
( Tuple ( a_t) , Tuple ( b_t) ) => a_t. cmp ( b_t) ,
384
384
( 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 ) ,
386
386
( Param ( a_p) , Param ( b_p) ) => a_p. cmp ( b_p) ,
387
387
( Bound ( a_d, a_b) , Bound ( b_d, b_b) ) => a_d. cmp ( b_d) . then_with ( || a_b. cmp ( b_b) ) ,
388
388
( Placeholder ( a_p) , Placeholder ( b_p) ) => a_p. cmp ( b_p) ,
@@ -444,9 +444,8 @@ impl<I: Interner> hash::Hash for TyKind<I> {
444
444
GeneratorWitness ( g) => g. hash ( state) ,
445
445
Tuple ( t) => t. hash ( state) ,
446
446
Projection ( p) => p. hash ( state) ,
447
- Opaque ( d, s) => {
448
- d. hash ( state) ;
449
- s. hash ( state)
447
+ Opaque ( o) => {
448
+ o. hash ( state) ;
450
449
}
451
450
Param ( p) => p. hash ( state) ,
452
451
Bound ( d, b) => {
@@ -486,7 +485,7 @@ impl<I: Interner> fmt::Debug for TyKind<I> {
486
485
Never => f. write_str ( "Never" ) ,
487
486
Tuple ( t) => f. debug_tuple_field1_finish ( "Tuple" , t) ,
488
487
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 ) ,
490
489
Param ( p) => f. debug_tuple_field1_finish ( "Param" , p) ,
491
490
Bound ( d, b) => f. debug_tuple_field2_finish ( "Bound" , d, b) ,
492
491
Placeholder ( p) => f. debug_tuple_field1_finish ( "Placeholder" , p) ,
@@ -515,6 +514,7 @@ where
515
514
I :: ListTy : Encodable < E > ,
516
515
I :: ProjectionTy : Encodable < E > ,
517
516
I :: ParamTy : Encodable < E > ,
517
+ I :: OpaqueTy : Encodable < E > ,
518
518
I :: BoundTy : Encodable < E > ,
519
519
I :: PlaceholderType : Encodable < E > ,
520
520
I :: InferTy : Encodable < E > ,
@@ -589,9 +589,8 @@ where
589
589
Projection ( p) => e. emit_enum_variant ( disc, |e| {
590
590
p. encode ( e) ;
591
591
} ) ,
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) ;
595
594
} ) ,
596
595
Param ( p) => e. emit_enum_variant ( disc, |e| {
597
596
p. encode ( e) ;
@@ -632,6 +631,7 @@ where
632
631
I :: ListTy : Decodable < D > ,
633
632
I :: ProjectionTy : Decodable < D > ,
634
633
I :: ParamTy : Decodable < D > ,
634
+ I :: OpaqueTy : Decodable < D > ,
635
635
I :: BoundTy : Decodable < D > ,
636
636
I :: PlaceholderType : Decodable < D > ,
637
637
I :: InferTy : Decodable < D > ,
@@ -661,7 +661,7 @@ where
661
661
18 => Never ,
662
662
19 => Tuple ( Decodable :: decode ( d) ) ,
663
663
20 => Projection ( Decodable :: decode ( d) ) ,
664
- 21 => Opaque ( Decodable :: decode ( d) , Decodable :: decode ( d ) ) ,
664
+ 21 => Opaque ( Decodable :: decode ( d) ) ,
665
665
22 => Param ( Decodable :: decode ( d) ) ,
666
666
23 => Bound ( Decodable :: decode ( d) , Decodable :: decode ( d) ) ,
667
667
24 => Placeholder ( Decodable :: decode ( d) ) ,
@@ -698,6 +698,7 @@ where
698
698
I :: ProjectionTy : HashStable < CTX > ,
699
699
I :: BoundTy : HashStable < CTX > ,
700
700
I :: ParamTy : HashStable < CTX > ,
701
+ I :: OpaqueTy : HashStable < CTX > ,
701
702
I :: PlaceholderType : HashStable < CTX > ,
702
703
I :: InferTy : HashStable < CTX > ,
703
704
I :: ErrorGuaranteed : HashStable < CTX > ,
@@ -775,9 +776,8 @@ where
775
776
Projection ( p) => {
776
777
p. hash_stable ( __hcx, __hasher) ;
777
778
}
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) ;
781
781
}
782
782
Param ( p) => {
783
783
p. hash_stable ( __hcx, __hasher) ;
0 commit comments