2019-03-15 14:55:04 -07:00
|
|
|
// run-pass
|
2021-02-08 23:15:45 +01:00
|
|
|
// aux-build:greeter.rs
|
2019-03-15 14:55:04 -07:00
|
|
|
|
|
|
|
#![feature(trait_alias)]
|
|
|
|
|
2021-02-08 23:15:45 +01:00
|
|
|
extern crate greeter;
|
2019-03-15 14:55:04 -07:00
|
|
|
|
|
|
|
// Import only the alias, not the real trait.
|
2021-02-08 23:15:45 +01:00
|
|
|
use greeter::{Greet, Hi};
|
2019-03-15 14:55:04 -07:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let hi = Hi;
|
|
|
|
hi.hello(); // From `Hello`, via `Greet` alias.
|
|
|
|
}
|