summary refs log tree commit diff
path: root/src/test/ui/chalkify/trait-objects.rs
blob: 13d9e6a6578856fd89c5a359bcf2f4434280ce0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// check-pass
// compile-flags: -Z chalk

use std::fmt::Display;

fn main() {
    let d: &dyn Display = &mut 3;
    // FIXME(chalk) should be able to call d.to_string() as well, but doing so
    // requires Chalk to be able to prove trait object well-formed goals.
    (&d).to_string();
    let f: &dyn Fn(i32) -> _ = &|x| x + x;
    f(2);
}