FRU syntax does not work across crate boundaries on non_exhaustive structs. This hampers ergonomics, especially when it comes to things like the Default trait.
For example:
// Crate 1
#[non_exhaustive]
pub struct Options {
pub foo: String,
pub bar: String,
}
impl Default for Options {
fn default() -> Self {
Options { foo: "foo".to_string(), bar: "bar".to_string() }
}
}
// Crate 2 (does not compile!)
fn main() {
let _options = Options { bar: "baz".to_string(), ..Default::default() };
}
Back-reference: https://github.com/rust-lang/rfcs/pull/2008/files/3d568896c29e3071a7582533418e02c6f32fa085#r122049087