Skip to content

Commit

Permalink
Auto merge of #1887 - hyd-dev:rustup, r=RalfJung
Browse files Browse the repository at this point in the history
`rustc_target::abi::LayoutOf` -> `rustc_middle::ty::layout::LayoutOf`

This should  <!---->fix<!----> rust-lang/rust#88671.
  • Loading branch information
bors committed Sep 6, 2021
2 parents 4f1fca7 + 3fedc7b commit 7a2f1ca
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 18 deletions.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6cfa773583bb5123e630668f5bfe466716225546
1c858ba5bf7bd06c1a970efbf77053c8380b3151
7 changes: 5 additions & 2 deletions src/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ use std::ffi::OsStr;
use log::info;

use rustc_hir::def_id::DefId;
use rustc_middle::ty::{self, layout::LayoutCx, TyCtxt};
use rustc_target::abi::LayoutOf;
use rustc_middle::ty::{
self,
layout::{LayoutCx, LayoutOf},
TyCtxt,
};
use rustc_target::spec::abi::Abi;

use crate::*;
Expand Down
8 changes: 6 additions & 2 deletions src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ use log::trace;

use rustc_hir::def_id::{DefId, CRATE_DEF_INDEX};
use rustc_middle::mir;
use rustc_middle::ty::{self, layout::TyAndLayout, List, TyCtxt};
use rustc_middle::ty::{
self,
layout::{LayoutOf, TyAndLayout},
List, TyCtxt,
};
use rustc_span::Symbol;
use rustc_target::abi::{Align, FieldsShape, LayoutOf, Size, Variants};
use rustc_target::abi::{Align, FieldsShape, Size, Variants};
use rustc_target::spec::abi::Abi;

use rand::RngCore;
Expand Down
4 changes: 2 additions & 2 deletions src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ use rustc_middle::{
mir,
ty::{
self,
layout::{LayoutCx, LayoutError, TyAndLayout},
layout::{LayoutCx, LayoutError, LayoutOf, TyAndLayout},
Instance, TyCtxt,
},
};
use rustc_span::def_id::DefId;
use rustc_span::symbol::{sym, Symbol};
use rustc_target::abi::{LayoutOf, Size};
use rustc_target::abi::Size;
use rustc_target::spec::abi::Abi;

use crate::*;
Expand Down
2 changes: 1 addition & 1 deletion src/shims/backtrace.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::rustc_target::abi::LayoutOf as _;
use crate::*;
use rustc_ast::ast::Mutability;
use rustc_middle::ty::layout::LayoutOf as _;
use rustc_middle::ty::{self, TypeAndMut};
use rustc_span::{BytePos, Symbol};
use rustc_target::{abi::Size, spec::abi::Abi};
Expand Down
3 changes: 2 additions & 1 deletion src/shims/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ use std::ffi::{OsStr, OsString};
use std::io::ErrorKind;

use rustc_data_structures::fx::FxHashMap;
use rustc_middle::ty::layout::LayoutOf;
use rustc_mir::interpret::Pointer;
use rustc_target::abi::{LayoutOf, Size};
use rustc_target::abi::Size;

use crate::*;

Expand Down
4 changes: 2 additions & 2 deletions src/shims/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use std::iter;
use log::trace;

use rustc_apfloat::{Float, Round};
use rustc_middle::ty::layout::IntegerExt;
use rustc_middle::ty::layout::{IntegerExt, LayoutOf};
use rustc_middle::{mir, mir::BinOp, ty, ty::FloatTy};
use rustc_target::abi::{Align, Integer, LayoutOf};
use rustc_target::abi::{Align, Integer};

use crate::*;
use helpers::check_arg_count;
Expand Down
3 changes: 2 additions & 1 deletion src/shims/os_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ use std::os::unix::ffi::{OsStrExt, OsStringExt};
#[cfg(windows)]
use std::os::windows::ffi::{OsStrExt, OsStringExt};

use rustc_target::abi::{Align, LayoutOf, Size};
use rustc_middle::ty::layout::LayoutOf;
use rustc_target::abi::{Align, Size};

use crate::*;

Expand Down
3 changes: 2 additions & 1 deletion src/shims/posix/foreign_items.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use log::trace;

use rustc_middle::mir;
use rustc_middle::ty::layout::LayoutOf;
use rustc_span::Symbol;
use rustc_target::abi::{Align, LayoutOf, Size};
use rustc_target::abi::{Align, Size};
use rustc_target::spec::abi::Abi;

use crate::*;
Expand Down
4 changes: 2 additions & 2 deletions src/shims/posix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use std::time::SystemTime;
use log::trace;

use rustc_data_structures::fx::FxHashMap;
use rustc_middle::ty;
use rustc_target::abi::{Align, LayoutOf, Size};
use rustc_middle::ty::{self, layout::LayoutOf};
use rustc_target::abi::{Align, Size};

use crate::*;
use helpers::{check_arg_count, immty_from_int_checked, immty_from_uint_checked};
Expand Down
2 changes: 1 addition & 1 deletion src/shims/posix/thread.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::convert::TryInto;

use crate::*;
use rustc_target::abi::LayoutOf;
use rustc_middle::ty::layout::LayoutOf;
use rustc_target::spec::abi::Abi;

impl<'mir, 'tcx> EvalContextExt<'mir, 'tcx> for crate::MiriEvalContext<'mir, 'tcx> {}
Expand Down
4 changes: 2 additions & 2 deletions src/stacked_borrows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use std::num::NonZeroU64;
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_hir::Mutability;
use rustc_middle::mir::RetagKind;
use rustc_middle::ty;
use rustc_target::abi::{LayoutOf, Size};
use rustc_middle::ty::{self, layout::LayoutOf};
use rustc_target::abi::Size;

use crate::*;

Expand Down

0 comments on commit 7a2f1ca

Please sign in to comment.