diff options
| author | Michael Goulet <michael@errs.io> | 2021-12-13 20:36:17 -0800 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2021-12-13 20:36:17 -0800 |
| commit | 75729afcc040f8df101baebc7eba438dfb044d72 (patch) | |
| tree | ba388dd587cd66937b43ed1e99b686ec3e4c3dc2 /src/test | |
| parent | 8f117a77d0880ed59afcc1a19c72ec5c1e44b97c (diff) | |
| download | rust-75729afcc040f8df101baebc7eba438dfb044d72.tar.gz rust-75729afcc040f8df101baebc7eba438dfb044d72.zip | |
Fix HashStable implementation on InferTy
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/traits/vtable/issue-91807.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/traits/vtable/issue-91807.rs b/src/test/ui/traits/vtable/issue-91807.rs new file mode 100644 index 00000000000..f435ff09dc3 --- /dev/null +++ b/src/test/ui/traits/vtable/issue-91807.rs @@ -0,0 +1,17 @@ +// check-pass +// incremental + +struct Struct<T>(T); + +impl<T> std::ops::Deref for Struct<T> { + type Target = dyn Fn(T); + fn deref(&self) -> &Self::Target { + unimplemented!() + } +} + +fn main() { + let f = Struct(Default::default()); + f(0); + f(0); +} |
