blob: bd263be59cc7d1d8f49111e5bd8d9ea19057fc7b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
//@ run-pass
//@ check-run-results
#![feature(supertrait_item_shadowing)]
#![allow(dead_code)]
mod out_of_scope {
pub trait Subtrait: super::Supertrait {
fn hello(&self) {
println!("subtrait");
}
}
impl<T> Subtrait for T {}
}
trait Supertrait {
fn hello(&self) {
println!("supertrait");
}
}
impl<T> Supertrait for T {}
fn main() {
().hello();
}
|