fix unqualified_local_imports in Miri
This commit is contained in:
parent
584c5cf7ae
commit
4c43757e43
@ -22,9 +22,9 @@
|
|||||||
use crate::concurrency::data_race::{NaReadType, NaWriteType};
|
use crate::concurrency::data_race::{NaReadType, NaWriteType};
|
||||||
use crate::*;
|
use crate::*;
|
||||||
|
|
||||||
use diagnostics::{RetagCause, RetagInfo};
|
use self::diagnostics::{RetagCause, RetagInfo};
|
||||||
pub use item::{Item, Permission};
|
pub use self::item::{Item, Permission};
|
||||||
pub use stack::Stack;
|
pub use self::stack::Stack;
|
||||||
|
|
||||||
pub type AllocState = Stacks;
|
pub type AllocState = Stacks;
|
||||||
|
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod exhaustive;
|
mod exhaustive;
|
||||||
|
|
||||||
use perms::Permission;
|
use self::perms::Permission;
|
||||||
pub use tree::Tree;
|
pub use self::tree::Tree;
|
||||||
|
|
||||||
pub type AllocState = Tree;
|
pub type AllocState = Tree;
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ enum PermissionPriv {
|
|||||||
/// rejects: all child accesses (UB).
|
/// rejects: all child accesses (UB).
|
||||||
Disabled,
|
Disabled,
|
||||||
}
|
}
|
||||||
use PermissionPriv::*;
|
use self::PermissionPriv::*;
|
||||||
|
|
||||||
impl PartialOrd for PermissionPriv {
|
impl PartialOrd for PermissionPriv {
|
||||||
/// PermissionPriv is ordered by the reflexive transitive closure of
|
/// PermissionPriv is ordered by the reflexive transitive closure of
|
||||||
|
@ -7,4 +7,4 @@
|
|||||||
mod vector_clock;
|
mod vector_clock;
|
||||||
pub mod weak_memory;
|
pub mod weak_memory;
|
||||||
|
|
||||||
pub use vector_clock::VClock;
|
pub use self::vector_clock::VClock;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use rustc_middle::{mir, mir::BinOp, ty};
|
use rustc_middle::{mir, mir::BinOp, ty};
|
||||||
|
|
||||||
use crate::*;
|
use crate::*;
|
||||||
use helpers::check_arg_count;
|
use self::helpers::check_arg_count;
|
||||||
|
|
||||||
pub enum AtomicOp {
|
pub enum AtomicOp {
|
||||||
/// The `bool` indicates whether the result of the operation should be negated (`UnOp::Not`,
|
/// The `bool` indicates whether the result of the operation should be negated (`UnOp::Not`,
|
||||||
|
@ -13,9 +13,9 @@
|
|||||||
use rustc_target::abi::Size;
|
use rustc_target::abi::Size;
|
||||||
|
|
||||||
use crate::*;
|
use crate::*;
|
||||||
use atomic::EvalContextExt as _;
|
use self::atomic::EvalContextExt as _;
|
||||||
use helpers::{ToHost, ToSoft, check_arg_count};
|
use self::helpers::{ToHost, ToSoft, check_arg_count};
|
||||||
use simd::EvalContextExt as _;
|
use self::simd::EvalContextExt as _;
|
||||||
|
|
||||||
impl<'tcx> EvalContextExt<'tcx> for crate::MiriInterpCx<'tcx> {}
|
impl<'tcx> EvalContextExt<'tcx> for crate::MiriInterpCx<'tcx> {}
|
||||||
pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
|
pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
|
||||||
|
@ -51,6 +51,8 @@
|
|||||||
clippy::cast_lossless,
|
clippy::cast_lossless,
|
||||||
clippy::cast_possible_truncation,
|
clippy::cast_possible_truncation,
|
||||||
)]
|
)]
|
||||||
|
#![cfg_attr(not(bootstrap), feature(unqualified_local_imports))]
|
||||||
|
#![cfg_attr(not(bootstrap), warn(unqualified_local_imports))]
|
||||||
// Needed for rustdoc from bootstrap (with `-Znormalize-docs`).
|
// Needed for rustdoc from bootstrap (with `-Znormalize-docs`).
|
||||||
#![recursion_limit = "256"]
|
#![recursion_limit = "256"]
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
use rustc_data_structures::fx::FxHashMap;
|
use rustc_data_structures::fx::FxHashMap;
|
||||||
|
|
||||||
use crate::*;
|
use crate::*;
|
||||||
use shims::{unix::UnixEnvVars, windows::WindowsEnvVars};
|
use self::shims::{unix::UnixEnvVars, windows::WindowsEnvVars};
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub enum EnvVars<'tcx> {
|
pub enum EnvVars<'tcx> {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
use super::alloc::EvalContextExt as _;
|
use super::alloc::EvalContextExt as _;
|
||||||
use super::backtrace::EvalContextExt as _;
|
use super::backtrace::EvalContextExt as _;
|
||||||
use crate::*;
|
use crate::*;
|
||||||
use helpers::{ToHost, ToSoft};
|
use self::helpers::{ToHost, ToSoft};
|
||||||
|
|
||||||
/// Type of dynamic symbols (for `dlsym` et al)
|
/// Type of dynamic symbols (for `dlsym` et al)
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
pub mod time;
|
pub mod time;
|
||||||
pub mod tls;
|
pub mod tls;
|
||||||
|
|
||||||
pub use unix::{DirTable, EpollInterestTable, FdTable};
|
pub use self::unix::{DirTable, EpollInterestTable, FdTable};
|
||||||
|
|
||||||
/// What needs to be done after emulating an item (a shim or an intrinsic) is done.
|
/// What needs to be done after emulating an item (a shim or an intrinsic) is done.
|
||||||
pub enum EmulateItemResult {
|
pub enum EmulateItemResult {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
use rustc_target::spec::abi::Abi;
|
use rustc_target::spec::abi::Abi;
|
||||||
|
|
||||||
use crate::*;
|
use crate::*;
|
||||||
use helpers::check_arg_count;
|
use self::helpers::check_arg_count;
|
||||||
|
|
||||||
/// Holds all of the relevant data for when unwinding hits a `try` frame.
|
/// Holds all of the relevant data for when unwinding hits a `try` frame.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
@ -11,11 +11,11 @@
|
|||||||
use crate::shims::unix::*;
|
use crate::shims::unix::*;
|
||||||
use crate::*;
|
use crate::*;
|
||||||
|
|
||||||
use shims::unix::android::foreign_items as android;
|
use self::shims::unix::android::foreign_items as android;
|
||||||
use shims::unix::freebsd::foreign_items as freebsd;
|
use self::shims::unix::freebsd::foreign_items as freebsd;
|
||||||
use shims::unix::linux::foreign_items as linux;
|
use self::shims::unix::linux::foreign_items as linux;
|
||||||
use shims::unix::macos::foreign_items as macos;
|
use self::shims::unix::macos::foreign_items as macos;
|
||||||
use shims::unix::solarish::foreign_items as solarish;
|
use self::shims::unix::solarish::foreign_items as solarish;
|
||||||
|
|
||||||
pub fn is_dyn_sym(name: &str, target_os: &str) -> bool {
|
pub fn is_dyn_sym(name: &str, target_os: &str) -> bool {
|
||||||
match name {
|
match name {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
use crate::shims::unix::fd::FileDescriptionRef;
|
use crate::shims::unix::fd::FileDescriptionRef;
|
||||||
use crate::shims::unix::*;
|
use crate::shims::unix::*;
|
||||||
use crate::*;
|
use crate::*;
|
||||||
use shims::time::system_time_to_duration;
|
use self::shims::time::system_time_to_duration;
|
||||||
|
|
||||||
use self::fd::FlockOp;
|
use self::fd::FlockOp;
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
use crate::machine::SIGRTMIN;
|
use crate::machine::SIGRTMIN;
|
||||||
use crate::shims::unix::*;
|
use crate::shims::unix::*;
|
||||||
use crate::*;
|
use crate::*;
|
||||||
use shims::unix::linux::epoll::EvalContextExt as _;
|
use self::shims::unix::linux::epoll::EvalContextExt as _;
|
||||||
use shims::unix::linux::eventfd::EvalContextExt as _;
|
use self::shims::unix::linux::eventfd::EvalContextExt as _;
|
||||||
use shims::unix::linux::mem::EvalContextExt as _;
|
use self::shims::unix::linux::mem::EvalContextExt as _;
|
||||||
use shims::unix::linux::sync::futex;
|
use self::shims::unix::linux::sync::futex;
|
||||||
|
|
||||||
pub fn is_dyn_sym(name: &str) -> bool {
|
pub fn is_dyn_sym(name: &str) -> bool {
|
||||||
matches!(name, "statx")
|
matches!(name, "statx")
|
||||||
|
@ -14,18 +14,18 @@
|
|||||||
mod macos;
|
mod macos;
|
||||||
mod solarish;
|
mod solarish;
|
||||||
|
|
||||||
pub use env::UnixEnvVars;
|
pub use self::env::UnixEnvVars;
|
||||||
pub use fd::{FdTable, FileDescription};
|
pub use self::fd::{FdTable, FileDescription};
|
||||||
pub use fs::DirTable;
|
pub use self::fs::DirTable;
|
||||||
pub use linux::epoll::EpollInterestTable;
|
pub use self::linux::epoll::EpollInterestTable;
|
||||||
// All the Unix-specific extension traits
|
// All the Unix-specific extension traits
|
||||||
pub use env::EvalContextExt as _;
|
pub use self::env::EvalContextExt as _;
|
||||||
pub use fd::EvalContextExt as _;
|
pub use self::fd::EvalContextExt as _;
|
||||||
pub use fs::EvalContextExt as _;
|
pub use self::fs::EvalContextExt as _;
|
||||||
pub use mem::EvalContextExt as _;
|
pub use self::mem::EvalContextExt as _;
|
||||||
pub use sync::EvalContextExt as _;
|
pub use self::sync::EvalContextExt as _;
|
||||||
pub use thread::EvalContextExt as _;
|
pub use self::thread::EvalContextExt as _;
|
||||||
pub use unnamed_socket::EvalContextExt as _;
|
pub use self::unnamed_socket::EvalContextExt as _;
|
||||||
|
|
||||||
// Make up some constants.
|
// Make up some constants.
|
||||||
const UID: u32 = 1000;
|
const UID: u32 = 1000;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
use rustc_data_structures::fx::FxHashMap;
|
use rustc_data_structures::fx::FxHashMap;
|
||||||
|
|
||||||
use crate::*;
|
use crate::*;
|
||||||
use helpers::windows_check_buffer_size;
|
use self::helpers::windows_check_buffer_size;
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct WindowsEnvVars {
|
pub struct WindowsEnvVars {
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
use crate::shims::os_str::bytes_to_os_str;
|
use crate::shims::os_str::bytes_to_os_str;
|
||||||
use crate::shims::windows::*;
|
use crate::shims::windows::*;
|
||||||
use crate::*;
|
use crate::*;
|
||||||
use shims::windows::handle::{Handle, PseudoHandle};
|
use self::shims::windows::handle::{Handle, PseudoHandle};
|
||||||
|
|
||||||
pub fn is_dyn_sym(name: &str) -> bool {
|
pub fn is_dyn_sym(name: &str) -> bool {
|
||||||
// std does dynamic detection for these symbols
|
// std does dynamic detection for these symbols
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
mod sync;
|
mod sync;
|
||||||
mod thread;
|
mod thread;
|
||||||
|
|
||||||
pub use env::WindowsEnvVars;
|
pub use self::env::WindowsEnvVars;
|
||||||
// All the Windows-specific extension traits
|
// All the Windows-specific extension traits
|
||||||
pub use env::EvalContextExt as _;
|
pub use self::env::EvalContextExt as _;
|
||||||
pub use handle::EvalContextExt as _;
|
pub use self::handle::EvalContextExt as _;
|
||||||
pub use sync::EvalContextExt as _;
|
pub use self::sync::EvalContextExt as _;
|
||||||
pub use thread::EvalContextExt as _;
|
pub use self::thread::EvalContextExt as _;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
use rustc_target::spec::abi::Abi;
|
use rustc_target::spec::abi::Abi;
|
||||||
|
|
||||||
use crate::*;
|
use crate::*;
|
||||||
use shims::windows::handle::{EvalContextExt as _, Handle, PseudoHandle};
|
use self::shims::windows::handle::{EvalContextExt as _, Handle, PseudoHandle};
|
||||||
|
|
||||||
impl<'tcx> EvalContextExt<'tcx> for crate::MiriInterpCx<'tcx> {}
|
impl<'tcx> EvalContextExt<'tcx> for crate::MiriInterpCx<'tcx> {}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
use rustc_target::spec::abi::Abi;
|
use rustc_target::spec::abi::Abi;
|
||||||
|
|
||||||
use crate::*;
|
use crate::*;
|
||||||
use helpers::bool_to_simd_element;
|
use self::helpers::bool_to_simd_element;
|
||||||
|
|
||||||
mod aesni;
|
mod aesni;
|
||||||
mod avx;
|
mod avx;
|
||||||
|
Loading…
Reference in New Issue
Block a user