mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +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);
|
|
}
|