summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-18446-2.rs
blob: 85422d4d2611a8b0fd98269f556a24eb00033b20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// check-pass
#![allow(dead_code)]
// Test that methods in trait impls should override default methods.

trait T {
    fn foo(&self) -> i32 { 0 }
}

impl<'a> dyn T + 'a {
    fn foo(&self) -> i32 { 1 }
}

fn main() {}