mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-30 10:23:29 +00:00
Fix multiple documentation issues concerned by clippy
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
4ba60271b1
commit
05533d7afd
@ -24,13 +24,13 @@ pub use typeflags_util::SetContain;
|
||||
/// More specifically, there are three major restrictions.
|
||||
///
|
||||
/// 1. A safe pointer can only refer to a value of a POD type `T: Pod`,
|
||||
/// while raw pointers can do to a value of any type `T`.
|
||||
/// while raw pointers can do to a value of any type `T`.
|
||||
/// 2. A safe pointer can only refer to an address within a virtual memory object
|
||||
/// of type `M: VmIo` (e.g., VMAR and VMO), while raw pointers can do to
|
||||
/// an address within any virtual memory space.
|
||||
/// of type `M: VmIo` (e.g., VMAR and VMO), while raw pointers can do to
|
||||
/// an address within any virtual memory space.
|
||||
/// 3. A safe pointer only allows one to copy values to/from the target address,
|
||||
/// while a raw pointer allows one to borrow an immutable or mutable reference
|
||||
/// to the target address.
|
||||
/// while a raw pointer allows one to borrow an immutable or mutable reference
|
||||
/// to the target address.
|
||||
///
|
||||
/// The expressiveness of safe pointers, although being less than that of
|
||||
/// raw pointers, is sufficient for our purpose of writing an OS kernel in safe
|
||||
|
@ -1,7 +1,6 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
//!This crate defines the component system related macros.
|
||||
//!
|
||||
|
||||
#![feature(proc_macro_diagnostic)]
|
||||
#![allow(dead_code)]
|
||||
|
@ -10,9 +10,9 @@
|
||||
//!
|
||||
//! 1. It implements the `Eq` and `Hash` traits.
|
||||
//! 2. The two values of `k1` and `k2` of type `K` equal to each other,
|
||||
//! if and only if their hash values equal to each other.
|
||||
//! if and only if their hash values equal to each other.
|
||||
//! 3. The hashes of a value of `k` of type `K` cannot change while it
|
||||
//! is in a map.
|
||||
//! is in a map.
|
||||
//!
|
||||
//! Sometimes we want to use `Arc<T>` as the key type for a hash map but cannot do so
|
||||
//! since `T` does not satisfy the properties above. For example, a lot of types
|
||||
|
Reference in New Issue
Block a user