mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
24 lines
365 B
Rust
24 lines
365 B
Rust
#![feature(fn_delegation)]
|
|
//~^ WARN the feature `fn_delegation` is incomplete
|
|
|
|
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() {}
|