error[E0616]: field `len` of struct `sub::S` is private --> $DIR/issue-26472.rs:11:13 | LL | let v = s.len; | ^^^^^ | = note: a method `len` also exists, perhaps you wish to call it error: aborting due to previous error For more information about this error, try `rustc --explain E0616`.