blob: 7d50a24448069de381f077773dac8f78fa93f373 [file] [log] [blame] [edit]
//@ run-pass
//! Regression test for <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/blob/ec2cc76/tests/ui/traits/ufcs-object.rs>.
use std::fmt;
fn main() {
let a: &dyn fmt::Debug = &1;
let _ = format!("{:?}", a);
}