mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-12 08:36:03 +00:00
26 lines
428 B
Rust
26 lines
428 B
Rust
#![feature(fn_delegation)]
|
|
#![allow(incomplete_features)]
|
|
|
|
trait Trait {
|
|
fn foo(&self) {}
|
|
}
|
|
|
|
struct F;
|
|
impl Trait for F {}
|
|
struct S(F);
|
|
|
|
pub mod to_reuse {
|
|
use crate::F;
|
|
|
|
pub fn foo(_: &F) {}
|
|
}
|
|
|
|
impl Trait for S {
|
|
// Make sure that the method call is not generated if the path resolution
|
|
// does not have a `self` parameter.
|
|
reuse to_reuse::foo { self.0 }
|
|
//~^ ERROR mismatched types
|
|
}
|
|
|
|
fn main() {}
|