about summary refs log tree commit diff
path: root/tests/ui/cast/codegen-object-shim.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/cast/codegen-object-shim.rs')
-rw-r--r--tests/ui/cast/codegen-object-shim.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/cast/codegen-object-shim.rs b/tests/ui/cast/codegen-object-shim.rs
new file mode 100644
index 00000000000..9a85a50ebd9
--- /dev/null
+++ b/tests/ui/cast/codegen-object-shim.rs
@@ -0,0 +1,6 @@
+// run-pass
+
+fn main() {
+    assert_eq!((ToString::to_string as fn(&(dyn ToString+'static)) -> String)(&"foo"),
+        String::from("foo"));
+}