rust/tests/ui/delegation/rename.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
353 B
Rust
Raw Normal View History

2024-03-14 08:41:38 +00:00
//@ check-pass
#![feature(fn_delegation)]
#![allow(incomplete_features)]
mod to_reuse {
pub fn a() {}
pub fn b() {}
2024-03-14 08:41:38 +00:00
}
reuse to_reuse::a as x;
reuse to_reuse::{a as y, b as z};
2024-03-14 08:41:38 +00:00
struct S;
impl S {
reuse to_reuse::a as x;
reuse to_reuse::{a as y, b as z};
2024-03-14 08:41:38 +00:00
}
fn main() {
x();
y();
z();
S::x();
S::y();
S::z();
2024-03-14 08:41:38 +00:00
}