// https://github.com/rust-lang/rust/issues/124946 struct Builder; impl Builder { fn cast(self) -> Builder { Builder } } impl Builder { fn build(self) {} } fn main() { let b = Builder::; b.cast().build(); //~^ ERROR: no method named `build` found for struct `Builder` in the current scope }