rust/src/test/ui/issues/issue-3702.rs
2019-07-27 18:56:16 +03: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());
}
}