error[E0599]: no method named `len` found for struct `A` in the current scope --> $DIR/double-reference-ty-in-self-ty.rs:10:7 | LL | struct A; | -------- method `len` not found for this struct ... LL | fn len(self: &&A) {} | --- the method is available for `&A` here ... LL | A.len(); | ^^^ method not found in `A` | = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `len`, perhaps you need to implement it: candidate #1: `ExactSizeIterator` error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0599`.