Always use extern crate std in cranelift-codegen

This commit is contained in:
bjorn3
2019-09-28 15:52:23 +02:00
committed by Dan Gohman
parent a114423d0a
commit 10e226f9ff
63 changed files with 89 additions and 90 deletions

View File

@@ -16,7 +16,7 @@ use crate::isa::Builder as IsaBuilder;
use crate::isa::{EncInfo, RegClass, RegInfo, TargetIsa};
use crate::regalloc;
use core::fmt;
use std::boxed::Box;
use alloc::boxed::Box;
use target_lexicon::{Architecture, Triple};
#[allow(dead_code)]

View File

@@ -8,7 +8,7 @@ include!(concat!(env!("OUT_DIR"), "/registers-arm32.rs"));
mod tests {
use super::{D, GPR, INFO, S};
use crate::isa::RegUnit;
use std::string::{String, ToString};
use alloc::string::{String, ToString};
#[test]
fn unit_encodings() {

View File

@@ -16,7 +16,7 @@ use crate::isa::Builder as IsaBuilder;
use crate::isa::{EncInfo, RegClass, RegInfo, TargetIsa};
use crate::regalloc;
use core::fmt;
use std::boxed::Box;
use alloc::boxed::Box;
use target_lexicon::Triple;
#[allow(dead_code)]

View File

@@ -8,7 +8,7 @@ include!(concat!(env!("OUT_DIR"), "/registers-arm64.rs"));
mod tests {
use super::INFO;
use crate::isa::RegUnit;
use std::string::{String, ToString};
use alloc::string::{String, ToString};
#[test]
fn unit_encodings() {

View File

@@ -25,7 +25,7 @@
//! # fn main() {
//! use cranelift_codegen::isa;
//! use cranelift_codegen::settings::{self, Configurable};
//! use std::str::FromStr;
//! use alloc::str::FromStr;
//! use target_lexicon::Triple;
//!
//! let shared_builder = settings::builder();
@@ -65,7 +65,7 @@ use crate::settings::SetResult;
use crate::timing;
use core::fmt;
use failure_derive::Fail;
use std::boxed::Box;
use alloc::boxed::Box;
use target_lexicon::{triple, Architecture, PointerWidth, Triple};
#[cfg(feature = "riscv")]
@@ -119,7 +119,7 @@ pub fn lookup(triple: Triple) -> Result<Builder, LookupError> {
/// Look for a supported ISA with the given `name`.
/// Return a builder that can create a corresponding `TargetIsa`.
pub fn lookup_by_name(name: &str) -> Result<Builder, LookupError> {
use std::str::FromStr;
use alloc::str::FromStr;
lookup(triple!(name))
}

View File

@@ -16,7 +16,7 @@ use crate::isa::Builder as IsaBuilder;
use crate::isa::{EncInfo, RegClass, RegInfo, TargetIsa};
use crate::regalloc;
use core::fmt;
use std::boxed::Box;
use alloc::boxed::Box;
use target_lexicon::{PointerWidth, Triple};
#[allow(dead_code)]
@@ -138,7 +138,7 @@ mod tests {
use crate::isa;
use crate::settings::{self, Configurable};
use core::str::FromStr;
use std::string::{String, ToString};
use alloc::string::{String, ToString};
use target_lexicon::triple;
fn encstr(isa: &dyn isa::TargetIsa, enc: Result<isa::Encoding, isa::Legalize>) -> String {

View File

@@ -8,7 +8,7 @@ include!(concat!(env!("OUT_DIR"), "/registers-riscv.rs"));
mod tests {
use super::{FPR, GPR, INFO};
use crate::isa::RegUnit;
use std::string::{String, ToString};
use alloc::string::{String, ToString};
#[test]
fn unit_encodings() {

View File

@@ -12,7 +12,7 @@ include!(concat!(env!("OUT_DIR"), "/settings-riscv.rs"));
mod tests {
use super::{builder, Flags};
use crate::settings::{self, Configurable};
use std::string::ToString;
use alloc::string::ToString;
#[test]
fn display_default() {

View File

@@ -18,7 +18,7 @@ use crate::regalloc;
use crate::result::CodegenResult;
use crate::timing;
use core::fmt;
use std::boxed::Box;
use alloc::boxed::Box;
use target_lexicon::{PointerWidth, Triple};
#[allow(dead_code)]

View File

@@ -8,7 +8,7 @@ include!(concat!(env!("OUT_DIR"), "/registers-x86.rs"));
mod tests {
use super::*;
use crate::isa::RegUnit;
use std::string::{String, ToString};
use alloc::string::{String, ToString};
#[test]
fn unit_encodings() {