rust/tests/ui/chalkify/trait-objects.rs
2023-01-11 09:32:08 +00:00

13 lines
221 B
Rust

// check-pass
// compile-flags: -Z trait-solver=chalk
use std::fmt::Display;
fn main() {
let d: &dyn Display = &mut 3;
d.to_string();
(&d).to_string();
let f: &dyn Fn(i32) -> _ = &|x| x + x;
f(2);
}