error[E0599]: no method named `honk` found for type `{integer}` in the current scope --> $DIR/issue-1871.rs:17:9 | LL | f.honk() //~ ERROR no method named `honk` found | ^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0599`.