blob: f48d549b3eb2cc2a386da36c71a7be430d93a7ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// 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());
}
}
|