Adjust imports
This commit is contained in:
parent
274455a9d1
commit
5ceda6b016
10 changed files with 12 additions and 12 deletions
|
@ -8,7 +8,7 @@ use rustc_middle::ty::adjustment::PointerCoercion;
|
||||||
use rustc_middle::ty::layout::{IntegerExt, LayoutOf, TyAndLayout};
|
use rustc_middle::ty::layout::{IntegerExt, LayoutOf, TyAndLayout};
|
||||||
use rustc_middle::ty::{self, FloatTy, Ty, TypeAndMut};
|
use rustc_middle::ty::{self, FloatTy, Ty, TypeAndMut};
|
||||||
use rustc_target::abi::Integer;
|
use rustc_target::abi::Integer;
|
||||||
use rustc_type_ir::sty::TyKind::*;
|
use rustc_type_ir::TyKind::*;
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
util::ensure_monomorphic_enough, FnVal, ImmTy, Immediate, InterpCx, Machine, OpTy, PlaceTy,
|
util::ensure_monomorphic_enough, FnVal, ImmTy, Immediate, InterpCx, Machine, OpTy, PlaceTy,
|
||||||
|
@ -185,7 +185,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
||||||
src: &ImmTy<'tcx, M::Provenance>,
|
src: &ImmTy<'tcx, M::Provenance>,
|
||||||
cast_to: TyAndLayout<'tcx>,
|
cast_to: TyAndLayout<'tcx>,
|
||||||
) -> InterpResult<'tcx, ImmTy<'tcx, M::Provenance>> {
|
) -> InterpResult<'tcx, ImmTy<'tcx, M::Provenance>> {
|
||||||
use rustc_type_ir::sty::TyKind::*;
|
use rustc_type_ir::TyKind::*;
|
||||||
|
|
||||||
let val = match src.layout.ty.kind() {
|
let val = match src.layout.ty.kind() {
|
||||||
// Floating point
|
// Floating point
|
||||||
|
@ -310,7 +310,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
||||||
where
|
where
|
||||||
F: Float + Into<Scalar<M::Provenance>> + FloatConvert<Single> + FloatConvert<Double>,
|
F: Float + Into<Scalar<M::Provenance>> + FloatConvert<Single> + FloatConvert<Double>,
|
||||||
{
|
{
|
||||||
use rustc_type_ir::sty::TyKind::*;
|
use rustc_type_ir::TyKind::*;
|
||||||
|
|
||||||
fn adjust_nan<
|
fn adjust_nan<
|
||||||
'mir,
|
'mir,
|
||||||
|
|
|
@ -162,7 +162,7 @@ fn visit_implementation_of_dispatch_from_dyn(tcx: TyCtxt<'_>, impl_did: LocalDef
|
||||||
// trait, they *do* satisfy the repr(transparent) rules, and then we assume that everything else
|
// trait, they *do* satisfy the repr(transparent) rules, and then we assume that everything else
|
||||||
// in the compiler (in particular, all the call ABI logic) will treat them as repr(transparent)
|
// in the compiler (in particular, all the call ABI logic) will treat them as repr(transparent)
|
||||||
// even if they do not carry that attribute.
|
// even if they do not carry that attribute.
|
||||||
use rustc_type_ir::sty::TyKind::*;
|
use rustc_type_ir::TyKind::*;
|
||||||
match (source.kind(), target.kind()) {
|
match (source.kind(), target.kind()) {
|
||||||
(&Ref(r_a, _, mutbl_a), Ref(r_b, _, mutbl_b))
|
(&Ref(r_a, _, mutbl_a), Ref(r_b, _, mutbl_b))
|
||||||
if infcx.at(&cause, param_env).eq(DefineOpaqueTypes::No, r_a, *r_b).is_ok()
|
if infcx.at(&cause, param_env).eq(DefineOpaqueTypes::No, r_a, *r_b).is_ok()
|
||||||
|
|
|
@ -20,7 +20,7 @@ use rustc_span::Span;
|
||||||
use rustc_trait_selection::infer::InferCtxtExt;
|
use rustc_trait_selection::infer::InferCtxtExt;
|
||||||
use rustc_trait_selection::traits::error_reporting::suggestions::TypeErrCtxtExt as _;
|
use rustc_trait_selection::traits::error_reporting::suggestions::TypeErrCtxtExt as _;
|
||||||
use rustc_trait_selection::traits::{self, FulfillmentError, ObligationCtxt};
|
use rustc_trait_selection::traits::{self, FulfillmentError, ObligationCtxt};
|
||||||
use rustc_type_ir::sty::TyKind::*;
|
use rustc_type_ir::TyKind::*;
|
||||||
|
|
||||||
impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||||
/// Checks a `a <op>= b`
|
/// Checks a `a <op>= b`
|
||||||
|
|
|
@ -2475,7 +2475,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
|
||||||
ty: Ty<'tcx>,
|
ty: Ty<'tcx>,
|
||||||
init: InitKind,
|
init: InitKind,
|
||||||
) -> Option<InitError> {
|
) -> Option<InitError> {
|
||||||
use rustc_type_ir::sty::TyKind::*;
|
use rustc_type_ir::TyKind::*;
|
||||||
match ty.kind() {
|
match ty.kind() {
|
||||||
// Primitive types that don't like 0 as a value.
|
// Primitive types that don't like 0 as a value.
|
||||||
Ref(..) => Some("references must be non-null".into()),
|
Ref(..) => Some("references must be non-null".into()),
|
||||||
|
|
|
@ -262,7 +262,7 @@ fn structurally_same_type_impl<'tcx>(
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
// Do a full, depth-first comparison between the two.
|
// Do a full, depth-first comparison between the two.
|
||||||
use rustc_type_ir::sty::TyKind::*;
|
use rustc_type_ir::TyKind::*;
|
||||||
let a_kind = a.kind();
|
let a_kind = a.kind();
|
||||||
let b_kind = b.kind();
|
let b_kind = b.kind();
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||||
use rustc_span::{Span, DUMMY_SP};
|
use rustc_span::{Span, DUMMY_SP};
|
||||||
use rustc_target::abi::{FieldIdx, Layout, LayoutS, TargetDataLayout, VariantIdx};
|
use rustc_target::abi::{FieldIdx, Layout, LayoutS, TargetDataLayout, VariantIdx};
|
||||||
use rustc_target::spec::abi;
|
use rustc_target::spec::abi;
|
||||||
use rustc_type_ir::sty::TyKind::*;
|
use rustc_type_ir::TyKind::*;
|
||||||
use rustc_type_ir::WithCachedTypeInfo;
|
use rustc_type_ir::WithCachedTypeInfo;
|
||||||
use rustc_type_ir::{CollectAndApply, Interner, TypeFlags};
|
use rustc_type_ir::{CollectAndApply, Interner, TypeFlags};
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ use rustc_hir::def::DefKind;
|
||||||
use rustc_hir::def_id::DefId;
|
use rustc_hir::def_id::DefId;
|
||||||
use rustc_hir::{PredicateOrigin, WherePredicate};
|
use rustc_hir::{PredicateOrigin, WherePredicate};
|
||||||
use rustc_span::{BytePos, Span};
|
use rustc_span::{BytePos, Span};
|
||||||
use rustc_type_ir::sty::TyKind::*;
|
use rustc_type_ir::TyKind::*;
|
||||||
|
|
||||||
impl<'tcx> IntoDiagnosticArg for Ty<'tcx> {
|
impl<'tcx> IntoDiagnosticArg for Ty<'tcx> {
|
||||||
fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> {
|
fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> {
|
||||||
|
|
|
@ -47,7 +47,7 @@ use crate::query::Providers;
|
||||||
use crate::ty::context::TyCtxt;
|
use crate::ty::context::TyCtxt;
|
||||||
use crate::ty::{self, DefId, Ty, VariantDef, Visibility};
|
use crate::ty::{self, DefId, Ty, VariantDef, Visibility};
|
||||||
|
|
||||||
use rustc_type_ir::sty::TyKind::*;
|
use rustc_type_ir::TyKind::*;
|
||||||
|
|
||||||
pub mod inhabited_predicate;
|
pub mod inhabited_predicate;
|
||||||
|
|
||||||
|
|
|
@ -33,13 +33,13 @@ use std::marker::PhantomData;
|
||||||
use std::ops::{ControlFlow, Deref, Range};
|
use std::ops::{ControlFlow, Deref, Range};
|
||||||
use ty::util::IntTypeExt;
|
use ty::util::IntTypeExt;
|
||||||
|
|
||||||
use rustc_type_ir::sty::TyKind::*;
|
|
||||||
use rustc_type_ir::CollectAndApply;
|
use rustc_type_ir::CollectAndApply;
|
||||||
use rustc_type_ir::ConstKind as IrConstKind;
|
use rustc_type_ir::ConstKind as IrConstKind;
|
||||||
use rustc_type_ir::DebugWithInfcx;
|
use rustc_type_ir::DebugWithInfcx;
|
||||||
use rustc_type_ir::DynKind;
|
use rustc_type_ir::DynKind;
|
||||||
use rustc_type_ir::RegionKind as IrRegionKind;
|
use rustc_type_ir::RegionKind as IrRegionKind;
|
||||||
use rustc_type_ir::TyKind as IrTyKind;
|
use rustc_type_ir::TyKind as IrTyKind;
|
||||||
|
use rustc_type_ir::TyKind::*;
|
||||||
|
|
||||||
use super::GenericParamDefKind;
|
use super::GenericParamDefKind;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ fn sized_constraint_for_ty<'tcx>(
|
||||||
adtdef: ty::AdtDef<'tcx>,
|
adtdef: ty::AdtDef<'tcx>,
|
||||||
ty: Ty<'tcx>,
|
ty: Ty<'tcx>,
|
||||||
) -> Vec<Ty<'tcx>> {
|
) -> Vec<Ty<'tcx>> {
|
||||||
use rustc_type_ir::sty::TyKind::*;
|
use rustc_type_ir::TyKind::*;
|
||||||
|
|
||||||
let result = match ty.kind() {
|
let result = match ty.kind() {
|
||||||
Bool | Char | Int(..) | Uint(..) | Float(..) | RawPtr(..) | Ref(..) | FnDef(..)
|
Bool | Char | Int(..) | Uint(..) | Float(..) | RawPtr(..) | Ref(..) | FnDef(..)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue