rust/tests/ui/issues/issue-20676.rs
2024-07-06 14:24:20 +02:00

13 lines
310 B
Rust

//@ 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;
let _ = format!("{:?}", a);
}