rust/src/test/run-pass/issues/issue-3702.rs

14 lines
181 B
Rust
Raw Normal View History

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