rust/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-76956.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
229 B
Rust
Raw Normal View History

// 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() {}