mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
13 lines
221 B
Rust
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);
|
|
}
|