rust: Fix the typos in doc

These typos are found by "cargo spellcheck". Though it outputs a lot of
noise and false positives, there still are some real typos.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250520152750.2542612-6-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Zhao Liu 2025-05-20 23:27:50 +08:00 committed by Paolo Bonzini
parent 86c54a3a41
commit aef5ac8624
3 changed files with 5 additions and 5 deletions

View file

@ -480,13 +480,13 @@ impl PL011Registers {
} }
impl PL011State { impl PL011State {
/// Initializes a pre-allocated, unitialized instance of `PL011State`. /// Initializes a pre-allocated, uninitialized instance of `PL011State`.
/// ///
/// # Safety /// # Safety
/// ///
/// `self` must point to a correctly sized and aligned location for the /// `self` must point to a correctly sized and aligned location for the
/// `PL011State` type. It must not be called more than once on the same /// `PL011State` type. It must not be called more than once on the same
/// location/instance. All its fields are expected to hold unitialized /// location/instance. All its fields are expected to hold uninitialized
/// values with the sole exception of `parent_obj`. /// values with the sole exception of `parent_obj`.
unsafe fn init(&mut self) { unsafe fn init(&mut self) {
static PL011_OPS: MemoryRegionOps<PL011State> = MemoryRegionOpsBuilder::<PL011State>::new() static PL011_OPS: MemoryRegionOps<PL011State> = MemoryRegionOpsBuilder::<PL011State>::new()

View file

@ -291,7 +291,7 @@ pub unsafe trait ObjectType: Sized {
} }
/// Return the receiver as a const raw pointer to Object. /// Return the receiver as a const raw pointer to Object.
/// This is preferrable to `as_object_mut_ptr()` if a C /// This is preferable to `as_object_mut_ptr()` if a C
/// function only needs a `const Object *`. /// function only needs a `const Object *`.
fn as_object_ptr(&self) -> *const bindings::Object { fn as_object_ptr(&self) -> *const bindings::Object {
self.as_object().as_ptr() self.as_object().as_ptr()
@ -485,7 +485,7 @@ pub trait ObjectImpl: ObjectType + IsA<Object> {
/// `INSTANCE_INIT` functions have been called. /// `INSTANCE_INIT` functions have been called.
const INSTANCE_POST_INIT: Option<fn(&Self)> = None; const INSTANCE_POST_INIT: Option<fn(&Self)> = None;
/// Called on descendent classes after all parent class initialization /// Called on descendant classes after all parent class initialization
/// has occurred, but before the class itself is initialized. This /// has occurred, but before the class itself is initialized. This
/// is only useful if a class is not a leaf, and can be used to undo /// is only useful if a class is not a leaf, and can be used to undo
/// the effects of copying the contents of the parent's class struct /// the effects of copying the contents of the parent's class struct

View file

@ -9,7 +9,7 @@
//! * [`vmstate_unused!`](crate::vmstate_unused) and //! * [`vmstate_unused!`](crate::vmstate_unused) and
//! [`vmstate_of!`](crate::vmstate_of), which are used to express the //! [`vmstate_of!`](crate::vmstate_of), which are used to express the
//! migration format for a struct. This is based on the [`VMState`] trait, //! migration format for a struct. This is based on the [`VMState`] trait,
//! which is defined by all migrateable types. //! which is defined by all migratable types.
//! //!
//! * [`impl_vmstate_forward`](crate::impl_vmstate_forward) and //! * [`impl_vmstate_forward`](crate::impl_vmstate_forward) and
//! [`impl_vmstate_bitsized`](crate::impl_vmstate_bitsized), which help with //! [`impl_vmstate_bitsized`](crate::impl_vmstate_bitsized), which help with