rust/tests/ui/delegation/rename.rs
Vadim Petrochenkov c30b41012d delegation: Implement list delegation
```rust
reuse prefix::{a, b, c}
```
2024-05-15 02:32:59 +03:00

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();
}