Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
The Miri Cronjob Bot committed Sep 25, 2024
1 parent ef516ab commit 8dc52b3
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/intrinsics/atomic.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use rustc_middle::{mir, mir::BinOp, ty};

use crate::*;
use self::helpers::check_arg_count;
use crate::*;

pub enum AtomicOp {
/// The `bool` indicates whether the result of the operation should be negated (`UnOp::Not`,
Expand Down
2 changes: 1 addition & 1 deletion src/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ use rustc_middle::{
use rustc_span::{Symbol, sym};
use rustc_target::abi::Size;

use crate::*;
use self::atomic::EvalContextExt as _;
use self::helpers::{ToHost, ToSoft, check_arg_count};
use self::simd::EvalContextExt as _;
use crate::*;

impl<'tcx> EvalContextExt<'tcx> for crate::MiriInterpCx<'tcx> {}
pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
Expand Down
2 changes: 1 addition & 1 deletion src/shims/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use std::ffi::{OsStr, OsString};

use rustc_data_structures::fx::FxHashMap;

use crate::*;
use self::shims::{unix::UnixEnvVars, windows::WindowsEnvVars};
use crate::*;

#[derive(Default)]
pub enum EnvVars<'tcx> {
Expand Down
2 changes: 1 addition & 1 deletion src/shims/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ use rustc_target::{
spec::abi::Abi,
};

use self::helpers::{ToHost, ToSoft};
use super::alloc::EvalContextExt as _;
use super::backtrace::EvalContextExt as _;
use crate::*;
use self::helpers::{ToHost, ToSoft};

/// Type of dynamic symbols (for `dlsym` et al)
#[derive(Debug, Copy, Clone)]
Expand Down
2 changes: 1 addition & 1 deletion src/shims/panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ use rustc_middle::{mir, ty};
use rustc_target::spec::PanicStrategy;
use rustc_target::spec::abi::Abi;

use crate::*;
use self::helpers::check_arg_count;
use crate::*;

/// Holds all of the relevant data for when unwinding hits a `try` frame.
#[derive(Debug)]
Expand Down
2 changes: 1 addition & 1 deletion src/shims/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ use std::time::SystemTime;
use rustc_data_structures::fx::FxHashMap;
use rustc_target::abi::Size;

use self::shims::time::system_time_to_duration;
use crate::shims::os_str::bytes_to_os_str;
use crate::shims::unix::fd::FileDescriptionRef;
use crate::shims::unix::*;
use crate::*;
use self::shims::time::system_time_to_duration;

use self::fd::FlockOp;

Expand Down
8 changes: 4 additions & 4 deletions src/shims/unix/linux/foreign_items.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
use rustc_span::Symbol;
use rustc_target::spec::abi::Abi;

use crate::machine::SIGRTMAX;
use crate::machine::SIGRTMIN;
use crate::shims::unix::*;
use crate::*;
use self::shims::unix::linux::epoll::EvalContextExt as _;
use self::shims::unix::linux::eventfd::EvalContextExt as _;
use self::shims::unix::linux::mem::EvalContextExt as _;
use self::shims::unix::linux::sync::futex;
use crate::machine::SIGRTMAX;
use crate::machine::SIGRTMIN;
use crate::shims::unix::*;
use crate::*;

pub fn is_dyn_sym(name: &str) -> bool {
matches!(name, "statx")
Expand Down
3 changes: 2 additions & 1 deletion src/shims/unix/macos/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {

// Random data generation
"CCRandomGenerateBytes" => {
let [bytes, count] = this.check_shim(abi, Abi::C { unwind: false }, link_name, args)?;
let [bytes, count] =
this.check_shim(abi, Abi::C { unwind: false }, link_name, args)?;
let bytes = this.read_pointer(bytes)?;
let count = this.read_target_usize(count)?;
let success = this.eval_libc_i32("kCCSuccess");
Expand Down
2 changes: 1 addition & 1 deletion src/shims/windows/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use std::io::ErrorKind;

use rustc_data_structures::fx::FxHashMap;

use crate::*;
use self::helpers::windows_check_buffer_size;
use crate::*;

#[derive(Default)]
pub struct WindowsEnvVars {
Expand Down
2 changes: 1 addition & 1 deletion src/shims/windows/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ use rustc_span::Symbol;
use rustc_target::abi::{Align, Size};
use rustc_target::spec::abi::Abi;

use self::shims::windows::handle::{Handle, PseudoHandle};
use crate::shims::os_str::bytes_to_os_str;
use crate::shims::windows::*;
use crate::*;
use self::shims::windows::handle::{Handle, PseudoHandle};

pub fn is_dyn_sym(name: &str) -> bool {
// std does dynamic detection for these symbols
Expand Down
2 changes: 1 addition & 1 deletion src/shims/windows/thread.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use rustc_middle::ty::layout::LayoutOf;
use rustc_target::spec::abi::Abi;

use crate::*;
use self::shims::windows::handle::{EvalContextExt as _, Handle, PseudoHandle};
use crate::*;

impl<'tcx> EvalContextExt<'tcx> for crate::MiriInterpCx<'tcx> {}

Expand Down
2 changes: 1 addition & 1 deletion src/shims/x86/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use rustc_span::Symbol;
use rustc_target::abi::Size;
use rustc_target::spec::abi::Abi;

use crate::*;
use self::helpers::bool_to_simd_element;
use crate::*;

mod aesni;
mod avx;
Expand Down
4 changes: 3 additions & 1 deletion tests/fail/validity/wrong-dyn-trait-assoc-type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ trait Trait {

impl<T: Copy> Trait for T {
type Assoc = T;
fn foo(&self) -> T { *self }
fn foo(&self) -> T {
*self
}
}

fn main() {
Expand Down

0 comments on commit 8dc52b3

Please sign in to comment.