diff --git a/src/data/encoding.rs b/src/data/encoding.rs index f903832..0b40daf 100644 --- a/src/data/encoding.rs +++ b/src/data/encoding.rs @@ -72,7 +72,7 @@ pub enum EncodeError { /// string length is {0}, which exceeds 255 bytes limit StringTooLong(usize), - /// collection contains {0} items, which exceeds [`u18::MAX`] limit + /// collection contains {0} items, which exceeds [`u16::MAX`] limit ByteLimitExceeded(usize), /// collection contains {0} items, which exceeds [`u16::MAX`] limit diff --git a/src/isa/asm.rs b/src/isa/asm.rs index 27d53a8..72472f8 100644 --- a/src/isa/asm.rs +++ b/src/isa/asm.rs @@ -17,9 +17,9 @@ /// # extern crate alloc; /// # #[macro_use] extern crate aluvm; /// # use paste::paste; -/// # use aluvm::{Vm}; +/// # use aluvm::Vm; /// # use aluvm::libs::Lib; -/// # use aluvm::isa::ReservedOp; +/// # use aluvm::isa::Instr; /// /// let code = aluasm! { /// clr r1024[5] ; @@ -35,8 +35,8 @@ /// jmp 0 ; /// }; /// -/// let lib = Lib::::assemble(&code).unwrap(); -/// let mut vm = Vm::with(lib); +/// let lib = Lib::assemble(&code).unwrap(); +/// let mut vm = Vm::::with(lib); /// match vm.main() { /// true => println!("success"), /// false => println!("failure"), diff --git a/src/lib.rs b/src/lib.rs index c43cc44..419c09f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -128,7 +128,7 @@ pub mod data; pub mod isa; pub mod libs; pub mod reg; -mod vm; +pub mod vm; pub use isa::Isa; pub use vm::Vm; diff --git a/src/libs/segs.rs b/src/libs/segs.rs index 58e77e4..af8cfd8 100644 --- a/src/libs/segs.rs +++ b/src/libs/segs.rs @@ -28,10 +28,10 @@ use crate::libs::{LibId, LibSite}; #[cfg_attr(feature = "std", derive(Error))] #[display(doc_comments)] pub enum SegmentError { - /// the size of the CODE segment is {0}, which exceeds [`CODE_SEGMENT_MAX_LEN`] + /// the size of the CODE segment is {0}, which exceeds `CODE_SEGMENT_MAX_LEN` CodeSegmentTooLarge(usize), - /// the size of the DATA segment is {0}, which exceeds [`DATA_SEGMENT_MAX_LEN`] + /// the size of the DATA segment is {0}, which exceeds `DATA_SEGMENT_MAX_LEN` DataSegmentTooLarge(usize), /// ISA segment error @@ -254,7 +254,7 @@ impl LibSeg { /// /// # Errors /// - /// Checks requirement that the total number of libraries must not exceed [`LIBS_MAX_TOTAL`] and + /// Checks requirement that the total number of libraries must not exceed `LIBS_MAX_TOTAL` and /// returns [`LibSegOverflow`] otherwise /// /// # Returns