about summary refs log tree commit diff
path: root/tests/ui/delegation/duplicate-definition-inside-trait-impl.rs
blob: 9c7afcef3ec12ec283d205c327ff021f99089413 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#![feature(fn_delegation)]
#![allow(incomplete_features)]

trait Trait {
    fn foo(&self) -> u32 { 0 }
}

struct F;
struct S;

mod to_reuse {
    use crate::S;

    pub fn foo(_: &S) -> u32 { 0 }
}

impl Trait for S {
    reuse to_reuse::foo { self }
    reuse Trait::foo;
    //~^ ERROR  duplicate definitions with name `foo`
}

fn main() {}