We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f117a7 commit 75729afCopy full SHA for 75729af
compiler/rustc_type_ir/src/lib.rs
@@ -559,6 +559,7 @@ impl<CTX> HashStable<CTX> for FloatTy {
559
impl<CTX> HashStable<CTX> for InferTy {
560
fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
561
use InferTy::*;
562
+ discriminant(self).hash_stable(ctx, hasher);
563
match self {
564
TyVar(v) => v.as_u32().hash_stable(ctx, hasher),
565
IntVar(v) => v.index.hash_stable(ctx, hasher),
src/test/ui/traits/vtable/issue-91807.rs
@@ -0,0 +1,17 @@
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
17
0 commit comments