2024-03-16 13:03:36 -05:00
|
|
|
#![feature(fn_delegation)]
|
2024-03-26 10:59:03 -05:00
|
|
|
#![allow(incomplete_features)]
|
2024-03-16 13:03:36 -05:00
|
|
|
|
|
|
|
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() {}
|