rust/tests/ui/autoref-autoderef/autoderef-vec-box-fn-36786.rs
2025-08-02 15:29:16 -04:00

10 lines
220 B
Rust

// https://github.com/rust-lang/rust/issues/36786
//@ run-pass
// Ensure that types that rely on obligations are autoderefed
// correctly
fn main() {
let x : Vec<Box<dyn Fn()>> = vec![Box::new(|| ())];
x[0]()
}