about summary refs log tree commit diff
path: root/tests/ui/delegation/rename.rs
blob: 80b8724a5bf9e87d35756457cf4320d82daf4265 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//@ 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();
}