limit visibily with tricks

This commit is contained in:
2025-04-16 15:06:11 +02:00
parent feac144302
commit acb652e940
2 changed files with 60 additions and 59 deletions

View File

@ -24,7 +24,8 @@ pub struct Pin<I: PinIdProvider> {
impl<I: PinIdProvider> Pin<I> {
#[allow(clippy::new_without_default)]
pub const fn new() -> Self {
#[doc(hidden)]
pub const fn __new() -> Self {
Self {
phantom: core::marker::PhantomData,
}
@ -35,9 +36,9 @@ impl<I: PinIdProvider> Pin<I> {
/// # Safety
///
/// This circumvents ownership rules of the HAL and allows creating multiple instances
/// of the same pins.
/// of the same pin.
pub const unsafe fn steal() -> Self {
Self::new()
Self::__new()
}
}