summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-2734.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-2734.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-2734.rs b/src/test/ui/issues/issue-2734.rs
new file mode 100644
index 000000000..d449f6449
--- /dev/null
+++ b/src/test/ui/issues/issue-2734.rs
@@ -0,0 +1,24 @@
+// run-pass
+#![allow(dead_code)]
+#![allow(non_camel_case_types)]
+
+// pretty-expanded FIXME #23616
+
+#![feature(box_syntax)]
+
+trait hax {
+ fn dummy(&self) { }
+}
+impl<A> hax for A { }
+
+fn perform_hax<T: 'static>(x: Box<T>) -> Box<dyn hax+'static> {
+ box x as Box<dyn hax+'static>
+}
+
+fn deadcode() {
+ perform_hax(box "deadcode".to_string());
+}
+
+pub fn main() {
+ let _ = perform_hax(box 42);
+}