Temporarily re-export assert_matches! to reduce stabilization churn
This commit is contained in:
parent
3d087e6044
commit
7ec34defe9
58 changed files with 64 additions and 79 deletions
|
|
@ -1,6 +1,7 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
use std::str::FromStr;
|
||||
|
||||
use rustc_data_structures::assert_matches;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@
|
|||
#![allow(rustc::diagnostic_outside_of_impl)]
|
||||
#![allow(rustc::untranslatable_diagnostic)]
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_errors::{Applicability, Diag, EmissionGuarantee};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::intravisit::Visitor;
|
||||
|
|
|
|||
|
|
@ -7,9 +7,8 @@
|
|||
//! `RETURN_PLACE` the MIR arguments) are always fully normalized (and
|
||||
//! contain revealed `impl Trait` values).
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
|
||||
use itertools::Itertools;
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_hir as hir;
|
||||
use rustc_infer::infer::{BoundRegionConversionTime, RegionVariableOrigin};
|
||||
use rustc_middle::mir::*;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
//! The expansion from a test function to the appropriate test struct for libtest
|
||||
//! Ideally, this code would be in libtest but for efficiency and error messages it lives here.
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::iter;
|
||||
|
||||
use rustc_ast::{self as ast, GenericParamKind, HasNodeId, attr, join_path_idents};
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_attr_parsing::AttributeParser;
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_errors::{Applicability, Diag, Level};
|
||||
use rustc_expand::base::*;
|
||||
use rustc_hir::Attribute;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
|
||||
use rustc_abi::{BackendRepr, Float, Integer, Primitive, Scalar};
|
||||
use rustc_ast::{InlineAsmOptions, InlineAsmTemplatePiece};
|
||||
use rustc_codegen_ssa::mir::operand::OperandValue;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_middle::ty::Instance;
|
||||
use rustc_middle::ty::layout::TyAndLayout;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
use std::sync::Arc;
|
||||
|
||||
use itertools::Itertools;
|
||||
use rustc_abi::Align;
|
||||
use rustc_codegen_ssa::traits::{BaseTypeCodegenMethods, ConstCodegenMethods};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_data_structures::fx::FxIndexMap;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
use std::cmp::Ordering;
|
||||
use std::ffi::c_uint;
|
||||
use std::ptr;
|
||||
|
|
@ -13,6 +12,7 @@ use rustc_codegen_ssa::errors::{ExpectedPointerMutability, InvalidMonomorphizati
|
|||
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
|
||||
use rustc_codegen_ssa::mir::place::{PlaceRef, PlaceValue};
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_hir::def_id::LOCAL_CRATE;
|
||||
use rustc_hir::{self as hir};
|
||||
use rustc_middle::mir::BinOp;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
use std::marker::PhantomData;
|
||||
use std::panic::AssertUnwindSafe;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
|
@ -8,6 +7,7 @@ use std::{fs, io, mem, str, thread};
|
|||
|
||||
use rustc_abi::Size;
|
||||
use rustc_ast::attr;
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_data_structures::fx::FxIndexMap;
|
||||
use rustc_data_structures::jobserver::{self, Acquired};
|
||||
use rustc_data_structures::memmap::Mmap;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
use std::ops::Deref;
|
||||
|
||||
use rustc_abi::{Align, Scalar, Size, WrappingRange};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs;
|
||||
use rustc_middle::mir;
|
||||
use rustc_middle::ty::layout::{FnAbiOf, LayoutOf, TyAndLayout};
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
//! The `Visitor` responsible for actually checking a `mir::Body` for invalid operations.
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::borrow::Cow;
|
||||
use std::mem;
|
||||
use std::num::NonZero;
|
||||
use std::ops::Deref;
|
||||
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_errors::{Diag, ErrorGuaranteed};
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
//! Manages calling a concrete function (with known MIR body) with argument passing,
|
||||
//! and returning the return value to the caller.
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::borrow::Cow;
|
||||
|
||||
use either::{Left, Right};
|
||||
use rustc_abi::{self as abi, ExternAbi, FieldIdx, Integer, VariantIdx};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::ty::layout::{IntegerExt, TyAndLayout};
|
||||
use rustc_middle::ty::{self, AdtDef, Instance, Ty, VariantDef};
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
|
||||
use rustc_abi::{FieldIdx, Integer};
|
||||
use rustc_apfloat::ieee::{Double, Half, Quad, Single};
|
||||
use rustc_apfloat::{Float, FloatConvert};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_middle::mir::CastKind;
|
||||
use rustc_middle::mir::interpret::{InterpResult, PointerArithmetic, Scalar};
|
||||
use rustc_middle::ty::adjustment::PointerCoercion;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
use std::assert_matches::debug_assert_matches;
|
||||
|
||||
use either::{Left, Right};
|
||||
use rustc_abi::{Align, HasDataLayout, Size, TargetDataLayout};
|
||||
use rustc_data_structures::debug_assert_matches;
|
||||
use rustc_errors::DiagCtxtHandle;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::limit::Limit;
|
||||
|
|
|
|||
|
|
@ -4,10 +4,9 @@
|
|||
|
||||
mod simd;
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
|
||||
use rustc_abi::{FIRST_VARIANT, FieldIdx, HasDataLayout, Size, VariantIdx};
|
||||
use rustc_apfloat::ieee::{Double, Half, Quad, Single};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_hir::def_id::CRATE_DEF_ID;
|
||||
use rustc_infer::infer::TyCtxtInferExt;
|
||||
use rustc_middle::mir::interpret::{CTFE_ALLOC_SALT, read_target_uint, write_target_uint};
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ use either::Either;
|
|||
use rustc_abi::{BackendRepr, Endian};
|
||||
use rustc_apfloat::ieee::{Double, Half, Quad, Single};
|
||||
use rustc_apfloat::{Float, Round};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_middle::mir::interpret::{InterpErrorKind, Pointer, UndefinedBehaviorInfo};
|
||||
use rustc_middle::ty::{FloatTy, ScalarInt, SimdAlign};
|
||||
use rustc_middle::{bug, err_ub_format, mir, span_bug, throw_unsup_format, ty};
|
||||
|
|
@ -10,7 +11,7 @@ use tracing::trace;
|
|||
|
||||
use super::{
|
||||
ImmTy, InterpCx, InterpResult, Machine, MinMax, MulAddType, OpTy, PlaceTy, Provenance, Scalar,
|
||||
Size, TyAndLayout, assert_matches, interp_ok, throw_ub_format,
|
||||
Size, TyAndLayout, interp_ok, throw_ub_format,
|
||||
};
|
||||
use crate::interpret::Writeable;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
//! integer. It is crucial that these operations call `check_align` *before*
|
||||
//! short-circuiting the empty case!
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::borrow::{Borrow, Cow};
|
||||
use std::cell::Cell;
|
||||
use std::collections::VecDeque;
|
||||
|
|
@ -14,6 +13,7 @@ use std::{fmt, ptr};
|
|||
|
||||
use rustc_abi::{Align, HasDataLayout, Size};
|
||||
use rustc_ast::Mutability;
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
|
||||
use rustc_middle::mir::display_allocation;
|
||||
use rustc_middle::ty::{self, Instance, Ty, TyCtxt};
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
//! Functions concerning immediate values and operands, and reading from operands.
|
||||
//! All high-level functions to read from memory work on operands as sources.
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
|
||||
use either::{Either, Left, Right};
|
||||
use rustc_abi as abi;
|
||||
use rustc_abi::{BackendRepr, HasDataLayout, Size};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_hir::def::Namespace;
|
||||
use rustc_middle::mir::interpret::ScalarSizeMismatch;
|
||||
use rustc_middle::ty::layout::{HasTyCtxt, HasTypingEnv, TyAndLayout};
|
||||
|
|
|
|||
|
|
@ -2,10 +2,9 @@
|
|||
//! into a place.
|
||||
//! All high-level functions to write to memory work on places as destinations.
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
|
||||
use either::{Either, Left, Right};
|
||||
use rustc_abi::{BackendRepr, HasDataLayout, Size};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_middle::ty::Ty;
|
||||
use rustc_middle::ty::layout::TyAndLayout;
|
||||
use rustc_middle::{bug, mir, span_bug};
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
//! Typical examples would include: minimum element in SCC, maximum element
|
||||
//! reachable from it, etc.
|
||||
|
||||
use std::assert_matches::debug_assert_matches;
|
||||
use std::fmt::Debug;
|
||||
use std::marker::PhantomData;
|
||||
use std::ops::Range;
|
||||
|
|
@ -16,6 +15,7 @@ use std::ops::Range;
|
|||
use rustc_index::{Idx, IndexSlice, IndexVec};
|
||||
use tracing::{debug, instrument, trace};
|
||||
|
||||
use crate::debug_assert_matches;
|
||||
use crate::fx::FxHashSet;
|
||||
use crate::graph::vec_graph::VecGraph;
|
||||
use crate::graph::{DirectedGraph, NumEdges, Successors};
|
||||
|
|
|
|||
|
|
@ -38,6 +38,11 @@
|
|||
#![feature(unwrap_infallible)]
|
||||
// tidy-alphabetical-end
|
||||
|
||||
// Temporarily re-export `assert_matches!`, so that the rest of the compiler doesn't
|
||||
// have to worry about it being moved to a different module in std during stabilization.
|
||||
// FIXME(#151359): Remove this when `feature(assert_matches)` is stable in stage0.
|
||||
// (This doesn't necessarily need to be fixed during the beta bump itself.)
|
||||
pub use std::assert_matches::{assert_matches, debug_assert_matches};
|
||||
use std::fmt;
|
||||
|
||||
pub use atomic_ref::AtomicRef;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
extern crate self as rustc_errors;
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::backtrace::{Backtrace, BacktraceStatus};
|
||||
use std::borrow::Cow;
|
||||
use std::cell::Cell;
|
||||
|
|
@ -55,10 +54,10 @@ pub use diagnostic_impls::{
|
|||
};
|
||||
pub use emitter::ColorConfig;
|
||||
use emitter::{ConfusionType, DynEmitter, Emitter, detect_confusion_type, is_different};
|
||||
use rustc_data_structures::AtomicRef;
|
||||
use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};
|
||||
use rustc_data_structures::stable_hasher::StableHasher;
|
||||
use rustc_data_structures::sync::{DynSend, Lock};
|
||||
use rustc_data_structures::{AtomicRef, assert_matches};
|
||||
pub use rustc_error_messages::{
|
||||
DiagArg, DiagArgFromDisplay, DiagArgName, DiagArgValue, DiagMessage, FluentBundle, IntoDiagArg,
|
||||
LanguageIdentifier, LazyFallbackBundle, MultiSpan, SpanLabel, SubdiagMessage,
|
||||
|
|
|
|||
|
|
@ -14,13 +14,13 @@
|
|||
//! At present, however, we do run collection across all items in the
|
||||
//! crate as a kind of pass. This should eventually be factored away.
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::cell::Cell;
|
||||
use std::iter;
|
||||
use std::ops::Bound;
|
||||
|
||||
use rustc_abi::{ExternAbi, Size};
|
||||
use rustc_ast::Recovered;
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
|
||||
use rustc_errors::{
|
||||
Applicability, Diag, DiagCtxtHandle, E0228, ErrorGuaranteed, StashKey, struct_span_code_err,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
use std::ops::ControlFlow;
|
||||
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::LocalDefId;
|
||||
use rustc_hir::intravisit::{self, Visitor, VisitorExt};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
|
||||
use hir::Node;
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_data_structures::fx::FxIndexSet;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::attrs::AttributeKind;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
//!
|
||||
//! For more information about delegation design, see the tracking issue #118212.
|
||||
|
||||
use std::assert_matches::debug_assert_matches;
|
||||
|
||||
use rustc_data_structures::debug_assert_matches;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ mod dyn_trait;
|
|||
pub mod errors;
|
||||
pub mod generics;
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::slice;
|
||||
|
||||
use rustc_ast::LitKind;
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};
|
||||
use rustc_errors::codes::*;
|
||||
use rustc_errors::{
|
||||
|
|
|
|||
|
|
@ -8,9 +8,8 @@
|
|||
//! specialization errors. These things can (and probably should) be
|
||||
//! fixed, but for the moment it's easier to do these checks early.
|
||||
|
||||
use std::assert_matches::debug_assert_matches;
|
||||
|
||||
use min_specialization::check_min_specialization;
|
||||
use rustc_data_structures::debug_assert_matches;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_errors::Applicability;
|
||||
use rustc_errors::codes::*;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use std::assert_matches::debug_assert_matches;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::cmp::max;
|
||||
use std::ops::Deref;
|
||||
|
||||
use rustc_data_structures::debug_assert_matches;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_data_structures::sso::SsoHashSet;
|
||||
use rustc_errors::Applicability;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_middle::ty::outlives::{Component, compute_alias_components_recursive};
|
||||
use rustc_middle::ty::{self, OutlivesPredicate, Ty, TyCtxt};
|
||||
use smallvec::smallvec;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use rustc_data_structures::undo_log::{Rollback, UndoLogs};
|
||||
use rustc_data_structures::{snapshot_vec as sv, unify as ut};
|
||||
use rustc_data_structures::{assert_matches, snapshot_vec as sv, unify as ut};
|
||||
use rustc_middle::ty::{self, OpaqueTypeKey, ProvisionalHiddenType};
|
||||
use tracing::debug;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use std::assert_matches::debug_assert_matches;
|
||||
use std::cell::LazyCell;
|
||||
|
||||
use rustc_data_structures::debug_assert_matches;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxIndexMap, FxIndexSet};
|
||||
use rustc_data_structures::unord::UnordSet;
|
||||
use rustc_errors::{LintDiagnostic, Subdiagnostic};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_macros::{HashStable, TyDecodable, TyEncodable, TypeFoldable, TypeVisitable};
|
||||
|
||||
use super::Const;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
pub mod tls;
|
||||
|
||||
use std::assert_matches::debug_assert_matches;
|
||||
use std::borrow::{Borrow, Cow};
|
||||
use std::cmp::Ordering;
|
||||
use std::env::VarError;
|
||||
|
|
@ -17,7 +16,6 @@ use std::{fmt, iter, mem};
|
|||
|
||||
use rustc_abi::{ExternAbi, FieldIdx, Layout, LayoutData, TargetDataLayout, VariantIdx};
|
||||
use rustc_ast as ast;
|
||||
use rustc_data_structures::defer;
|
||||
use rustc_data_structures::fingerprint::Fingerprint;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::intern::Interned;
|
||||
|
|
@ -29,6 +27,7 @@ use rustc_data_structures::steal::Steal;
|
|||
use rustc_data_structures::sync::{
|
||||
self, DynSend, DynSync, FreezeReadGuard, Lock, RwLock, WorkerLocal,
|
||||
};
|
||||
use rustc_data_structures::{debug_assert_matches, defer};
|
||||
use rustc_errors::{
|
||||
Applicability, Diag, DiagCtxtHandle, ErrorGuaranteed, LintDiagnostic, MultiSpan,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
use std::fmt;
|
||||
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_errors::ErrorGuaranteed;
|
||||
use rustc_hir as hir;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
#![allow(rustc::usage_of_ty_tykind)]
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::fmt::Debug;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::marker::PhantomData;
|
||||
|
|
@ -31,6 +30,7 @@ use rustc_ast::AttrVec;
|
|||
use rustc_ast::expand::typetree::{FncTree, Kind, Type, TypeTree};
|
||||
use rustc_ast::node_id::NodeMap;
|
||||
pub use rustc_ast_ir::{Movability, Mutability, try_visit};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};
|
||||
use rustc_data_structures::intern::Interned;
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
#![allow(rustc::usage_of_ty_tykind)]
|
||||
|
||||
use std::assert_matches::debug_assert_matches;
|
||||
use std::borrow::Cow;
|
||||
use std::ops::{ControlFlow, Range};
|
||||
|
||||
use hir::def::{CtorKind, DefKind};
|
||||
use rustc_abi::{FIRST_VARIANT, FieldIdx, ScalableElt, VariantIdx};
|
||||
use rustc_data_structures::debug_assert_matches;
|
||||
use rustc_errors::{ErrorGuaranteed, MultiSpan};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::LangItem;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
use std::collections::hash_map::Entry;
|
||||
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_middle::mir::coverage::{BlockMarkerId, BranchSpan, CoverageInfoHi, CoverageKind};
|
||||
use rustc_middle::mir::{self, BasicBlock, SourceInfo, UnOp};
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
//! See docs in build/expr/mod.rs
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::iter;
|
||||
|
||||
use rustc_abi::{FIRST_VARIANT, FieldIdx, VariantIdx};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_hir::def_id::LocalDefId;
|
||||
use rustc_middle::hir::place::{Projection as HirProjection, ProjectionKind as HirProjectionKind};
|
||||
use rustc_middle::mir::AssertKind::BoundsCheck;
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@
|
|||
//! This also includes code for pattern bindings in `let` statements and
|
||||
//! function parameters.
|
||||
|
||||
use std::assert_matches::debug_assert_matches;
|
||||
use std::borrow::Borrow;
|
||||
use std::mem;
|
||||
use std::sync::Arc;
|
||||
|
||||
use itertools::{Itertools, Position};
|
||||
use rustc_abi::{FIRST_VARIANT, VariantIdx};
|
||||
use rustc_data_structures::debug_assert_matches;
|
||||
use rustc_data_structures::fx::FxIndexMap;
|
||||
use rustc_data_structures::stack::ensure_sufficient_stack;
|
||||
use rustc_hir::{BindingMode, ByRef, LangItem, LetStmt, LocalSource, Node};
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
//! This avoids having to repeatedly clone a partly-built [`UserTypeProjections`]
|
||||
//! at every step of the traversal, which is what the previous code was doing.
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::iter;
|
||||
|
||||
use rustc_abi::{FieldIdx, VariantIdx};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_data_structures::smallvec::SmallVec;
|
||||
use rustc_middle::mir::{ProjectionElem, UserTypeProjection, UserTypeProjections};
|
||||
use rustc_middle::ty::{AdtDef, UserTypeAnnotationIndex};
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@ mod check_match;
|
|||
mod const_to_pat;
|
||||
mod migration;
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::cmp::Ordering;
|
||||
use std::sync::Arc;
|
||||
|
||||
use rustc_abi::{FieldIdx, Integer};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_errors::codes::*;
|
||||
use rustc_hir::def::{CtorOf, DefKind, Res};
|
||||
use rustc_hir::pat_util::EnumerateAndAdjustIterator;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_middle::bug;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
|
||||
use rustc_abi::VariantIdx;
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_index::Idx;
|
||||
use rustc_index::bit_set::{DenseBitSet, MixedBitSet};
|
||||
use rustc_middle::bug;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use std::assert_matches::debug_assert_matches;
|
||||
use std::fmt::{Debug, Formatter};
|
||||
use std::ops::Range;
|
||||
|
||||
use rustc_abi::{FieldIdx, VariantIdx};
|
||||
use rustc_data_structures::debug_assert_matches;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxIndexSet, StdEntry};
|
||||
use rustc_data_structures::stack::ensure_sufficient_stack;
|
||||
use rustc_index::IndexVec;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
//!
|
||||
//! Currently, this pass only propagates scalar values.
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::cell::RefCell;
|
||||
use std::fmt::Formatter;
|
||||
|
||||
|
|
@ -11,6 +10,7 @@ use rustc_const_eval::const_eval::{DummyMachine, throw_machine_stop_str};
|
|||
use rustc_const_eval::interpret::{
|
||||
ImmTy, Immediate, InterpCx, OpTy, PlaceTy, Projectable, interp_ok,
|
||||
};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_middle::bug;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
//! Inlining pass for MIR functions.
|
||||
|
||||
use std::assert_matches::debug_assert_matches;
|
||||
use std::iter;
|
||||
use std::ops::{Range, RangeFrom};
|
||||
|
||||
use rustc_abi::{ExternAbi, FieldIdx};
|
||||
use rustc_data_structures::debug_assert_matches;
|
||||
use rustc_hir::attrs::{InlineAttr, OptimizeAttr};
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@
|
|||
//! otherwise silence errors, if move analysis runs after promotion on broken
|
||||
//! MIR.
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::cell::Cell;
|
||||
use std::{cmp, iter, mem};
|
||||
|
||||
use either::{Left, Right};
|
||||
use rustc_const_eval::check_consts::{ConstCx, qualifs};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_hir as hir;
|
||||
use rustc_index::{IndexSlice, IndexVec};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
use std::{fmt, iter};
|
||||
|
||||
use rustc_abi::{ExternAbi, FIRST_VARIANT, FieldIdx, VariantIdx};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::lang_items::LangItem;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ mod ty;
|
|||
pub mod asm;
|
||||
pub mod cfg_select;
|
||||
|
||||
use std::assert_matches::debug_assert_matches;
|
||||
use std::{fmt, mem, slice};
|
||||
|
||||
use attr_wrapper::{AttrWrapper, UsePreAttrPos};
|
||||
|
|
@ -40,6 +39,7 @@ use rustc_ast::{
|
|||
Mutability, Recovered, Safety, StrLit, Visibility, VisibilityKind,
|
||||
};
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_data_structures::debug_assert_matches;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_errors::{Applicability, Diag, FatalError, MultiSpan, PResult};
|
||||
use rustc_index::interval::IntervalSet;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
#![allow(rustc::symbol_intern_string_literal)]
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::io::prelude::*;
|
||||
use std::iter::Peekable;
|
||||
use std::path::PathBuf;
|
||||
|
|
@ -11,6 +10,7 @@ use rustc_ast::token::{self, Delimiter, Token};
|
|||
use rustc_ast::tokenstream::{DelimSpacing, DelimSpan, Spacing, TokenStream, TokenTree};
|
||||
use rustc_ast::{self as ast, PatKind, visit};
|
||||
use rustc_ast_pretty::pprust::item_to_string;
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_errors::annotate_snippet_emitter_writer::AnnotateSnippetEmitter;
|
||||
use rustc_errors::emitter::{HumanEmitter, OutputTheme};
|
||||
use rustc_errors::translation::Translator;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
use std::fmt::Debug;
|
||||
use std::hash::Hash;
|
||||
use std::marker::PhantomData;
|
||||
|
|
@ -7,12 +6,12 @@ use std::sync::atomic::{AtomicU32, Ordering};
|
|||
|
||||
use rustc_data_structures::fingerprint::{Fingerprint, PackedFingerprint};
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_data_structures::outline;
|
||||
use rustc_data_structures::profiling::QueryInvocationId;
|
||||
use rustc_data_structures::sharded::{self, ShardedHashMap};
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_data_structures::sync::{AtomicU64, Lock};
|
||||
use rustc_data_structures::unord::UnordMap;
|
||||
use rustc_data_structures::{assert_matches, outline};
|
||||
use rustc_errors::DiagInner;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_macros::{Decodable, Encodable};
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
//! If you wonder why there's no `early.rs`, that's because it's split into three files -
|
||||
//! `build_reduced_graph.rs`, `macros.rs` and `imports.rs`.
|
||||
|
||||
use std::assert_matches::debug_assert_matches;
|
||||
use std::borrow::Cow;
|
||||
use std::collections::hash_map::Entry;
|
||||
use std::mem::{replace, swap, take};
|
||||
|
|
@ -16,6 +15,7 @@ use rustc_ast::visit::{
|
|||
AssocCtxt, BoundKind, FnCtxt, FnKind, Visitor, try_visit, visit_opt, walk_list,
|
||||
};
|
||||
use rustc_ast::*;
|
||||
use rustc_data_structures::debug_assert_matches;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap};
|
||||
use rustc_data_structures::unord::{UnordMap, UnordSet};
|
||||
use rustc_errors::codes::*;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
use std::assert_matches::debug_assert_matches;
|
||||
|
||||
use rustc_abi::IntegerType;
|
||||
use rustc_data_structures::debug_assert_matches;
|
||||
use rustc_data_structures::stable_hasher::StableHasher;
|
||||
use rustc_hashes::Hash128;
|
||||
use rustc_hir::def::DefKind;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
// ignore-tidy-filelength
|
||||
|
||||
use std::assert_matches::debug_assert_matches;
|
||||
use std::borrow::Cow;
|
||||
use std::iter;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use itertools::{EitherOrBoth, Itertools};
|
||||
use rustc_abi::ExternAbi;
|
||||
use rustc_data_structures::debug_assert_matches;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_data_structures::stack::ensure_sufficient_stack;
|
||||
use rustc_errors::codes::*;
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
//! coherence right now and was annoying to implement, so I am leaving it
|
||||
//! as is until we start using it for something else.
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_infer::infer::InferCtxt;
|
||||
use rustc_infer::traits::Obligation;
|
||||
use rustc_macros::extension;
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
//!
|
||||
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/traits/resolution.html#selection
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::cmp;
|
||||
use std::fmt::{self, Display};
|
||||
use std::ops::ControlFlow;
|
||||
|
||||
use hir::def::DefKind;
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
|
||||
use rustc_data_structures::stack::ensure_sufficient_stack;
|
||||
use rustc_errors::{Diag, EmissionGuarantee};
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
use std::iter;
|
||||
|
||||
use rustc_abi::Primitive::Pointer;
|
||||
use rustc_abi::{BackendRepr, ExternAbi, PointerKind, Scalar, Size};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::lang_items::LangItem;
|
||||
use rustc_middle::bug;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
|
||||
use rustc_abi::{BackendRepr, FieldsShape, Scalar, Size, TagEncoding, Variants};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::ty::layout::{HasTyCtxt, LayoutCx, TyAndLayout};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue