Use hidden field rather than non_exaustive for Options to support update syntax
In current Rust, using #[non_exhaustive] on a structure prevents using the structure update syntax:
let options = LocationOptions {
target: Some("foo".into()),
..Default::default()
};
error[E0639]: cannot create non-exhaustive struct using struct expression
This is documented in the RFC that added the attribute.
This limitation makes the *Options structures annoying to use. I suggest using a hidden _non_exhaustive: () field in them until Rust supports the structure update syntax with the #[non_exhaustive] attribute.
I hadn't realized that this would cause that issue in downstream code, but it makes sense after reading through that link.
The proposed change makes sense. If you'd like to make a PR, I'd be happy to accept it. Otherwise, I'll address this sometime this weekend.
Yeah, honestly I was surprised that #[non_exhaustive] had that limitation. It's pretty restrictive.