mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
15 lines
242 B
Rust
15 lines
242 B
Rust
// 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.
|
|
}
|