diff --git a/cranelift/frontend/src/frontend.rs b/cranelift/frontend/src/frontend.rs index d51dbbbbd20d..94a10dad5897 100644 --- a/cranelift/frontend/src/frontend.rs +++ b/cranelift/frontend/src/frontend.rs @@ -1,7 +1,7 @@ //! A frontend for building Cranelift IR from other languages. use crate::ssa::{SSABuilder, SideEffects}; use crate::variable::Variable; -use alloc::vec::Vec; +use alloc::{vec, vec::Vec}; use core::fmt::{self, Debug}; use cranelift_codegen::cursor::{Cursor, CursorPosition, FuncCursor}; use cranelift_codegen::entity::{EntityRef, EntitySet, PrimaryMap, SecondaryMap}; @@ -242,7 +242,7 @@ impl fmt::Display for UseVariableError { } } -impl std::error::Error for UseVariableError {} +impl core::error::Error for UseVariableError {} #[derive(Debug, Copy, Clone, Eq, PartialEq)] /// An error encountered when defining the initial value of a variable. @@ -1107,8 +1107,8 @@ impl<'a> FunctionBuilder<'a> { left: Value, right: Value, size: u64, - left_align: std::num::NonZeroU8, - right_align: std::num::NonZeroU8, + left_align: core::num::NonZeroU8, + right_align: core::num::NonZeroU8, flags: MemFlags, ) -> Value { use IntCC::*; diff --git a/cranelift/frontend/src/ssa.rs b/cranelift/frontend/src/ssa.rs index f2eda4afdb5b..759e7e353634 100644 --- a/cranelift/frontend/src/ssa.rs +++ b/cranelift/frontend/src/ssa.rs @@ -8,7 +8,7 @@ //! use crate::Variable; -use alloc::vec::Vec; +use alloc::{vec, vec::Vec}; use core::mem; use cranelift_codegen::cursor::{Cursor, FuncCursor}; use cranelift_codegen::entity::{EntityList, EntitySet, ListPool, SecondaryMap}; diff --git a/cranelift/frontend/src/switch.rs b/cranelift/frontend/src/switch.rs index 95a955f3dfca..b08114bfd484 100644 --- a/cranelift/frontend/src/switch.rs +++ b/cranelift/frontend/src/switch.rs @@ -1,6 +1,6 @@ use super::HashMap; use crate::frontend::FunctionBuilder; -use alloc::vec::Vec; +use alloc::{vec, vec::Vec}; use cranelift_codegen::ir::condcodes::IntCC; use cranelift_codegen::ir::*;