Skip to content
Snippets Groups Projects
Commit fe366fea authored by Jorge Aparicio's avatar Jorge Aparicio Committed by GitHub
Browse files

Merge pull request #2 from jonas-schievink/stable

Remove use of `optin_builtin_traits` feature.
parents c5bf36b0 218aa547
No related branches found
No related tags found
No related merge requests found
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
//! - [MSP430](https://crates.io/crates/msp430-rtfm) //! - [MSP430](https://crates.io/crates/msp430-rtfm)
#![deny(missing_docs)] #![deny(missing_docs)]
#![deny(warnings)] #![deny(warnings)]
#![feature(optin_builtin_traits)]
#![no_std] #![no_std]
extern crate static_ref; extern crate static_ref;
use core::u8; use core::u8;
use core::marker::PhantomData;
pub use static_ref::Static; pub use static_ref::Static;
...@@ -90,6 +90,7 @@ where ...@@ -90,6 +90,7 @@ where
/// current context /// current context
pub struct Threshold { pub struct Threshold {
value: u8, value: u8,
_not_send: PhantomData<*const ()>,
} }
impl Threshold { impl Threshold {
...@@ -98,7 +99,7 @@ impl Threshold { ...@@ -98,7 +99,7 @@ impl Threshold {
/// This API is meant to be used to create abstractions and not to be /// This API is meant to be used to create abstractions and not to be
/// directly used by applications. /// directly used by applications.
pub unsafe fn new(value: u8) -> Self { pub unsafe fn new(value: u8) -> Self {
Threshold { value } Threshold { value, _not_send: PhantomData }
} }
/// Creates a `Threshold` token with maximum value /// Creates a `Threshold` token with maximum value
...@@ -115,4 +116,3 @@ impl Threshold { ...@@ -115,4 +116,3 @@ impl Threshold {
} }
} }
impl !Send for Threshold {}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment