summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-20676.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-20676.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-20676.rs b/src/test/ui/issues/issue-20676.rs
new file mode 100644
index 000000000..2bc503496
--- /dev/null
+++ b/src/test/ui/issues/issue-20676.rs
@@ -0,0 +1,12 @@
+// run-pass
+// Regression test for #20676. Error was that we didn't support
+// UFCS-style calls to a method in `Trait` where `Self` was bound to a
+// trait object of type `Trait`. See also `ufcs-trait-object.rs`.
+
+
+use std::fmt;
+
+fn main() {
+ let a: &dyn fmt::Debug = &1;
+ format!("{:?}", a);
+}