Reformat using the new identifier sorting from rustfmt
This commit is contained in:
parent
1173204b36
commit
c682aa162b
1455 changed files with 7152 additions and 8384 deletions
|
@ -1,9 +1,9 @@
|
|||
use rustc_ast::InlineAsmOptions;
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::span_bug;
|
||||
use rustc_middle::ty::{self, layout, TyCtxt};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use rustc_middle::ty::{self, TyCtxt, layout};
|
||||
use rustc_target::spec::PanicStrategy;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
|
||||
/// A pass that runs which is targeted at ensuring that codegen guarantees about
|
||||
/// unwinding are upheld for compilations of panic=abort programs.
|
||||
|
|
|
@ -95,13 +95,10 @@ fn add_move_for_packed_drop<'tcx>(
|
|||
|
||||
patch.add_statement(loc, StatementKind::StorageLive(temp));
|
||||
patch.add_assign(loc, Place::from(temp), Rvalue::Use(Operand::Move(*place)));
|
||||
patch.patch_terminator(
|
||||
loc.block,
|
||||
TerminatorKind::Drop {
|
||||
place: Place::from(temp),
|
||||
target: storage_dead_block,
|
||||
unwind,
|
||||
replace,
|
||||
},
|
||||
);
|
||||
patch.patch_terminator(loc.block, TerminatorKind::Drop {
|
||||
place: Place::from(temp),
|
||||
target: storage_dead_block,
|
||||
unwind,
|
||||
replace,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -111,13 +111,10 @@ impl<'tcx> crate::MirPass<'tcx> for AddRetag {
|
|||
.collect::<Vec<_>>();
|
||||
// Now we go over the returns we collected to retag the return values.
|
||||
for (source_info, dest_place, dest_block) in returns {
|
||||
basic_blocks[dest_block].statements.insert(
|
||||
0,
|
||||
Statement {
|
||||
source_info,
|
||||
kind: StatementKind::Retag(RetagKind::Default, Box::new(dest_place)),
|
||||
},
|
||||
);
|
||||
basic_blocks[dest_block].statements.insert(0, Statement {
|
||||
source_info,
|
||||
kind: StatementKind::Retag(RetagKind::Default, Box::new(dest_place)),
|
||||
});
|
||||
}
|
||||
|
||||
// PART 3
|
||||
|
@ -172,13 +169,10 @@ impl<'tcx> crate::MirPass<'tcx> for AddRetag {
|
|||
};
|
||||
// Insert a retag after the statement.
|
||||
let source_info = block_data.statements[i].source_info;
|
||||
block_data.statements.insert(
|
||||
i + 1,
|
||||
Statement {
|
||||
source_info,
|
||||
kind: StatementKind::Retag(retag_kind, Box::new(place)),
|
||||
},
|
||||
);
|
||||
block_data.statements.insert(i + 1, Statement {
|
||||
source_info,
|
||||
kind: StatementKind::Retag(retag_kind, Box::new(place)),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@ use rustc_middle::mir::visit::Visitor;
|
|||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::lint::builtin::CONST_ITEM_MUTATION;
|
||||
use rustc_span::def_id::DefId;
|
||||
use rustc_span::Span;
|
||||
use rustc_span::def_id::DefId;
|
||||
|
||||
use crate::errors;
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
use rustc_middle::mir::coverage::CoverageKind;
|
||||
use rustc_middle::mir::{Body, BorrowKind, CastKind, Rvalue, StatementKind, TerminatorKind};
|
||||
use rustc_middle::ty::adjustment::PointerCoercion;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_middle::ty::adjustment::PointerCoercion;
|
||||
|
||||
pub(super) struct CleanupPostBorrowck;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::IndexSlice;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_middle::mir::visit::*;
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
|
|
|
@ -67,14 +67,14 @@ use rustc_middle::ty::{
|
|||
self, CoroutineArgs, CoroutineArgsExt, GenericArgsRef, InstanceKind, Ty, TyCtxt,
|
||||
};
|
||||
use rustc_middle::{bug, span_bug};
|
||||
use rustc_mir_dataflow::Analysis;
|
||||
use rustc_mir_dataflow::impls::{
|
||||
MaybeBorrowedLocals, MaybeLiveLocals, MaybeRequiresStorage, MaybeStorageLive,
|
||||
};
|
||||
use rustc_mir_dataflow::storage::always_storage_live_locals;
|
||||
use rustc_mir_dataflow::Analysis;
|
||||
use rustc_span::Span;
|
||||
use rustc_span::def_id::{DefId, LocalDefId};
|
||||
use rustc_span::symbol::sym;
|
||||
use rustc_span::Span;
|
||||
use rustc_target::abi::{FieldIdx, VariantIdx};
|
||||
use rustc_target::spec::PanicStrategy;
|
||||
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
|
||||
|
@ -1054,14 +1054,11 @@ fn insert_switch<'tcx>(
|
|||
let switch = TerminatorKind::SwitchInt { discr: Operand::Move(discr), targets: switch_targets };
|
||||
|
||||
let source_info = SourceInfo::outermost(body.span);
|
||||
body.basic_blocks_mut().raw.insert(
|
||||
0,
|
||||
BasicBlockData {
|
||||
statements: vec![assign],
|
||||
terminator: Some(Terminator { source_info, kind: switch }),
|
||||
is_cleanup: false,
|
||||
},
|
||||
);
|
||||
body.basic_blocks_mut().raw.insert(0, BasicBlockData {
|
||||
statements: vec![assign],
|
||||
terminator: Some(Terminator { source_info, kind: switch }),
|
||||
is_cleanup: false,
|
||||
});
|
||||
|
||||
let blocks = body.basic_blocks_mut().iter_mut();
|
||||
|
||||
|
@ -1072,7 +1069,7 @@ fn insert_switch<'tcx>(
|
|||
|
||||
fn elaborate_coroutine_drops<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
use rustc_middle::mir::patch::MirPatch;
|
||||
use rustc_mir_dataflow::elaborate_drops::{elaborate_drop, Unwind};
|
||||
use rustc_mir_dataflow::elaborate_drops::{Unwind, elaborate_drop};
|
||||
|
||||
use crate::shim::DropShimElaborator;
|
||||
|
||||
|
@ -1605,16 +1602,13 @@ impl<'tcx> crate::MirPass<'tcx> for StateTransform {
|
|||
// (which is now a generator interior).
|
||||
let source_info = SourceInfo::outermost(body.span);
|
||||
let stmts = &mut body.basic_blocks_mut()[START_BLOCK].statements;
|
||||
stmts.insert(
|
||||
0,
|
||||
Statement {
|
||||
source_info,
|
||||
kind: StatementKind::Assign(Box::new((
|
||||
old_resume_local.into(),
|
||||
Rvalue::Use(Operand::Move(resume_local.into())),
|
||||
))),
|
||||
},
|
||||
);
|
||||
stmts.insert(0, Statement {
|
||||
source_info,
|
||||
kind: StatementKind::Assign(Box::new((
|
||||
old_resume_local.into(),
|
||||
Rvalue::Use(Operand::Move(resume_local.into())),
|
||||
))),
|
||||
});
|
||||
|
||||
let always_live_locals = always_storage_live_locals(body);
|
||||
|
||||
|
@ -1851,18 +1845,12 @@ fn check_suspend_tys<'tcx>(tcx: TyCtxt<'tcx>, layout: &CoroutineLayout<'tcx>, bo
|
|||
continue;
|
||||
};
|
||||
|
||||
check_must_not_suspend_ty(
|
||||
tcx,
|
||||
decl.ty,
|
||||
hir_id,
|
||||
param_env,
|
||||
SuspendCheckData {
|
||||
source_span: decl.source_info.span,
|
||||
yield_span: yield_source_info.span,
|
||||
plural_len: 1,
|
||||
..Default::default()
|
||||
},
|
||||
);
|
||||
check_must_not_suspend_ty(tcx, decl.ty, hir_id, param_env, SuspendCheckData {
|
||||
source_span: decl.source_info.span,
|
||||
yield_span: yield_source_info.span,
|
||||
plural_len: 1,
|
||||
..Default::default()
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1902,13 +1890,10 @@ fn check_must_not_suspend_ty<'tcx>(
|
|||
ty::Adt(_, args) if ty.is_box() => {
|
||||
let boxed_ty = args.type_at(0);
|
||||
let allocator_ty = args.type_at(1);
|
||||
check_must_not_suspend_ty(
|
||||
tcx,
|
||||
boxed_ty,
|
||||
hir_id,
|
||||
param_env,
|
||||
SuspendCheckData { descr_pre: &format!("{}boxed ", data.descr_pre), ..data },
|
||||
) || check_must_not_suspend_ty(
|
||||
check_must_not_suspend_ty(tcx, boxed_ty, hir_id, param_env, SuspendCheckData {
|
||||
descr_pre: &format!("{}boxed ", data.descr_pre),
|
||||
..data
|
||||
}) || check_must_not_suspend_ty(
|
||||
tcx,
|
||||
allocator_ty,
|
||||
hir_id,
|
||||
|
@ -1927,12 +1912,10 @@ fn check_must_not_suspend_ty<'tcx>(
|
|||
{
|
||||
let def_id = poly_trait_predicate.trait_ref.def_id;
|
||||
let descr_pre = &format!("{}implementer{} of ", data.descr_pre, plural_suffix);
|
||||
if check_must_not_suspend_def(
|
||||
tcx,
|
||||
def_id,
|
||||
hir_id,
|
||||
SuspendCheckData { descr_pre, ..data },
|
||||
) {
|
||||
if check_must_not_suspend_def(tcx, def_id, hir_id, SuspendCheckData {
|
||||
descr_pre,
|
||||
..data
|
||||
}) {
|
||||
has_emitted = true;
|
||||
break;
|
||||
}
|
||||
|
@ -1946,12 +1929,10 @@ fn check_must_not_suspend_ty<'tcx>(
|
|||
if let ty::ExistentialPredicate::Trait(ref trait_ref) = predicate.skip_binder() {
|
||||
let def_id = trait_ref.def_id;
|
||||
let descr_post = &format!(" trait object{}{}", plural_suffix, data.descr_post);
|
||||
if check_must_not_suspend_def(
|
||||
tcx,
|
||||
def_id,
|
||||
hir_id,
|
||||
SuspendCheckData { descr_post, ..data },
|
||||
) {
|
||||
if check_must_not_suspend_def(tcx, def_id, hir_id, SuspendCheckData {
|
||||
descr_post,
|
||||
..data
|
||||
}) {
|
||||
has_emitted = true;
|
||||
break;
|
||||
}
|
||||
|
@ -1963,13 +1944,10 @@ fn check_must_not_suspend_ty<'tcx>(
|
|||
let mut has_emitted = false;
|
||||
for (i, ty) in fields.iter().enumerate() {
|
||||
let descr_post = &format!(" in tuple element {i}");
|
||||
if check_must_not_suspend_ty(
|
||||
tcx,
|
||||
ty,
|
||||
hir_id,
|
||||
param_env,
|
||||
SuspendCheckData { descr_post, ..data },
|
||||
) {
|
||||
if check_must_not_suspend_ty(tcx, ty, hir_id, param_env, SuspendCheckData {
|
||||
descr_post,
|
||||
..data
|
||||
}) {
|
||||
has_emitted = true;
|
||||
}
|
||||
}
|
||||
|
@ -1977,29 +1955,20 @@ fn check_must_not_suspend_ty<'tcx>(
|
|||
}
|
||||
ty::Array(ty, len) => {
|
||||
let descr_pre = &format!("{}array{} of ", data.descr_pre, plural_suffix);
|
||||
check_must_not_suspend_ty(
|
||||
tcx,
|
||||
ty,
|
||||
hir_id,
|
||||
param_env,
|
||||
SuspendCheckData {
|
||||
descr_pre,
|
||||
plural_len: len.try_eval_target_usize(tcx, param_env).unwrap_or(0) as usize + 1,
|
||||
..data
|
||||
},
|
||||
)
|
||||
check_must_not_suspend_ty(tcx, ty, hir_id, param_env, SuspendCheckData {
|
||||
descr_pre,
|
||||
plural_len: len.try_eval_target_usize(tcx, param_env).unwrap_or(0) as usize + 1,
|
||||
..data
|
||||
})
|
||||
}
|
||||
// If drop tracking is enabled, we want to look through references, since the referent
|
||||
// may not be considered live across the await point.
|
||||
ty::Ref(_region, ty, _mutability) => {
|
||||
let descr_pre = &format!("{}reference{} to ", data.descr_pre, plural_suffix);
|
||||
check_must_not_suspend_ty(
|
||||
tcx,
|
||||
ty,
|
||||
hir_id,
|
||||
param_env,
|
||||
SuspendCheckData { descr_pre, ..data },
|
||||
)
|
||||
check_must_not_suspend_ty(tcx, ty, hir_id, param_env, SuspendCheckData {
|
||||
descr_pre,
|
||||
..data
|
||||
})
|
||||
}
|
||||
_ => false,
|
||||
}
|
||||
|
|
|
@ -140,10 +140,10 @@ pub(crate) fn coroutine_by_move_body_def_id<'tcx>(
|
|||
// If the parent capture is by-ref, then we need to apply an additional
|
||||
// deref before applying any further projections to this place.
|
||||
if parent_capture.is_by_ref() {
|
||||
child_precise_captures.insert(
|
||||
0,
|
||||
Projection { ty: parent_capture.place.ty(), kind: ProjectionKind::Deref },
|
||||
);
|
||||
child_precise_captures.insert(0, Projection {
|
||||
ty: parent_capture.place.ty(),
|
||||
kind: ProjectionKind::Deref,
|
||||
});
|
||||
}
|
||||
// If the child capture is by-ref, then we need to apply a "ref"
|
||||
// projection (i.e. `&`) at the end. But wait! We don't have that
|
||||
|
|
|
@ -6,8 +6,8 @@ use rustc_data_structures::captures::Captures;
|
|||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_data_structures::graph::dominators::{self, Dominators};
|
||||
use rustc_data_structures::graph::{self, DirectedGraph, StartNode};
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::mir::{self, BasicBlock, Terminator, TerminatorKind};
|
||||
use tracing::debug;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use std::collections::BTreeSet;
|
||||
|
||||
use rustc_data_structures::graph::DirectedGraph;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_middle::mir::coverage::{
|
||||
BlockMarkerId, BranchSpan, ConditionInfo, CoverageInfoHi, CoverageKind,
|
||||
};
|
||||
|
@ -10,10 +10,10 @@ use rustc_middle::mir::{self, BasicBlock, StatementKind};
|
|||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_span::Span;
|
||||
|
||||
use crate::coverage::ExtractedHirInfo;
|
||||
use crate::coverage::graph::{BasicCoverageBlock, CoverageGraph, START_BCB};
|
||||
use crate::coverage::spans::extract_refined_covspans;
|
||||
use crate::coverage::unexpand::unexpand_into_body_span;
|
||||
use crate::coverage::ExtractedHirInfo;
|
||||
|
||||
/// Associates an ordinary executable code span with its corresponding BCB.
|
||||
#[derive(Debug)]
|
||||
|
|
|
@ -9,7 +9,7 @@ mod tests;
|
|||
mod unexpand;
|
||||
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::intravisit::{walk_expr, Visitor};
|
||||
use rustc_hir::intravisit::{Visitor, walk_expr};
|
||||
use rustc_middle::hir::map::Map;
|
||||
use rustc_middle::hir::nested_filter;
|
||||
use rustc_middle::mir::coverage::{
|
||||
|
@ -147,8 +147,8 @@ fn create_mappings<'tcx>(
|
|||
|
||||
let source_file = source_map.lookup_source_file(body_span.lo());
|
||||
|
||||
use rustc_session::config::RemapPathScopeComponents;
|
||||
use rustc_session::RemapFileNameExt;
|
||||
use rustc_session::config::RemapPathScopeComponents;
|
||||
let file_name = Symbol::intern(
|
||||
&source_file.name.for_scope(tcx.sess, RemapPathScopeComponents::MACRO).to_string_lossy(),
|
||||
);
|
||||
|
|
|
@ -8,9 +8,9 @@ use tracing::{debug, debug_span, instrument};
|
|||
|
||||
use crate::coverage::graph::{BasicCoverageBlock, CoverageGraph};
|
||||
use crate::coverage::spans::from_mir::{
|
||||
extract_covspans_from_mir, ExtractedCovspans, Hole, SpanFromMir,
|
||||
ExtractedCovspans, Hole, SpanFromMir, extract_covspans_from_mir,
|
||||
};
|
||||
use crate::coverage::{mappings, ExtractedHirInfo};
|
||||
use crate::coverage::{ExtractedHirInfo, mappings};
|
||||
|
||||
mod from_mir;
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@ use rustc_middle::mir::{
|
|||
};
|
||||
use rustc_span::{ExpnKind, Span};
|
||||
|
||||
use crate::coverage::ExtractedHirInfo;
|
||||
use crate::coverage::graph::{
|
||||
BasicCoverageBlock, BasicCoverageBlockData, CoverageGraph, START_BCB,
|
||||
};
|
||||
use crate::coverage::spans::Covspan;
|
||||
use crate::coverage::unexpand::unexpand_into_body_span_with_expn_kind;
|
||||
use crate::coverage::ExtractedHirInfo;
|
||||
|
||||
pub(crate) struct ExtractedCovspans {
|
||||
pub(crate) covspans: Vec<SpanFromMir>,
|
||||
|
|
|
@ -29,7 +29,7 @@ use rustc_data_structures::graph::{DirectedGraph, Successors};
|
|||
use rustc_index::{Idx, IndexVec};
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::{bug, ty};
|
||||
use rustc_span::{BytePos, Pos, Span, DUMMY_SP};
|
||||
use rustc_span::{BytePos, DUMMY_SP, Pos, Span};
|
||||
|
||||
use super::graph::{self, BasicCoverageBlock};
|
||||
|
||||
|
@ -129,18 +129,15 @@ impl<'tcx> MockBlocks<'tcx> {
|
|||
}
|
||||
|
||||
fn call(&mut self, some_from_block: Option<BasicBlock>) -> BasicBlock {
|
||||
self.add_block_from(
|
||||
some_from_block,
|
||||
TerminatorKind::Call {
|
||||
func: Operand::Copy(self.dummy_place.clone()),
|
||||
args: [].into(),
|
||||
destination: self.dummy_place.clone(),
|
||||
target: Some(TEMP_BLOCK),
|
||||
unwind: UnwindAction::Continue,
|
||||
call_source: CallSource::Misc,
|
||||
fn_span: DUMMY_SP,
|
||||
},
|
||||
)
|
||||
self.add_block_from(some_from_block, TerminatorKind::Call {
|
||||
func: Operand::Copy(self.dummy_place.clone()),
|
||||
args: [].into(),
|
||||
destination: self.dummy_place.clone(),
|
||||
target: Some(TEMP_BLOCK),
|
||||
unwind: UnwindAction::Continue,
|
||||
call_source: CallSource::Misc,
|
||||
fn_span: DUMMY_SP,
|
||||
})
|
||||
}
|
||||
|
||||
fn goto(&mut self, some_from_block: Option<BasicBlock>) -> BasicBlock {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//!
|
||||
//! Currently, this pass only propagates scalar values.
|
||||
|
||||
use rustc_const_eval::const_eval::{throw_machine_stop_str, DummyMachine};
|
||||
use rustc_const_eval::const_eval::{DummyMachine, throw_machine_stop_str};
|
||||
use rustc_const_eval::interpret::{ImmTy, Immediate, InterpCx, OpTy, PlaceTy, Projectable};
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_hir::def::DefKind;
|
||||
|
@ -18,7 +18,7 @@ use rustc_mir_dataflow::value_analysis::{
|
|||
};
|
||||
use rustc_mir_dataflow::{Analysis, Results, ResultsVisitor};
|
||||
use rustc_span::DUMMY_SP;
|
||||
use rustc_target::abi::{Abi, FieldIdx, Size, VariantIdx, FIRST_VARIANT};
|
||||
use rustc_target::abi::{Abi, FIRST_VARIANT, FieldIdx, Size, VariantIdx};
|
||||
use tracing::{debug, debug_span, instrument};
|
||||
|
||||
// These constants are somewhat random guesses and have not been optimized.
|
||||
|
|
|
@ -16,11 +16,11 @@ use rustc_middle::bug;
|
|||
use rustc_middle::mir::visit::Visitor;
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_mir_dataflow::Analysis;
|
||||
use rustc_mir_dataflow::debuginfo::debuginfo_locals;
|
||||
use rustc_mir_dataflow::impls::{
|
||||
borrowed_locals, LivenessTransferFunction, MaybeTransitiveLiveLocals,
|
||||
LivenessTransferFunction, MaybeTransitiveLiveLocals, borrowed_locals,
|
||||
};
|
||||
use rustc_mir_dataflow::Analysis;
|
||||
|
||||
use crate::util::is_within_packed;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
use rustc_hir::def_id::LocalDefId;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_middle::mir::visit::{NonMutatingUseContext, PlaceContext, Visitor};
|
||||
use rustc_middle::mir::{Body, Location, Operand, Place, Terminator, TerminatorKind, RETURN_PLACE};
|
||||
use rustc_middle::mir::{Body, Location, Operand, Place, RETURN_PLACE, Terminator, TerminatorKind};
|
||||
use rustc_middle::ty::{self, DeducedParamAttrs, Ty, TyCtxt};
|
||||
use rustc_session::config::OptLevel;
|
||||
|
||||
|
|
|
@ -137,13 +137,13 @@ use rustc_index::interval::SparseIntervalMatrix;
|
|||
use rustc_middle::bug;
|
||||
use rustc_middle::mir::visit::{MutVisitor, PlaceContext, Visitor};
|
||||
use rustc_middle::mir::{
|
||||
dump_mir, traversal, Body, HasLocalDecls, InlineAsmOperand, Local, LocalKind, Location,
|
||||
Operand, PassWhere, Place, Rvalue, Statement, StatementKind, TerminatorKind,
|
||||
Body, HasLocalDecls, InlineAsmOperand, Local, LocalKind, Location, Operand, PassWhere, Place,
|
||||
Rvalue, Statement, StatementKind, TerminatorKind, dump_mir, traversal,
|
||||
};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_mir_dataflow::impls::MaybeLiveLocals;
|
||||
use rustc_mir_dataflow::points::{save_as_intervals, DenseLocationMap, PointIndex};
|
||||
use rustc_mir_dataflow::Analysis;
|
||||
use rustc_mir_dataflow::impls::MaybeLiveLocals;
|
||||
use rustc_mir_dataflow::points::{DenseLocationMap, PointIndex, save_as_intervals};
|
||||
use tracing::{debug, trace};
|
||||
|
||||
pub(super) struct DestinationPropagation;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
use std::fs::File;
|
||||
use std::io;
|
||||
|
||||
use rustc_middle::mir::{write_mir_pretty, Body};
|
||||
use rustc_middle::mir::{Body, write_mir_pretty};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::config::{OutFileName, OutputType};
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
use std::fmt;
|
||||
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_middle::mir::patch::MirPatch;
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
use rustc_mir_dataflow::elaborate_drops::{
|
||||
elaborate_drop, DropElaborator, DropFlagMode, DropFlagState, DropStyle, Unwind,
|
||||
DropElaborator, DropFlagMode, DropFlagState, DropStyle, Unwind, elaborate_drop,
|
||||
};
|
||||
use rustc_mir_dataflow::impls::{MaybeInitializedPlaces, MaybeUninitializedPlaces};
|
||||
use rustc_mir_dataflow::move_paths::{LookupResult, MoveData, MovePathIndex};
|
||||
use rustc_mir_dataflow::{
|
||||
on_all_children_bits, on_lookup_result_bits, Analysis, MoveDataParamEnv, ResultsCursor,
|
||||
Analysis, MoveDataParamEnv, ResultsCursor, on_all_children_bits, on_lookup_result_bits,
|
||||
};
|
||||
use rustc_span::Span;
|
||||
use rustc_target::abi::{FieldIdx, VariantIdx};
|
||||
|
|
|
@ -4,8 +4,8 @@ use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic};
|
|||
use rustc_middle::mir::AssertKind;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::lint::{self, Lint};
|
||||
use rustc_span::def_id::DefId;
|
||||
use rustc_span::Span;
|
||||
use rustc_span::def_id::DefId;
|
||||
|
||||
use crate::fluent_generated as fluent;
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use rustc_hir::def_id::{LocalDefId, LOCAL_CRATE};
|
||||
use rustc_hir::def_id::{LOCAL_CRATE, LocalDefId};
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::query::{LocalCrate, Providers};
|
||||
use rustc_middle::ty::{self, layout, TyCtxt};
|
||||
use rustc_middle::ty::{self, TyCtxt, layout};
|
||||
use rustc_middle::{bug, span_bug};
|
||||
use rustc_session::lint::builtin::FFI_UNWIND_CALLS;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use rustc_target::spec::PanicStrategy;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::errors;
|
||||
|
@ -86,12 +86,10 @@ fn has_ffi_unwind_calls(tcx: TyCtxt<'_>, local_def_id: LocalDefId) -> bool {
|
|||
let span = terminator.source_info.span;
|
||||
|
||||
let foreign = fn_def_id.is_some();
|
||||
tcx.emit_node_span_lint(
|
||||
FFI_UNWIND_CALLS,
|
||||
lint_root,
|
||||
tcx.emit_node_span_lint(FFI_UNWIND_CALLS, lint_root, span, errors::FfiUnwindCall {
|
||||
span,
|
||||
errors::FfiUnwindCall { span, foreign },
|
||||
);
|
||||
foreign,
|
||||
});
|
||||
|
||||
tainted = true;
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@ use rustc_middle::mir::visit::Visitor;
|
|||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::{self, EarlyBinder, GenericArgsRef, Ty, TyCtxt};
|
||||
use rustc_session::lint::builtin::FUNCTION_ITEM_REFERENCES;
|
||||
use rustc_span::Span;
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::symbol::sym;
|
||||
use rustc_span::Span;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
|
||||
use crate::errors;
|
||||
|
|
|
@ -87,23 +87,23 @@ use std::borrow::Cow;
|
|||
use either::Either;
|
||||
use rustc_const_eval::const_eval::DummyMachine;
|
||||
use rustc_const_eval::interpret::{
|
||||
intern_const_alloc_for_constprop, ImmTy, Immediate, InterpCx, MemPlaceMeta, MemoryKind, OpTy,
|
||||
Projectable, Scalar,
|
||||
ImmTy, Immediate, InterpCx, MemPlaceMeta, MemoryKind, OpTy, Projectable, Scalar,
|
||||
intern_const_alloc_for_constprop,
|
||||
};
|
||||
use rustc_data_structures::fx::FxIndexSet;
|
||||
use rustc_data_structures::graph::dominators::Dominators;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::{newtype_index, IndexVec};
|
||||
use rustc_index::{IndexVec, newtype_index};
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::mir::interpret::GlobalAlloc;
|
||||
use rustc_middle::mir::visit::*;
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::layout::{HasParamEnv, LayoutOf};
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
use rustc_span::def_id::DefId;
|
||||
use rustc_span::DUMMY_SP;
|
||||
use rustc_target::abi::{self, Abi, FieldIdx, Size, VariantIdx, FIRST_VARIANT};
|
||||
use rustc_span::def_id::DefId;
|
||||
use rustc_target::abi::{self, Abi, FIRST_VARIANT, FieldIdx, Size, VariantIdx};
|
||||
use smallvec::SmallVec;
|
||||
use tracing::{debug, instrument, trace};
|
||||
|
||||
|
@ -1333,8 +1333,8 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
|
|||
to: Ty<'tcx>,
|
||||
location: Location,
|
||||
) -> Option<VnIndex> {
|
||||
use rustc_middle::ty::adjustment::PointerCoercion::*;
|
||||
use CastKind::*;
|
||||
use rustc_middle::ty::adjustment::PointerCoercion::*;
|
||||
|
||||
let mut from = operand.ty(self.local_decls, self.tcx);
|
||||
let mut value = self.simplify_operand(operand, location)?;
|
||||
|
|
|
@ -6,8 +6,8 @@ use std::ops::{Range, RangeFrom};
|
|||
use rustc_attr::InlineAttr;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::Idx;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs};
|
||||
use rustc_middle::mir::visit::*;
|
||||
|
@ -885,13 +885,10 @@ impl<'tcx> Inliner<'tcx> {
|
|||
});
|
||||
|
||||
if let Some(block) = return_block {
|
||||
caller_body[block].statements.insert(
|
||||
0,
|
||||
Statement {
|
||||
source_info: callsite.source_info,
|
||||
kind: StatementKind::StorageDead(local),
|
||||
},
|
||||
);
|
||||
caller_body[block].statements.insert(0, Statement {
|
||||
source_info: callsite.source_info,
|
||||
kind: StatementKind::StorageDead(local),
|
||||
});
|
||||
}
|
||||
|
||||
local
|
||||
|
|
|
@ -5,7 +5,7 @@ use rustc_hir::LangItem;
|
|||
use rustc_middle::bug;
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::layout::ValidityRequirement;
|
||||
use rustc_middle::ty::{self, layout, GenericArgsRef, ParamEnv, Ty, TyCtxt};
|
||||
use rustc_middle::ty::{self, GenericArgsRef, ParamEnv, Ty, TyCtxt, layout};
|
||||
use rustc_span::sym;
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
|
|
|
@ -39,8 +39,8 @@ use rustc_arena::DroplessArena;
|
|||
use rustc_const_eval::const_eval::DummyMachine;
|
||||
use rustc_const_eval::interpret::{ImmTy, Immediate, InterpCx, OpTy, Projectable};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::mir::interpret::Scalar;
|
||||
use rustc_middle::mir::visit::Visitor;
|
||||
|
|
|
@ -6,13 +6,13 @@ use std::fmt::Debug;
|
|||
|
||||
use rustc_const_eval::const_eval::DummyMachine;
|
||||
use rustc_const_eval::interpret::{
|
||||
format_interp_error, ImmTy, InterpCx, InterpResult, Projectable, Scalar,
|
||||
ImmTy, InterpCx, InterpResult, Projectable, Scalar, format_interp_error,
|
||||
};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::HirId;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::mir::visit::{MutatingUseContext, NonMutatingUseContext, PlaceContext, Visitor};
|
||||
use rustc_middle::mir::*;
|
||||
|
@ -296,12 +296,11 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
|||
let source_info = self.body.source_info(location);
|
||||
if let Some(lint_root) = self.lint_root(*source_info) {
|
||||
let span = source_info.span;
|
||||
self.tcx.emit_node_span_lint(
|
||||
lint_kind.lint(),
|
||||
lint_root,
|
||||
self.tcx.emit_node_span_lint(lint_kind.lint(), lint_root, span, AssertLint {
|
||||
span,
|
||||
AssertLint { span, assert_kind, lint_kind },
|
||||
);
|
||||
assert_kind,
|
||||
lint_kind,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,14 +26,14 @@ use rustc_hir::def_id::LocalDefId;
|
|||
use rustc_index::IndexVec;
|
||||
use rustc_middle::mir::{
|
||||
AnalysisPhase, Body, CallSource, ClearCrossCrate, ConstOperand, ConstQualifs, LocalDecl,
|
||||
MirPhase, Operand, Place, ProjectionElem, Promoted, RuntimePhase, Rvalue, SourceInfo,
|
||||
Statement, StatementKind, TerminatorKind, START_BLOCK,
|
||||
MirPhase, Operand, Place, ProjectionElem, Promoted, RuntimePhase, Rvalue, START_BLOCK,
|
||||
SourceInfo, Statement, StatementKind, TerminatorKind,
|
||||
};
|
||||
use rustc_middle::ty::{self, TyCtxt, TypeVisitableExt};
|
||||
use rustc_middle::util::Providers;
|
||||
use rustc_middle::{bug, query, span_bug};
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::{sym, DUMMY_SP};
|
||||
use rustc_span::{DUMMY_SP, sym};
|
||||
use rustc_trait_selection::traits;
|
||||
use tracing::{debug, trace};
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ use std::cell::Cell;
|
|||
use std::{cmp, iter, mem};
|
||||
|
||||
use either::{Left, Right};
|
||||
use rustc_const_eval::check_consts::{qualifs, ConstCx};
|
||||
use rustc_const_eval::check_consts::{ConstCx, qualifs};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_hir as hir;
|
||||
use rustc_index::{Idx, IndexSlice, IndexVec};
|
||||
|
@ -23,8 +23,8 @@ use rustc_middle::mir::visit::{MutVisitor, MutatingUseContext, PlaceContext, Vis
|
|||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::{self, GenericArgs, List, Ty, TyCtxt, TypeVisitableExt};
|
||||
use rustc_middle::{bug, mir, span_bug};
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::Span;
|
||||
use rustc_span::source_map::Spanned;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
/// A `MirPass` for promotion.
|
||||
|
@ -912,23 +912,19 @@ impl<'a, 'tcx> Promoter<'a, 'tcx> {
|
|||
self.extra_statements.push((loc, promoted_ref_statement));
|
||||
|
||||
(
|
||||
Rvalue::Ref(
|
||||
tcx.lifetimes.re_erased,
|
||||
*borrow_kind,
|
||||
Place {
|
||||
local: mem::replace(&mut place.local, promoted_ref),
|
||||
projection: List::empty(),
|
||||
},
|
||||
),
|
||||
Rvalue::Ref(tcx.lifetimes.re_erased, *borrow_kind, Place {
|
||||
local: mem::replace(&mut place.local, promoted_ref),
|
||||
projection: List::empty(),
|
||||
}),
|
||||
promoted_operand,
|
||||
)
|
||||
};
|
||||
|
||||
assert_eq!(self.new_block(), START_BLOCK);
|
||||
self.visit_rvalue(
|
||||
&mut rvalue,
|
||||
Location { block: START_BLOCK, statement_index: usize::MAX },
|
||||
);
|
||||
self.visit_rvalue(&mut rvalue, Location {
|
||||
block: START_BLOCK,
|
||||
statement_index: usize::MAX,
|
||||
});
|
||||
|
||||
let span = self.promoted.span;
|
||||
self.assign(RETURN_PLACE, rvalue, span);
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
use std::borrow::Cow;
|
||||
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::mir::visit::*;
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_mir_dataflow::Analysis;
|
||||
use rustc_mir_dataflow::impls::MaybeStorageDead;
|
||||
use rustc_mir_dataflow::storage::always_storage_live_locals;
|
||||
use rustc_mir_dataflow::Analysis;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
use crate::ssa::{SsaLocals, StorageLiveLocals};
|
||||
|
|
|
@ -3,7 +3,7 @@ use rustc_middle::mir::{Body, TerminatorKind};
|
|||
use rustc_middle::ty::{self, GenericArgsRef, ParamEnv, Ty, TyCtxt, VariantDef};
|
||||
use rustc_mir_dataflow::impls::MaybeInitializedPlaces;
|
||||
use rustc_mir_dataflow::move_paths::{LookupResult, MoveData, MovePathIndex};
|
||||
use rustc_mir_dataflow::{move_path_children_matching, Analysis, MaybeReachable};
|
||||
use rustc_mir_dataflow::{Analysis, MaybeReachable, move_path_children_matching};
|
||||
use rustc_target::abi::FieldIdx;
|
||||
|
||||
/// Removes `Drop` terminators whose target is known to be uninitialized at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use rustc_middle::mir::visit::Visitor;
|
||||
use rustc_middle::mir::{traversal, Body, ConstOperand, Location};
|
||||
use rustc_middle::mir::{Body, ConstOperand, Location, traversal};
|
||||
|
||||
pub(super) struct RequiredConstsVisitor<'tcx> {
|
||||
required_consts: Vec<ConstOperand<'tcx>>,
|
||||
|
|
|
@ -14,8 +14,8 @@ use rustc_middle::ty::{
|
|||
use rustc_middle::{bug, span_bug};
|
||||
use rustc_mir_dataflow::elaborate_drops::{self, DropElaborator, DropFlagMode, DropStyle};
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
use rustc_target::abi::{FieldIdx, VariantIdx, FIRST_VARIANT};
|
||||
use rustc_span::{DUMMY_SP, Span};
|
||||
use rustc_target::abi::{FIRST_VARIANT, FieldIdx, VariantIdx};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ use rustc_hir::lang_items::LangItem;
|
|||
use rustc_index::{Idx, IndexVec};
|
||||
use rustc_middle::mir::{
|
||||
BasicBlock, BasicBlockData, Body, CallSource, CastKind, Const, ConstOperand, ConstValue, Local,
|
||||
LocalDecl, MirSource, Operand, Place, PlaceElem, Rvalue, SourceInfo, Statement, StatementKind,
|
||||
Terminator, TerminatorKind, UnwindAction, UnwindTerminateReason, RETURN_PLACE,
|
||||
LocalDecl, MirSource, Operand, Place, PlaceElem, RETURN_PLACE, Rvalue, SourceInfo, Statement,
|
||||
StatementKind, Terminator, TerminatorKind, UnwindAction, UnwindTerminateReason,
|
||||
};
|
||||
use rustc_middle::ty::adjustment::PointerCoercion;
|
||||
use rustc_middle::ty::util::{AsyncDropGlueMorphology, Discr};
|
||||
|
@ -452,19 +452,17 @@ impl<'tcx> AsyncDestructorCtorShimBuilder<'tcx> {
|
|||
}
|
||||
|
||||
fn combine_sync_surface(&mut self) -> Ty<'tcx> {
|
||||
self.apply_combinator(
|
||||
1,
|
||||
LangItem::AsyncDropSurfaceDropInPlace,
|
||||
&[self.self_ty.unwrap().into()],
|
||||
)
|
||||
self.apply_combinator(1, LangItem::AsyncDropSurfaceDropInPlace, &[self
|
||||
.self_ty
|
||||
.unwrap()
|
||||
.into()])
|
||||
}
|
||||
|
||||
fn combine_deferred_drop_in_place(&mut self) -> Ty<'tcx> {
|
||||
self.apply_combinator(
|
||||
1,
|
||||
LangItem::AsyncDropDeferredDropInPlace,
|
||||
&[self.self_ty.unwrap().into()],
|
||||
)
|
||||
self.apply_combinator(1, LangItem::AsyncDropDeferredDropInPlace, &[self
|
||||
.self_ty
|
||||
.unwrap()
|
||||
.into()])
|
||||
}
|
||||
|
||||
fn combine_fuse(&mut self, inner_future_ty: Ty<'tcx>) -> Ty<'tcx> {
|
||||
|
@ -484,11 +482,11 @@ impl<'tcx> AsyncDestructorCtorShimBuilder<'tcx> {
|
|||
}
|
||||
|
||||
fn combine_either(&mut self, other: Ty<'tcx>, matched: Ty<'tcx>) -> Ty<'tcx> {
|
||||
self.apply_combinator(
|
||||
4,
|
||||
LangItem::AsyncDropEither,
|
||||
&[other.into(), matched.into(), self.self_ty.unwrap().into()],
|
||||
)
|
||||
self.apply_combinator(4, LangItem::AsyncDropEither, &[
|
||||
other.into(),
|
||||
matched.into(),
|
||||
self.self_ty.unwrap().into(),
|
||||
])
|
||||
}
|
||||
|
||||
fn return_(mut self) -> Body<'tcx> {
|
||||
|
|
|
@ -113,13 +113,10 @@ impl<'tcx> crate::MirPass<'tcx> for SimplifyComparisonIntegral {
|
|||
// if we have StorageDeads to remove then make sure to insert them at the top of
|
||||
// each target
|
||||
for bb_idx in new_targets.all_targets() {
|
||||
storage_deads_to_insert.push((
|
||||
*bb_idx,
|
||||
Statement {
|
||||
source_info: terminator.source_info,
|
||||
kind: StatementKind::StorageDead(opt.to_switch_on.local),
|
||||
},
|
||||
));
|
||||
storage_deads_to_insert.push((*bb_idx, Statement {
|
||||
source_info: terminator.source_info,
|
||||
kind: StatementKind::StorageDead(opt.to_switch_on.local),
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::mir::visit::{MutVisitor, PlaceContext, Visitor};
|
||||
use rustc_middle::mir::*;
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
use rustc_data_structures::flat_map_in_place::FlatMapInPlace;
|
||||
use rustc_hir::LangItem;
|
||||
use rustc_index::bit_set::{BitSet, GrowableBitSet};
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_index::bit_set::{BitSet, GrowableBitSet};
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::mir::patch::MirPatch;
|
||||
use rustc_middle::mir::visit::*;
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
use rustc_mir_dataflow::value_analysis::{excluded_locals, iter_fields};
|
||||
use rustc_target::abi::{FieldIdx, FIRST_VARIANT};
|
||||
use rustc_target::abi::{FIRST_VARIANT, FieldIdx};
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
pub(super) struct ScalarReplacementOfAggregates;
|
||||
|
|
|
@ -159,11 +159,10 @@ impl SsaLocals {
|
|||
) {
|
||||
for &local in &self.assignment_order {
|
||||
match self.assignments[local] {
|
||||
Set1::One(DefLocation::Argument) => f(
|
||||
local,
|
||||
AssignedValue::Arg,
|
||||
Location { block: START_BLOCK, statement_index: 0 },
|
||||
),
|
||||
Set1::One(DefLocation::Argument) => f(local, AssignedValue::Arg, Location {
|
||||
block: START_BLOCK,
|
||||
statement_index: 0,
|
||||
}),
|
||||
Set1::One(DefLocation::Assignment(loc)) => {
|
||||
let bb = &mut basic_blocks[loc.block];
|
||||
// `loc` must point to a direct assignment to `local`.
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_hir::LangItem;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_infer::traits::Reveal;
|
||||
use rustc_middle::mir::coverage::CoverageKind;
|
||||
use rustc_middle::mir::visit::{NonUseContext, PlaceContext, Visitor};
|
||||
|
@ -14,7 +14,7 @@ use rustc_middle::ty::{
|
|||
Variance,
|
||||
};
|
||||
use rustc_middle::{bug, span_bug};
|
||||
use rustc_target::abi::{Size, FIRST_VARIANT};
|
||||
use rustc_target::abi::{FIRST_VARIANT, Size};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
|
||||
use crate::util::{is_within_packed, relate_types};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue