File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,7 +89,6 @@ mod test;
8989
9090/// Core peripherals
9191#[ allow( non_snake_case) ]
92- #[ non_exhaustive]
9392pub struct Peripherals {
9493 /// Cache and branch predictor maintenance operations (not present on Cortex-M0 variants)
9594 pub CBP : CBP ,
@@ -126,6 +125,10 @@ pub struct Peripherals {
126125
127126 /// Trace Port Interface Unit (not present on Cortex-M0 variants)
128127 pub TPIU : TPIU ,
128+
129+ // Private field making `Peripherals` non-exhaustive. We don't use `#[non_exhaustive]` so we
130+ // can support older Rust versions.
131+ _priv : ( ) ,
129132}
130133
131134// NOTE `no_mangle` is used here to prevent linking different minor versions of this crate as that
@@ -188,6 +191,7 @@ impl Peripherals {
188191 TPIU : TPIU {
189192 _marker : PhantomData ,
190193 } ,
194+ _priv : ( ) ,
191195 }
192196 }
193197}
You can’t perform that action at this time.
0 commit comments