File tree Expand file tree Collapse file tree 5 files changed +24
-1
lines changed
src/tools/rust-analyzer/crates/hir-ty/src/next_solver Expand file tree Collapse file tree 5 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ impl<'db> Const<'db> {
36
36
internee : kind,
37
37
flags : flags. flags ,
38
38
outer_exclusive_binder : flags. outer_exclusive_binder ,
39
+ #[ cfg( feature = "in-rust-tree" ) ]
40
+ stable_hash : {
41
+ // SAFETY: These have the same layout.
42
+ unsafe { std:: mem:: transmute ( crate :: next_solver:: util:: Fingerprint :: ZERO ) }
43
+ } ,
39
44
} ;
40
45
Const :: new_ ( interner. db ( ) , InternedWrapperNoDebug ( cached) )
41
46
}
Original file line number Diff line number Diff line change 1
- pub use ra_ap_rustc_next_trait_solver :: solve:: inspect:: * ;
1
+ pub use rustc_next_trait_solver :: solve:: inspect:: * ;
2
2
3
3
use rustc_ast_ir:: try_visit;
4
4
use rustc_next_trait_solver:: {
Original file line number Diff line number Diff line change @@ -227,6 +227,11 @@ impl<'db> Predicate<'db> {
227
227
internee : kind,
228
228
flags : flags. flags ,
229
229
outer_exclusive_binder : flags. outer_exclusive_binder ,
230
+ #[ cfg( feature = "in-rust-tree" ) ]
231
+ stable_hash : {
232
+ // SAFETY: These have the same layout.
233
+ unsafe { std:: mem:: transmute ( crate :: next_solver:: util:: Fingerprint :: ZERO ) }
234
+ } ,
230
235
} ;
231
236
Predicate :: new_ ( interner. db ( ) , InternedWrapperNoDebug ( cached) )
232
237
}
Original file line number Diff line number Diff line change @@ -60,6 +60,11 @@ impl<'db> Ty<'db> {
60
60
internee : kind,
61
61
flags : flags. flags ,
62
62
outer_exclusive_binder : flags. outer_exclusive_binder ,
63
+ #[ cfg( feature = "in-rust-tree" ) ]
64
+ stable_hash : {
65
+ // SAFETY: These have the same layout.
66
+ unsafe { std:: mem:: transmute ( crate :: next_solver:: util:: Fingerprint :: ZERO ) }
67
+ } ,
63
68
} ;
64
69
Ty :: new_ ( interner. db ( ) , InternedWrapperNoDebug ( cached) )
65
70
}
Original file line number Diff line number Diff line change @@ -1062,3 +1062,11 @@ pub fn sizedness_fast_path<'db>(
1062
1062
1063
1063
false
1064
1064
}
1065
+
1066
+ /// This is a copy of [`rustc_data_structures::fingerprint::Fingerprint`], which we can't construct on stable.
1067
+ #[ repr( C ) ]
1068
+ pub struct Fingerprint ( u64 , u64 ) ;
1069
+
1070
+ impl Fingerprint {
1071
+ pub const ZERO : Fingerprint = Fingerprint ( 0 , 0 ) ;
1072
+ }
You can’t perform that action at this time.
0 commit comments