diff --git a/build.rs b/build.rs index 85fff02616..19b1217020 100644 --- a/build.rs +++ b/build.rs @@ -49,7 +49,7 @@ fn main() { tokens.push( quote! { #[doc = #doc] - pub type #c = Ceiling<::typenum::#u>; + pub type #c = ::typenum::#u; }, ); diff --git a/src/lib.rs b/src/lib.rs index 5de71fbd2f..57f7f4284e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -494,7 +494,7 @@ pub struct Resource { data: UnsafeCell, } -impl Resource> +impl Resource where RC: GreaterThanOrEqual, RC: LessThanOrEqual, @@ -508,7 +508,7 @@ where } } -impl Resource> { +impl Resource { /// Grants data race free and deadlock free access to the resource data /// /// This operation is zero cost and doesn't impose any additional blocking. @@ -552,7 +552,7 @@ where _ceiling: PhantomData, } -impl Peripheral> +impl Peripheral where PC: GreaterThanOrEqual, PC: LessThanOrEqual, @@ -567,7 +567,7 @@ where } } -impl Peripheral> { +impl Peripheral { /// See [Resource.access](./struct.Resource.html#method.access) pub fn access<'cs, TP, PT>( &'static self, @@ -684,13 +684,6 @@ where { } -/// Resource ceiling -pub struct Ceiling { - _marker: PhantomData, -} - -impl !Send for Ceiling {} - /// Preemption threshold pub struct Threshold { _marker: PhantomData, @@ -744,11 +737,11 @@ pub unsafe trait ResourceLike { type Ceiling; } -unsafe impl ResourceLike for Peripheral> { +unsafe impl ResourceLike for Peripheral { type Ceiling = PC; } -unsafe impl ResourceLike for Resource> { +unsafe impl ResourceLike for Resource { type Ceiling = RC; }