rust/tests/ui/issues/issue-18446-2.rs

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

14 lines
218 B
Rust
Raw Normal View History

// check-pass
#![allow(dead_code)]
// Test that methods in trait impls should override default methods.
trait T {
fn foo(&self) -> i32 { 0 }
}
2019-05-28 13:46:13 -05:00
impl<'a> dyn T + 'a {
fn foo(&self) -> i32 { 1 }
}
fn main() {}