mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 12:07:40 +00:00
26 lines
409 B
Rust
26 lines
409 B
Rust
![]() |
//@ 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();
|
||
|
}
|