Skip to content

Commit

Permalink
Merge pull request #885 from mkroening/nightly-2023-09-01
Browse files Browse the repository at this point in the history
build(toolchain): update to nightly-2023-09-01
  • Loading branch information
mkroening authored Sep 4, 2023
2 parents 78f154c + 8779076 commit 2c18344
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 27 deletions.
3 changes: 1 addition & 2 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[toolchain]
# Manually sync this with Dockerfile!
channel = "nightly-2023-08-15"
channel = "nightly-2023-09-01"
components = [
"llvm-tools",
"rust-src",
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/fs/virtio_fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ pub mod constants {
}

impl Features {
/// Return a vector of [Features](Features) for a given input of a u64 representation.
/// Return a vector of [Features] for a given input of a u64 representation.
///
/// INFO: In case the FEATURES enum is changed, this function MUST also be adjusted to the new set!
//
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/virtio_net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,7 @@ pub mod constants {
}

impl Features {
/// Return a vector of [Features](Features) for a given input of a u64 representation.
/// Return a vector of [Features] for a given input of a u64 representation.
///
/// INFO: In case the FEATURES enum is changed, this function MUST also be adjusted to the new set!
//
Expand Down
8 changes: 4 additions & 4 deletions src/drivers/virtio/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
pub mod memory {
use core::ops::Add;

/// A newtype representing a memory offset which can be used to be added to [PhyMemAddr](PhyMemAddr) or
/// to [VirtMemAddr](VirtMemAddr).
/// A newtype representing a memory offset which can be used to be added to [PhyMemAddr] or
/// to [VirtMemAddr].
#[derive(Copy, Clone, Debug, Ord, PartialOrd, Eq, PartialEq)]
pub struct MemOff(usize);

Expand All @@ -32,8 +32,8 @@ pub mod memory {
}
}

/// A newtype representing a memory length which can be used to be added to [PhyMemAddr](PhyMemAddr) or
/// to [VirtMemAddr](VirtMemAddr).
/// A newtype representing a memory length which can be used to be added to [PhyMemAddr] or
/// to [VirtMemAddr].
#[derive(Copy, Clone, Debug, Ord, PartialOrd, Eq, PartialEq)]
pub struct MemLen(usize);

Expand Down
4 changes: 2 additions & 2 deletions src/drivers/virtio/transport/pci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ struct ComCfgRaw {
// Common configuration raw does NOT provide a PUBLIC
// interface.
impl ComCfgRaw {
/// Returns a boxed [ComCfgRaw](ComCfgRaw) structure. The box points to the actual structure inside the
/// Returns a boxed [ComCfgRaw] structure. The box points to the actual structure inside the
/// PCI devices memory space.
fn map(cap: &PciCap) -> Option<&'static mut ComCfgRaw> {
if cap.bar.length < u64::from(cap.length + cap.offset) {
Expand Down Expand Up @@ -800,7 +800,7 @@ struct IsrStatusRaw {

impl IsrStatusRaw {
/// Returns a mutable reference to the ISR status capability structure indicated by the
/// [PciCap](PciCap) struct. Reference has a static lifetime as the structure is controlled by the
/// [PciCap] struct. Reference has a static lifetime as the structure is controlled by the
/// device and will not be moved.
fn map(cap: &PciCap) -> Option<&'static mut IsrStatusRaw> {
if cap.bar.length < u64::from(cap.length + cap.offset) {
Expand Down
34 changes: 17 additions & 17 deletions src/drivers/virtio/virtqueue/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ impl Virtq {
/// * Data behind the respective raw pointers will NOT be deallocated. Under no circumstances.
/// * Calley is responsible for ensuring the raw pointers will remain valid from start till end of transfer.
/// * start: call of `fn prep_transfer_from_raw()`
/// * end: closing of [Transfer](Transfer) via `Transfer.close()`.
/// * end: closing of [Transfer] via `Transfer.close()`.
/// * In case the underlying BufferToken is reused, the raw pointers MUST still be valid all the time
/// BufferToken exists.
/// * Transfer created from this TransferTokens will ONLY allow to return a copy of the data.
Expand All @@ -400,13 +400,13 @@ impl Virtq {
/// * None: No send buffers are provided to the device
/// * Some:
/// * `T` defines the structure which will be provided to the device
/// * [BuffSpec](BuffSpec) defines how this struct will be presented to the device.
/// * [BuffSpec] defines how this struct will be presented to the device.
/// See documentation on `BuffSpec` for details.
/// * recv: `Option<(*mut K, BuffSpec)>`
/// * None: No buffers, which are writable for the device are provided to the device.
/// * Some:
/// * `K` defines the structure which will be provided to the device
/// * [BuffSpec](BuffSpec) defines how this struct will be presented to the device.
/// * [BuffSpec] defines how this struct will be presented to the device.
/// See documentation on `BuffSpec` for details.
///
/// **Reasons for Failure:**
Expand Down Expand Up @@ -455,20 +455,20 @@ impl Virtq {
}
}

/// Provides the calley with empty buffers as specified via the `send` and `recv` function parameters, (see [BuffSpec](BuffSpec)), in form of
/// a [BufferToken](BufferToken).
/// Provides the calley with empty buffers as specified via the `send` and `recv` function parameters, (see [BuffSpec]), in form of
/// a [BufferToken].
/// Fails upon multiple circumstances.
///
/// **Parameters**
/// * send: `Option<BuffSpec>`
/// * None: No send buffers are provided to the device
/// * Some:
/// * [BuffSpec](BuffSpec) defines the size of the buffer and how the buffer is
/// * [BuffSpec] defines the size of the buffer and how the buffer is
/// Buffer will be structured. See documentation on `BuffSpec` for details.
/// * recv: `Option<BuffSpec>`
/// * None: No buffers, which are writable for the device are provided to the device.
/// * Some:
/// * [BuffSpec](BuffSpec) defines the size of the buffer and how the buffer is
/// * [BuffSpec] defines the size of the buffer and how the buffer is
/// Buffer will be structured. See documentation on `BuffSpec` for details.
///
/// **Reasons for Failure:**
Expand Down Expand Up @@ -520,7 +520,7 @@ impl Virtq {
}

/// The trait needs to be implemented on structures which are to be used via the `prep_transfer()` function of virtqueues and for
/// structures which are to be used to write data into buffers of a [BufferToken](BufferToken) via `BufferToken.write()` or
/// structures which are to be used to write data into buffers of a [BufferToken] via `BufferToken.write()` or
/// `BufferToken.write_seq()`.
///
/// **INFO:*
Expand Down Expand Up @@ -561,7 +561,7 @@ pub trait AsSliceU8 {
}
}

/// The [Transfer](Transfer) will be received when a [TransferToken](TransferToken) is dispatched via `TransferToken.dispatch()` or
/// The [Transfer] will be received when a [TransferToken] is dispatched via `TransferToken.dispatch()` or
/// via `TransferToken.dispatch_blocking()`.
///
/// The struct represents an ongoing transfer or an active transfer. While this does NOT mean, that the transfer is at all times inside
Expand Down Expand Up @@ -591,7 +591,7 @@ pub struct Transfer {
}

impl Drop for Transfer {
/// When an unclosed transfer is dropped. The [Pinned](Pinned)<[TransferToken](struct.TransferToken.html)> is returned to the respective
/// When an unclosed transfer is dropped. The [Pinned]<[TransferToken]> is returned to the respective
/// virtqueue, who is responsible of handling these situations.
fn drop(&mut self) {
if let Some(tkn) = self.transfer_tkn.take() {
Expand Down Expand Up @@ -1080,8 +1080,8 @@ impl TransferToken {
/// Dispatches the provided TransferToken to the respectuve queue and does
/// return when, the queue finished the transfer.
///
/// The resultaing [TransferState](TransferState) in this case is of course
/// finished and the returned [Transfer](Transfer) can be reused, copied from
/// The resultaing [TransferState] in this case is of course
/// finished and the returned [Transfer] can be reused, copied from
/// or return the underlying buffers.
///
/// **INFO:**
Expand Down Expand Up @@ -1601,7 +1601,7 @@ impl BufferToken {
///
///
/// # Detailed Description
/// The respective send and recv buffers (see [BufferToken](BufferToken) docs for details on buffers) consist of multiple
/// The respective send and recv buffers (see [BufferToken] docs for details on buffers) consist of multiple
/// descriptors.
/// The `write()` function does NOT take into account the distinct descriptors of a buffer but treats the buffer as a single continuous
/// memory element and as a result writes `T` or `H` as a slice of bytes into this memory.
Expand Down Expand Up @@ -1724,7 +1724,7 @@ impl BufferToken {
Ok(self)
}

/// Consumes the [BufferToken](BufferToken) and returns a [TransferToken](TransferToken), that can be used to actually start the transfer.
/// Consumes the [BufferToken] and returns a [TransferToken], that can be used to actually start the transfer.
///
/// After this call, the buffers are no longer writable.
pub fn provide(self) -> TransferToken {
Expand All @@ -1746,7 +1746,7 @@ enum Buffer {
},
/// A buffer consisting of a chain of [Memory Descriptors](MemDescr).
/// Especially useful if one wants to send multiple structures to a device,
/// as he can sequentially write (see [BufferToken](BufferToken) `write_seq()`)
/// as he can sequentially write (see [BufferToken] `write_seq()`)
/// those structs into the descriptors.
Multiple {
desc_lst: Box<[MemDescr]>,
Expand Down Expand Up @@ -1985,7 +1985,7 @@ struct MemDescr {
_mem_len: usize,
/// If `id == None` this is an untracked memory descriptor
/// * Meaining: The descriptor does NOT count as a descriptor
/// taken from the [MemPool](MemPool).
/// taken from the [MemPool].
id: Option<MemDescrId>,
/// Refers to the controlling [memory pool](MemPool)
pool: Rc<MemPool>,
Expand Down Expand Up @@ -2042,7 +2042,7 @@ impl MemDescr {
///
/// Be cautious with the usage of clones of `MemDescr`. Typically this function
/// should only be used to create a second controlling descriptor of an
/// indirect buffer. See [Buffer](Buffer) `Buffer::Indirect` for details!
/// indirect buffer. See [Buffer] `Buffer::Indirect` for details!
fn no_dealloc_clone(&self) -> Self {
MemDescr {
ptr: self.ptr,
Expand Down

0 comments on commit 2c18344

Please sign in to comment.