mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Remove the rustc_data_structures::assert_matches! re-exports
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
use std::assert_matches;
|
||||
use std::str::FromStr;
|
||||
|
||||
use rustc_data_structures::assert_matches;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
//! Print diagnostics to explain why values are borrowed.
|
||||
|
||||
use rustc_data_structures::assert_matches;
|
||||
use std::assert_matches;
|
||||
|
||||
use rustc_errors::{Applicability, Diag, EmissionGuarantee};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::intravisit::Visitor;
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
//! `RETURN_PLACE` the MIR arguments) are always fully normalized (and
|
||||
//! contain revealed `impl Trait` values).
|
||||
|
||||
use std::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,11 @@
|
||||
//! 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::iter;
|
||||
use std::{assert_matches, 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,8 +1,9 @@
|
||||
use std::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;
|
||||
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,6 +1,6 @@
|
||||
use std::cmp::Ordering;
|
||||
use std::ffi::c_uint;
|
||||
use std::ptr;
|
||||
use std::{assert_matches, ptr};
|
||||
|
||||
use rustc_abi::{
|
||||
Align, BackendRepr, ExternAbi, Float, HasDataLayout, Primitive, Size, WrappingRange,
|
||||
@@ -11,7 +11,6 @@
|
||||
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 as hir;
|
||||
use rustc_hir::def_id::LOCAL_CRATE;
|
||||
use rustc_hir::find_attr;
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::Arc;
|
||||
use std::sync::mpsc::{Receiver, Sender, channel};
|
||||
use std::{fs, io, mem, str, thread};
|
||||
use std::{assert_matches, fs, io, mem, str, thread};
|
||||
|
||||
use rustc_abi::Size;
|
||||
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;
|
||||
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,10 @@
|
||||
//! The `Visitor` responsible for actually checking a `mir::Body` for invalid operations.
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::mem;
|
||||
use std::num::NonZero;
|
||||
use std::ops::Deref;
|
||||
use std::{assert_matches, mem};
|
||||
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_errors::{Diag, ErrorGuaranteed};
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//! Manages calling a concrete function (with known MIR body) with argument passing,
|
||||
//! and returning the return value to the caller.
|
||||
|
||||
use std::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_errors::msg;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::find_attr;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
use std::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_errors::msg;
|
||||
use rustc_middle::mir::CastKind;
|
||||
use rustc_middle::mir::interpret::{InterpResult, PointerArithmetic, Scalar};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use std::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, format_diag_message, msg};
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::limit::Limit;
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
|
||||
mod simd;
|
||||
|
||||
use std::assert_matches;
|
||||
|
||||
use rustc_abi::{FieldIdx, HasDataLayout, Size, VariantIdx};
|
||||
use rustc_apfloat::ieee::{Double, Half, Quad, Single};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_errors::msg;
|
||||
use rustc_middle::mir::interpret::{CTFE_ALLOC_SALT, read_target_uint, write_target_uint};
|
||||
use rustc_middle::mir::{self, BinOp, ConstValue, NonDivergingIntrinsic};
|
||||
|
||||
@@ -9,11 +9,10 @@
|
||||
use std::borrow::{Borrow, Cow};
|
||||
use std::cell::Cell;
|
||||
use std::collections::VecDeque;
|
||||
use std::{fmt, ptr};
|
||||
use std::{assert_matches, 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_errors::msg;
|
||||
use rustc_middle::mir::display_allocation;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//! 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;
|
||||
|
||||
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,9 +2,10 @@
|
||||
//! into a place.
|
||||
//! All high-level functions to write to memory work on places as destinations.
|
||||
|
||||
use std::assert_matches;
|
||||
|
||||
use either::{Either, Left, Right};
|
||||
use rustc_abi::{BackendRepr, HasDataLayout, Size};
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_middle::ty::layout::TyAndLayout;
|
||||
use rustc_middle::ty::{self, Ty};
|
||||
use rustc_middle::{bug, mir, span_bug};
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
//! Typical examples would include: minimum element in SCC, maximum element
|
||||
//! reachable from it, etc.
|
||||
|
||||
use std::debug_assert_matches;
|
||||
use std::fmt::Debug;
|
||||
use std::marker::PhantomData;
|
||||
use std::ops::Range;
|
||||
@@ -15,7 +16,6 @@
|
||||
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};
|
||||
|
||||
@@ -34,16 +34,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.)
|
||||
use std::fmt;
|
||||
pub use std::{assert_matches, debug_assert_matches};
|
||||
|
||||
// This allows derive macros to reference this crate
|
||||
extern crate self as rustc_data_structures;
|
||||
|
||||
use std::fmt;
|
||||
|
||||
pub use atomic_ref::AtomicRef;
|
||||
pub use ena::{snapshot_vec, undo_log, unify};
|
||||
// Re-export `hashbrown::hash_table`, because it's part of our API
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
use std::num::NonZero;
|
||||
use std::ops::DerefMut;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::{fmt, panic};
|
||||
use std::{assert_matches, fmt, panic};
|
||||
|
||||
use Level::*;
|
||||
// Used by external projects such as `rust-gpu`.
|
||||
@@ -45,10 +45,10 @@
|
||||
};
|
||||
pub use emitter::ColorConfig;
|
||||
use emitter::{DynEmitter, Emitter};
|
||||
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, DiagArgMap, DiagArgName, DiagArgValue, DiagMessage, IntoDiagArg,
|
||||
LanguageIdentifier, MultiSpan, SpanLabel, fluent_bundle, into_diag_arg_using_display,
|
||||
|
||||
@@ -15,12 +15,11 @@
|
||||
//! crate as a kind of pass. This should eventually be factored away.
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::iter;
|
||||
use std::ops::{Bound, ControlFlow};
|
||||
use std::{assert_matches, iter};
|
||||
|
||||
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, Diagnostic, E0228, ErrorGuaranteed, Level, StashKey,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::assert_matches;
|
||||
use std::ops::ControlFlow;
|
||||
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_errors::{Diag, DiagCtxtHandle, Diagnostic, Level};
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::LocalDefId;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use std::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::def::DefKind;
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
//!
|
||||
//! For more information about delegation design, see the tracking issue #118212.
|
||||
|
||||
use rustc_data_structures::debug_assert_matches;
|
||||
use std::debug_assert_matches;
|
||||
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
|
||||
@@ -19,11 +19,10 @@
|
||||
pub mod errors;
|
||||
pub mod generics;
|
||||
|
||||
use std::slice;
|
||||
use std::{assert_matches, slice};
|
||||
|
||||
use rustc_abi::FIRST_VARIANT;
|
||||
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,8 +8,9 @@
|
||||
//! specialization errors. These things can (and probably should) be
|
||||
//! fixed, but for the moment it's easier to do these checks early.
|
||||
|
||||
use std::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::cell::{Cell, RefCell};
|
||||
use std::cmp::max;
|
||||
use std::debug_assert_matches;
|
||||
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, Diag, DiagCtxtHandle, Diagnostic, Level};
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
use std::cmp;
|
||||
use std::collections::hash_map::Entry::{Occupied, Vacant};
|
||||
use std::{assert_matches, cmp};
|
||||
|
||||
use rustc_abi::FieldIdx;
|
||||
use rustc_ast as ast;
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_errors::codes::*;
|
||||
use rustc_errors::{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use rustc_data_structures::assert_matches;
|
||||
use std::assert_matches;
|
||||
|
||||
use rustc_middle::ty::outlives::{Component, compute_alias_components_recursive};
|
||||
use rustc_middle::ty::{self, OutlivesPredicate, Ty, TyCtxt};
|
||||
use smallvec::smallvec;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
use std::assert_matches;
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use rustc_data_structures::undo_log::{Rollback, UndoLogs};
|
||||
use rustc_data_structures::{assert_matches, snapshot_vec as sv, unify as ut};
|
||||
use rustc_data_structures::{snapshot_vec as sv, unify as ut};
|
||||
use rustc_middle::ty::{self, OpaqueTypeKey, ProvisionalHiddenType};
|
||||
use tracing::debug;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::cell::LazyCell;
|
||||
use std::debug_assert_matches;
|
||||
|
||||
use rustc_data_structures::debug_assert_matches;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxIndexMap, FxIndexSet};
|
||||
use rustc_data_structures::unord::UnordSet;
|
||||
use rustc_errors::{Diagnostic, Subdiagnostic, msg};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use std::assert_matches;
|
||||
use std::fmt::Debug;
|
||||
use std::hash::Hash;
|
||||
use std::sync::Arc;
|
||||
@@ -5,12 +6,12 @@
|
||||
|
||||
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, is_dyn_thread_safe};
|
||||
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};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use rustc_data_structures::assert_matches;
|
||||
use std::assert_matches;
|
||||
|
||||
use rustc_macros::{HashStable, TyDecodable, TyEncodable, TypeFoldable, TypeVisitable};
|
||||
|
||||
use super::Const;
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
//! Implementation of [`rustc_type_ir::Interner`] for [`TyCtxt`].
|
||||
|
||||
use std::fmt;
|
||||
use std::{debug_assert_matches, fmt};
|
||||
|
||||
use rustc_abi::ExternAbi;
|
||||
use rustc_data_structures::debug_assert_matches;
|
||||
use rustc_errors::ErrorGuaranteed;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::{CtorKind, CtorOf, DefKind};
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use std::fmt;
|
||||
use std::{assert_matches, fmt};
|
||||
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_errors::ErrorGuaranteed;
|
||||
use rustc_hir as hir;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
use std::marker::PhantomData;
|
||||
use std::num::NonZero;
|
||||
use std::ptr::NonNull;
|
||||
use std::{fmt, iter, str};
|
||||
use std::{assert_matches, fmt, iter, str};
|
||||
|
||||
pub use adt::*;
|
||||
pub use assoc::*;
|
||||
@@ -31,7 +31,6 @@
|
||||
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};
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
#![allow(rustc::usage_of_ty_tykind)]
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::debug_assert_matches;
|
||||
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;
|
||||
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,8 @@
|
||||
//! See docs in build/expr/mod.rs
|
||||
|
||||
use std::iter;
|
||||
use std::{assert_matches, 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;
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
//! function parameters.
|
||||
|
||||
use std::borrow::Borrow;
|
||||
use std::mem;
|
||||
use std::sync::Arc;
|
||||
use std::{debug_assert_matches, mem};
|
||||
|
||||
use itertools::{Itertools, Position};
|
||||
use rustc_abi::{FIRST_VARIANT, FieldIdx, 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,9 @@
|
||||
//! 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::iter;
|
||||
use std::{assert_matches, 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,12 +4,12 @@
|
||||
mod const_to_pat;
|
||||
mod migration;
|
||||
|
||||
use std::assert_matches;
|
||||
use std::cmp::Ordering;
|
||||
use std::sync::Arc;
|
||||
|
||||
use rustc_abi::{FieldIdx, Integer};
|
||||
use rustc_ast::LitKind;
|
||||
use rustc_data_structures::assert_matches;
|
||||
use rustc_errors::codes::*;
|
||||
use rustc_hir::def::{CtorOf, DefKind, Res};
|
||||
use rustc_hir::pat_util::EnumerateAndAdjustIterator;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use rustc_data_structures::assert_matches;
|
||||
use std::assert_matches;
|
||||
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_middle::bug;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use std::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::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,6 +2,7 @@
|
||||
//!
|
||||
//! Currently, this pass only propagates scalar values.
|
||||
|
||||
use std::assert_matches;
|
||||
use std::cell::RefCell;
|
||||
use std::fmt::Formatter;
|
||||
|
||||
@@ -10,7 +11,6 @@
|
||||
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,9 @@
|
||||
//! Inlining pass for MIR functions.
|
||||
|
||||
use std::iter;
|
||||
use std::ops::{Range, RangeFrom};
|
||||
use std::{debug_assert_matches, iter};
|
||||
|
||||
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;
|
||||
|
||||
@@ -11,11 +11,10 @@
|
||||
//! MIR.
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::{cmp, iter, mem};
|
||||
use std::{assert_matches, 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_hir::def::DefKind;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use std::{fmt, iter};
|
||||
use std::{assert_matches, 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,7 @@
|
||||
pub mod asm;
|
||||
pub mod cfg_select;
|
||||
|
||||
use std::{fmt, mem, slice};
|
||||
use std::{debug_assert_matches, fmt, mem, slice};
|
||||
|
||||
use attr_wrapper::{AttrWrapper, UsePreAttrPos};
|
||||
pub use diagnostics::AttemptLocalParseRecovery;
|
||||
@@ -40,7 +40,6 @@
|
||||
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;
|
||||
|
||||
@@ -3,14 +3,13 @@
|
||||
use std::iter::Peekable;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::{io, str};
|
||||
use std::{assert_matches, io, str};
|
||||
|
||||
use ast::token::IdentIsRaw;
|
||||
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::OutputTheme;
|
||||
use rustc_errors::{AutoStream, DiagCtxt, MultiSpan, PResult};
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::collections::hash_map::Entry;
|
||||
use std::debug_assert_matches;
|
||||
use std::mem::{replace, swap, take};
|
||||
use std::ops::{ControlFlow, Range};
|
||||
|
||||
@@ -15,7 +16,6 @@
|
||||
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::either::Either;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap};
|
||||
use rustc_data_structures::unord::{UnordMap, UnordSet};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use std::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,11 @@
|
||||
// ignore-tidy-filelength
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::iter;
|
||||
use std::path::PathBuf;
|
||||
use std::{debug_assert_matches, iter};
|
||||
|
||||
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,7 +9,8 @@
|
||||
//! coherence right now and was annoying to implement, so I am leaving it
|
||||
//! as is until we start using it for something else.
|
||||
|
||||
use rustc_data_structures::assert_matches;
|
||||
use std::assert_matches;
|
||||
|
||||
use rustc_infer::infer::InferCtxt;
|
||||
use rustc_infer::traits::Obligation;
|
||||
use rustc_macros::extension;
|
||||
|
||||
@@ -3,12 +3,11 @@
|
||||
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/traits/resolution.html#selection
|
||||
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::cmp;
|
||||
use std::fmt::{self, Display};
|
||||
use std::ops::ControlFlow;
|
||||
use std::{assert_matches, cmp};
|
||||
|
||||
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,7 @@
|
||||
use std::iter;
|
||||
use std::{assert_matches, iter};
|
||||
|
||||
use rustc_abi::Primitive::Pointer;
|
||||
use rustc_abi::{Align, 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,5 +1,6 @@
|
||||
use std::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};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user