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-07 02:32:13 +00:00
trait Text {
fn to_string(&self) -> String;
2012-12-07 02:32:13 +00:00
}
2019-05-28 18:47:21 +00:00
fn to_string(t: Box<dyn Text>) {
println!("{}", (*t).to_string());
2012-12-07 02:32:13 +00:00
}
}