rp: remove use of never type
This commit is contained in:
parent
11d2b0cdc1
commit
a76526add6
@ -1,3 +1,4 @@
|
|||||||
|
use core::convert::Infallible;
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
|
|
||||||
use crate::pac;
|
use crate::pac;
|
||||||
@ -81,7 +82,7 @@ impl<'d, T: Pin> Drop for Input<'d, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Pin> digital::InputPin for Input<'d, T> {
|
impl<'d, T: Pin> digital::InputPin for Input<'d, T> {
|
||||||
type Error = !;
|
type Error = Infallible;
|
||||||
|
|
||||||
fn is_high(&self) -> Result<bool, Self::Error> {
|
fn is_high(&self) -> Result<bool, Self::Error> {
|
||||||
Ok(self.is_high())
|
Ok(self.is_high())
|
||||||
@ -151,7 +152,7 @@ impl<'d, T: Pin> Drop for Output<'d, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Pin> digital::OutputPin for Output<'d, T> {
|
impl<'d, T: Pin> digital::OutputPin for Output<'d, T> {
|
||||||
type Error = !;
|
type Error = Infallible;
|
||||||
|
|
||||||
/// Set the output as high.
|
/// Set the output as high.
|
||||||
fn set_high(&mut self) -> Result<(), Self::Error> {
|
fn set_high(&mut self) -> Result<(), Self::Error> {
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#![feature(generic_associated_types)]
|
#![feature(generic_associated_types)]
|
||||||
#![feature(asm)]
|
#![feature(asm)]
|
||||||
#![feature(type_alias_impl_trait)]
|
#![feature(type_alias_impl_trait)]
|
||||||
#![feature(never_type)]
|
|
||||||
|
|
||||||
#[cfg(feature = "unstable-pac")]
|
#[cfg(feature = "unstable-pac")]
|
||||||
pub use rp2040_pac2 as pac;
|
pub use rp2040_pac2 as pac;
|
||||||
|
Loading…
Reference in New Issue
Block a user