Skip to content

Commit be37b64

Browse files
committed
safety
1 parent a45ffcc commit be37b64

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/generate/peripheral.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ pub fn render(p_original: &Peripheral, index: &Index, config: &Config) -> Result
9393
}
9494

9595
///Steal an instance of this peripheral
96+
///
97+
///# Safety
98+
///
99+
///Make sure that [`Peripherals::steal`] is already called
96100
pub unsafe fn steal() -> Self {
97101
Self { _marker: PhantomData }
98102
}
@@ -157,6 +161,10 @@ pub fn render(p_original: &Peripheral, index: &Index, config: &Config) -> Result
157161
}
158162

159163
///Steal an instance of this peripheral
164+
///
165+
///# Safety
166+
///
167+
///Make sure that [`Peripherals::steal`] is already called
160168
pub unsafe fn steal() -> Self {
161169
Self { _marker: PhantomData }
162170
}

0 commit comments

Comments
 (0)