arch: Move crate to rust 2018 edition

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2021-05-11 14:19:04 +00:00 committed by Sebastien Boeuf
parent 86015bef78
commit 6895e634cc
5 changed files with 8 additions and 8 deletions

View File

@ -2,6 +2,7 @@
name = "arch"
version = "0.1.0"
authors = ["The Chromium OS Authors"]
edition = "2018"
[features]
default = []

View File

@ -14,7 +14,7 @@ pub mod regs;
pub use self::fdt::DeviceInfoForFdt;
use crate::DeviceType;
use crate::RegionType;
use aarch64::gic::GicDevice;
use gic::GicDevice;
use std::collections::HashMap;
use std::ffi::CStr;
use std::fmt::Debug;

View File

@ -5,8 +5,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-BSD-3-Clause file.
use crate::layout::{APIC_START, HIGH_RAM_START, IOAPIC_START};
use crate::x86_64::mpspec;
use layout::{APIC_START, HIGH_RAM_START, IOAPIC_START};
use libc::c_char;
use std::io;
use std::mem;
@ -285,7 +285,7 @@ pub fn setup_mptable(offset: GuestAddress, mem: &GuestMemoryMmap, num_cpus: u8)
#[cfg(test)]
mod tests {
use super::*;
use layout::MPTABLE_START;
use crate::layout::MPTABLE_START;
use vm_memory::{GuestAddress, GuestUsize};
fn table_entry_size(type_: u8) -> usize {

View File

@ -6,13 +6,12 @@
// Portions Copyright 2017 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-BSD-3-Clause file.
use std::sync::Arc;
use std::{mem, result};
use crate::layout::{BOOT_GDT_START, BOOT_IDT_START, PVH_INFO_START};
use hypervisor::arch::x86::gdt::{gdt_entry, segment_from_gdt};
use hypervisor::arch::x86::regs::*;
use hypervisor::x86_64::{FpuState, SpecialRegisters, StandardRegisters};
use layout::{BOOT_GDT_START, BOOT_IDT_START, PVH_INFO_START};
use std::sync::Arc;
use std::{mem, result};
use vm_memory::{Address, Bytes, GuestMemory, GuestMemoryError, GuestMemoryMmap};
#[derive(Debug)]

View File

@ -6,7 +6,7 @@
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
use layout::SMBIOS_START;
use crate::layout::SMBIOS_START;
use std::fmt::{self, Display};
use std::mem;
use std::result;