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
|
@ -176,13 +176,13 @@
|
|||
//! we assume they never cover each other. In order to respect the invariants of
|
||||
//! [`SplitConstructorSet`], we give each `Opaque` constructor a unique id so we can recognize it.
|
||||
|
||||
use std::cmp::{self, max, min, Ordering};
|
||||
use std::cmp::{self, Ordering, max, min};
|
||||
use std::fmt;
|
||||
use std::iter::once;
|
||||
|
||||
use rustc_apfloat::ieee::{DoubleS, HalfS, IeeeFloat, QuadS, SingleS};
|
||||
use rustc_index::bit_set::{BitSet, GrowableBitSet};
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_index::bit_set::{BitSet, GrowableBitSet};
|
||||
use smallvec::SmallVec;
|
||||
|
||||
use self::Constructor::*;
|
||||
|
|
|
@ -2,11 +2,11 @@ use rustc_session::lint::builtin::NON_EXHAUSTIVE_OMITTED_PATTERNS;
|
|||
use rustc_span::ErrorGuaranteed;
|
||||
use tracing::instrument;
|
||||
|
||||
use crate::MatchArm;
|
||||
use crate::constructor::Constructor;
|
||||
use crate::errors::{NonExhaustiveOmittedPattern, NonExhaustiveOmittedPatternLintOnArm, Uncovered};
|
||||
use crate::pat_column::PatternColumn;
|
||||
use crate::rustc::{RevealedTy, RustcPatCtxt, WitnessPat};
|
||||
use crate::MatchArm;
|
||||
|
||||
/// Traverse the patterns to collect any variants of a non_exhaustive enum that fail to be mentioned
|
||||
/// in a given column.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
use std::fmt;
|
||||
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
use smallvec::{SmallVec, smallvec};
|
||||
|
||||
use self::Constructor::*;
|
||||
use crate::constructor::{Constructor, Slice, SliceKind};
|
||||
|
|
|
@ -2,8 +2,8 @@ use std::fmt;
|
|||
use std::iter::once;
|
||||
|
||||
use rustc_arena::DroplessArena;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::HirId;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_index::{Idx, IndexVec};
|
||||
use rustc_middle::middle::stability::EvalResult;
|
||||
use rustc_middle::mir::{self, Const};
|
||||
|
@ -14,8 +14,8 @@ use rustc_middle::ty::{
|
|||
};
|
||||
use rustc_middle::{bug, span_bug};
|
||||
use rustc_session::lint;
|
||||
use rustc_span::{ErrorGuaranteed, Span, DUMMY_SP};
|
||||
use rustc_target::abi::{FieldIdx, Integer, VariantIdx, FIRST_VARIANT};
|
||||
use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span};
|
||||
use rustc_target::abi::{FIRST_VARIANT, FieldIdx, Integer, VariantIdx};
|
||||
|
||||
use crate::constructor::Constructor::*;
|
||||
use crate::constructor::{
|
||||
|
@ -24,8 +24,8 @@ use crate::constructor::{
|
|||
use crate::lints::lint_nonexhaustive_missing_variants;
|
||||
use crate::pat_column::PatternColumn;
|
||||
use crate::rustc::print::EnumInfo;
|
||||
use crate::usefulness::{compute_match_usefulness, PlaceValidity};
|
||||
use crate::{errors, Captures, PatCx, PrivateUninhabitedField};
|
||||
use crate::usefulness::{PlaceValidity, compute_match_usefulness};
|
||||
use crate::{Captures, PatCx, PrivateUninhabitedField, errors};
|
||||
|
||||
mod print;
|
||||
|
||||
|
|
|
@ -713,7 +713,7 @@ use std::fmt;
|
|||
use rustc_data_structures::stack::ensure_sufficient_stack;
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
use smallvec::{SmallVec, smallvec};
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
use self::PlaceValidity::*;
|
||||
|
|
|
@ -6,9 +6,9 @@ use rustc_pattern_analysis::{Captures, MatchArm, PatCx, PrivateUninhabitedField}
|
|||
|
||||
/// Sets up `tracing` for easier debugging. Tries to look like the `rustc` setup.
|
||||
pub fn init_tracing() {
|
||||
use tracing_subscriber::Layer;
|
||||
use tracing_subscriber::layer::SubscriberExt;
|
||||
use tracing_subscriber::util::SubscriberInitExt;
|
||||
use tracing_subscriber::Layer;
|
||||
let _ = tracing_tree::HierarchicalLayer::default()
|
||||
.with_writer(std::io::stderr)
|
||||
.with_ansi(true)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
//! Test the pattern complexity limit.
|
||||
|
||||
use common::*;
|
||||
use rustc_pattern_analysis::MatchArm;
|
||||
use rustc_pattern_analysis::pat::DeconstructedPat;
|
||||
use rustc_pattern_analysis::usefulness::PlaceValidity;
|
||||
use rustc_pattern_analysis::MatchArm;
|
||||
|
||||
#[macro_use]
|
||||
mod common;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
//! Test exhaustiveness checking.
|
||||
|
||||
use common::*;
|
||||
use rustc_pattern_analysis::MatchArm;
|
||||
use rustc_pattern_analysis::pat::{DeconstructedPat, WitnessPat};
|
||||
use rustc_pattern_analysis::usefulness::PlaceValidity;
|
||||
use rustc_pattern_analysis::MatchArm;
|
||||
|
||||
#[macro_use]
|
||||
mod common;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
//! Test the computation of arm intersections.
|
||||
|
||||
use common::*;
|
||||
use rustc_pattern_analysis::MatchArm;
|
||||
use rustc_pattern_analysis::pat::DeconstructedPat;
|
||||
use rustc_pattern_analysis::usefulness::PlaceValidity;
|
||||
use rustc_pattern_analysis::MatchArm;
|
||||
|
||||
#[macro_use]
|
||||
mod common;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue