Just for the sake of… exhaustiveness 😉, you can use #[non_exhaustive] on structs too.
I was under the impression that this worked on structs by creating hidden fields, though that might not/no longer be true. Anyway, this is why I felt no need to specify it.
Edit: Also, with regards to reexports, num crates are versioned separately and do different things. A better comparison is serde (which pins an exact serde_core version) or tokio (which uses a ~ specifier for its macros). rand relies on rand_core@^0.10.0, but these are 0.x so it’s still technically [0.10.0, 0.11.0) which isn’t as bad and hence why I changed the versions in my example.
I was under the impression that this worked on structs by creating hidden fields, though that might not/no longer be true. Anyway, this is why I felt no need to specify it.
Edit: Also, with regards to reexports,
numcrates are versioned separately and do different things. A better comparison isserde(which pins an exactserde_coreversion) ortokio(which uses a~specifier for its macros).randrelies onrand_core@^0.10.0, but these are0.xso it’s still technically[0.10.0, 0.11.0)which isn’t as bad and hence why I changed the versions in my example.