2019-11-03 18:00:00 -06:00
|
|
|
// check-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
2017-03-06 09:19:48 -06:00
|
|
|
// 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 {
|
2017-03-06 09:19:48 -06:00
|
|
|
fn foo(&self) -> i32 { 1 }
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|