File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,6 @@ mod test;
89
89
90
90
/// Core peripherals
91
91
#[ allow( non_snake_case) ]
92
- #[ non_exhaustive]
93
92
pub struct Peripherals {
94
93
/// Cache and branch predictor maintenance operations (not present on Cortex-M0 variants)
95
94
pub CBP : CBP ,
@@ -126,6 +125,10 @@ pub struct Peripherals {
126
125
127
126
/// Trace Port Interface Unit (not present on Cortex-M0 variants)
128
127
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 : ( ) ,
129
132
}
130
133
131
134
// NOTE `no_mangle` is used here to prevent linking different minor versions of this crate as that
@@ -188,6 +191,7 @@ impl Peripherals {
188
191
TPIU : TPIU {
189
192
_marker : PhantomData ,
190
193
} ,
194
+ _priv : ( ) ,
191
195
}
192
196
}
193
197
}
You can’t perform that action at this time.
0 commit comments