summaryrefslogtreecommitdiffstats
path: root/src/test/ui/cast/codegen-object-shim.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/cast/codegen-object-shim.rs')
-rw-r--r--src/test/ui/cast/codegen-object-shim.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/cast/codegen-object-shim.rs b/src/test/ui/cast/codegen-object-shim.rs
new file mode 100644
index 000000000..9a85a50eb
--- /dev/null
+++ b/src/test/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"));
+}