diff options
Diffstat (limited to 'tests/ui/issues/issue-20676.rs')
-rw-r--r-- | tests/ui/issues/issue-20676.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-20676.rs b/tests/ui/issues/issue-20676.rs new file mode 100644 index 000000000..2bc503496 --- /dev/null +++ b/tests/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); +} |