File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
compiler/rustc_type_ir/src
src/test/ui/traits/vtable Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -559,6 +559,7 @@ impl<CTX> HashStable<CTX> for FloatTy {
559559impl < CTX > HashStable < CTX > for InferTy {
560560 fn hash_stable ( & self , ctx : & mut CTX , hasher : & mut StableHasher ) {
561561 use InferTy :: * ;
562+ discriminant ( self ) . hash_stable ( ctx, hasher) ;
562563 match self {
563564 TyVar ( v) => v. as_u32 ( ) . hash_stable ( ctx, hasher) ,
564565 IntVar ( v) => v. index . hash_stable ( ctx, hasher) ,
Original file line number Diff line number Diff line change 1+ // check-pass
2+ // incremental
3+
4+ struct Struct < T > ( T ) ;
5+
6+ impl < T > std:: ops:: Deref for Struct < T > {
7+ type Target = dyn Fn ( T ) ;
8+ fn deref ( & self ) -> & Self :: Target {
9+ unimplemented ! ( )
10+ }
11+ }
12+
13+ fn main ( ) {
14+ let f = Struct ( Default :: default ( ) ) ;
15+ f ( 0 ) ;
16+ f ( 0 ) ;
17+ }
You can’t perform that action at this time.
0 commit comments