mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
c30b41012d
```rust reuse prefix::{a, b, c} ```
28 lines
353 B
Rust
28 lines
353 B
Rust
//@ check-pass
|
|
|
|
#![feature(fn_delegation)]
|
|
#![allow(incomplete_features)]
|
|
|
|
mod to_reuse {
|
|
pub fn a() {}
|
|
pub fn b() {}
|
|
}
|
|
|
|
reuse to_reuse::a as x;
|
|
reuse to_reuse::{a as y, b as z};
|
|
|
|
struct S;
|
|
impl S {
|
|
reuse to_reuse::a as x;
|
|
reuse to_reuse::{a as y, b as z};
|
|
}
|
|
|
|
fn main() {
|
|
x();
|
|
y();
|
|
z();
|
|
S::x();
|
|
S::y();
|
|
S::z();
|
|
}
|