Currently, only public fields are fetched using Rustdoc, but adding a private field can be a breaking change:
pub struct Foo(pub bar: u8, pub baz: u8);
// ↓
pub struct Foo(pub bar: u8, pub baz: u8, boo: u8);
will break structure literals:
let x = the_crate::Foo { bar: 12, baz: 34 }; // breaks!
Note that this is breaking only if the struct does not already contain a private field, because in that case no existing code can rely on constructs such as struct literals.
See RFC 1105 for more information on breaking changes in types.
Currently, only public fields are fetched using Rustdoc, but adding a private field can be a breaking change:
will break structure literals:
Note that this is breaking only if the struct does not already contain a private field, because in that case no existing code can rely on constructs such as struct literals.
See RFC 1105 for more information on breaking changes in types.