error[E0599]: no method named `build` found for struct `Builder` in the current scope --> $DIR/lookup-method.rs:17:14 | LL | struct Builder; | -------------------------------------------- method `build` not found for this struct ... LL | b.cast().build(); | ^^^^^ method not found in `Builder` | = note: the method was found for - `Builder` error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0599`.