summaryrefslogtreecommitdiffstats
path: root/src/test/ui/traits/alias/import-cross-crate.rs
blob: 868585cd09789f5dc097a760c2edbc422d584b0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// run-pass
// aux-build:greeter.rs

#![feature(trait_alias)]

extern crate greeter;

// Import only the alias, not the real trait.
use greeter::{Greet, Hi};

fn main() {
    let hi = Hi;
    hi.hello(); // From `Hello`, via `Greet` alias.
}