rust/tests/ui/delegation/explicit-paths.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
381 B
Rust
Raw Normal View History

2023-11-26 06:57:31 -06:00
#![feature(fn_delegation)]
//~^ WARN the feature `fn_delegation` is incomplete
trait Trait {
fn bar(&self) -> i32 { 42 }
}
struct F;
impl Trait for F {}
struct S(F);
impl Trait for S {
reuse <F as Trait>::bar;
//~^ ERROR mismatched types
}
struct S2(F);
impl Trait for S2 {
reuse <S2 as Trait>::bar { &self.0 }
//~^ ERROR mismatched types
}
fn main() {}