diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/chalkify/trait-objects.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/chalkify/trait-objects.rs b/src/test/ui/chalkify/trait-objects.rs new file mode 100644 index 000000000..d56abc42b --- /dev/null +++ b/src/test/ui/chalkify/trait-objects.rs @@ -0,0 +1,12 @@ +// check-pass +// compile-flags: -Z 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); +} |