Skip to content

Commit

Permalink
masm: hide alloc behind feature-flag
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Feb 22, 2025
1 parent 0a59555 commit 4271bed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/isa/masm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
/// # Example
///
/// ```
/// extern crate alloc;
///
/// use aluvm::isa::Instr;
/// use aluvm::regs::Status;
/// use aluvm::{aluasm, Lib, LibId, LibSite, Vm};
Expand Down Expand Up @@ -56,8 +54,10 @@
macro_rules! aluasm {
($( $tt:tt )+) => {{
use $crate::instr;
#[cfg(not(feature = "std"))]
use alloc::vec::Vec;

let mut code: alloc::vec::Vec<$crate::isa::Instr<$crate::LibId>> = Default::default();
let mut code: Vec<$crate::isa::Instr<$crate::LibId>> = Default::default();
#[allow(unreachable_code)] {
$crate::aluasm_inner! { code => $( $tt )+ }
}
Expand Down

0 comments on commit 4271bed

Please sign in to comment.