rust/tests/ui/issues/issue-3702.rs
2023-01-11 09:32:08 +00:00

14 lines
185 B
Rust

// run-pass
#![allow(dead_code)]
pub fn main() {
trait Text {
fn to_string(&self) -> String;
}
fn to_string(t: Box<dyn Text>) {
println!("{}", (*t).to_string());
}
}