Skip to content

Commit f7472aa

Browse files
committed
cleanup imports
1 parent f5438d6 commit f7472aa

File tree

5 files changed

+20
-21
lines changed

5 files changed

+20
-21
lines changed

compiler/rustc_middle/src/traits/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -991,9 +991,3 @@ pub enum DefiningAnchor {
991991
/// Used to catch type mismatch errors when handling opaque types.
992992
Error,
993993
}
994-
995-
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, HashStable)]
996-
pub enum IsNormalizesToHack {
997-
Yes,
998-
No,
999-
}

compiler/rustc_middle/src/traits/solve.rs

+6
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,9 @@ impl<'tcx> TypeVisitable<TyCtxt<'tcx>> for PredefinedOpaques<'tcx> {
228228
self.opaque_types.visit_with(visitor)
229229
}
230230
}
231+
232+
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, HashStable)]
233+
pub enum IsNormalizesToHack {
234+
Yes,
235+
No,
236+
}

compiler/rustc_middle/src/traits/solve/inspect.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
use super::{CanonicalInput, Certainty, Goal, NoSolution, QueryInput, QueryResult};
2-
use crate::{traits::IsNormalizesToHack, ty};
1+
use super::{
2+
CanonicalInput, Certainty, Goal, IsNormalizesToHack, NoSolution, QueryInput, QueryResult,
3+
};
4+
use crate::ty;
35
use format::ProofTreeFormatter;
46
use std::fmt::{Debug, Write};
57

@@ -22,6 +24,7 @@ pub struct GoalEvaluation<'tcx> {
2224

2325
pub result: QueryResult<'tcx>,
2426
}
27+
2528
#[derive(Eq, PartialEq, Hash, HashStable)]
2629
pub enum GoalEvaluationKind<'tcx> {
2730
CacheHit(CacheHit),
@@ -65,6 +68,7 @@ pub struct GoalCandidate<'tcx> {
6568
pub candidates: Vec<GoalCandidate<'tcx>>,
6669
pub kind: CandidateKind<'tcx>,
6770
}
71+
6872
#[derive(Eq, PartialEq, Debug, Hash, HashStable)]
6973
pub enum CandidateKind<'tcx> {
7074
/// Probe entered when normalizing the self ty during candidate assembly

compiler/rustc_trait_selection/src/solve/eval_ctxt.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ use rustc_infer::traits::ObligationCause;
1111
use rustc_middle::infer::unify_key::{ConstVariableOrigin, ConstVariableOriginKind};
1212
use rustc_middle::traits::solve::inspect::{self, CandidateKind};
1313
use rustc_middle::traits::solve::{
14-
CanonicalInput, CanonicalResponse, Certainty, MaybeCause, PredefinedOpaques,
15-
PredefinedOpaquesData, QueryResult,
14+
CanonicalInput, CanonicalResponse, Certainty, IsNormalizesToHack, MaybeCause,
15+
PredefinedOpaques, PredefinedOpaquesData, QueryResult,
1616
};
17-
use rustc_middle::traits::{DefiningAnchor, IsNormalizesToHack};
17+
use rustc_middle::traits::DefiningAnchor;
1818
use rustc_middle::ty::{
1919
self, OpaqueTypeKey, Ty, TyCtxt, TypeFoldable, TypeSuperVisitable, TypeVisitable,
2020
TypeVisitableExt, TypeVisitor,

compiler/rustc_trait_selection/src/solve/inspect.rs

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
use rustc_middle::{
2-
traits::{
3-
query::NoSolution,
4-
solve::{
5-
inspect::{self, CacheHit, CandidateKind},
6-
CanonicalInput, Certainty, Goal, QueryInput, QueryResult,
7-
},
8-
IsNormalizesToHack,
9-
},
10-
ty,
1+
use rustc_middle::traits::query::NoSolution;
2+
use rustc_middle::traits::solve::inspect::{self, CacheHit, CandidateKind};
3+
use rustc_middle::traits::solve::{
4+
CanonicalInput, Certainty, Goal, IsNormalizesToHack, QueryInput, QueryResult,
115
};
6+
use rustc_middle::ty;
127

138
pub mod dump;
149

0 commit comments

Comments
 (0)