rp: remove use of never type

This commit is contained in:
Dario Nieuwenhuis 2021-09-03 17:17:02 +02:00
parent 11d2b0cdc1
commit a76526add6
2 changed files with 3 additions and 3 deletions

View File

@ -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> {

View File

@ -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;