diff options
Diffstat (limited to 'tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-76956.rs')
-rw-r--r-- | tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-76956.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-76956.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-76956.rs new file mode 100644 index 000000000..583470080 --- /dev/null +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-76956.rs @@ -0,0 +1,15 @@ +// check-pass + +use std::ops::Deref; + +struct Data { + boxed: Box<&'static i32> +} + +impl Data { + fn use_data(&self, user: impl for <'a> FnOnce(<Box<&'a i32> as Deref>::Target)) { + user(*self.boxed) + } +} + +fn main() {} |