Always use extern crate std in cranelift-frontend
This commit is contained in:
@@ -13,7 +13,7 @@ use cranelift_codegen::ir::{
|
||||
};
|
||||
use cranelift_codegen::isa::{TargetFrontendConfig, TargetIsa};
|
||||
use cranelift_codegen::packed_option::PackedOption;
|
||||
use std::vec::Vec;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// Structure used for translating a series of functions into Cranelift IR.
|
||||
///
|
||||
@@ -899,7 +899,7 @@ mod tests {
|
||||
use cranelift_codegen::isa::CallConv;
|
||||
use cranelift_codegen::settings;
|
||||
use cranelift_codegen::verifier::verify_function;
|
||||
use std::string::ToString;
|
||||
use alloc::string::ToString;
|
||||
|
||||
fn sample_function(lazy_seal: bool) {
|
||||
let mut sig = Signature::new(CallConv::SystemV);
|
||||
|
||||
@@ -183,9 +183,8 @@
|
||||
)]
|
||||
#![no_std]
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
#[macro_use]
|
||||
extern crate alloc as std;
|
||||
extern crate alloc;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
#[macro_use]
|
||||
extern crate std;
|
||||
|
||||
@@ -17,7 +17,7 @@ use cranelift_codegen::ir::{Ebb, Function, Inst, InstBuilder, InstructionData, T
|
||||
use cranelift_codegen::packed_option::PackedOption;
|
||||
use cranelift_codegen::packed_option::ReservedValue;
|
||||
use smallvec::SmallVec;
|
||||
use std::vec::Vec;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// Structure containing the data relevant the construction of SSA for a given function.
|
||||
///
|
||||
|
||||
@@ -3,7 +3,7 @@ use crate::frontend::FunctionBuilder;
|
||||
use cranelift_codegen::ir::condcodes::IntCC;
|
||||
use cranelift_codegen::ir::*;
|
||||
use log::debug;
|
||||
use std::vec::Vec;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
type EntryIndex = u64;
|
||||
|
||||
@@ -291,7 +291,7 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::frontend::FunctionBuilderContext;
|
||||
use cranelift_codegen::ir::Function;
|
||||
use std::string::ToString;
|
||||
use alloc::string::ToString;
|
||||
|
||||
macro_rules! setup {
|
||||
($default:expr, [$($index:expr,)*]) => {{
|
||||
|
||||
Reference in New Issue
Block a user