rust/tests/ui/issues/issue-3702.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
185 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
}
2019-05-28 13:47:21 -05:00
fn to_string(t: Box<dyn Text>) {
println!("{}", (*t).to_string());
2012-12-06 20:32:13 -06:00
}
}