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