Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kernel/src/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub trait Component {
/// cannot setup static buffers for types which are chip-dependent, so those
/// buffers have to be passed in manually, and the `StaticInput` type makes
/// this possible.
type StaticInput = ();
type StaticInput;

/// The type (e.g., capsule, peripheral) that this implementation
/// of Component produces via `finalize()`. This is typically a
Expand Down
2 changes: 1 addition & 1 deletion kernel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
//! this use case. It is likely we will have to create new interfaces as new
//! use cases are discovered.

#![feature(core_intrinsics, const_fn, associated_type_defaults, try_trait)]
#![feature(core_intrinsics, const_fn, try_trait)]
#![warn(unreachable_pub)]
#![no_std]

Expand Down
8 changes: 5 additions & 3 deletions kernel/src/platform/mpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub trait MPU {
/// It is `Default` so we can create empty state when the process is
/// created, and `Display` so that the `panic!()` output can display the
/// current state to help with debugging.
type MpuConfig: Default + Display = MpuConfigDefault;
type MpuConfig: Default + Display;

/// Clears the MPU.
///
Expand Down Expand Up @@ -266,7 +266,9 @@ pub trait MPU {
}

/// Implement default MPU trait for unit.
impl MPU for () {}
impl MPU for () {
type MpuConfig = MpuConfigDefault;
}

/// The generic trait that particular kernel level memory protection unit
/// implementations need to implement.
Expand All @@ -285,7 +287,7 @@ pub trait KernelMPU {
/// It is `Default` so we can create empty state when the kernel is
/// created, and `Display` so that the `panic!()` output can display the
/// current state to help with debugging.
type KernelMpuConfig: Default + Display = MpuConfigDefault;
type KernelMpuConfig: Default + Display;

/// Mark a region of memory that the Tock kernel owns.
///
Expand Down