Skip to content

Commit 25a6dac

Browse files
Move codegen_select_candidate to a rustc_traits
1 parent b36035c commit 25a6dac

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

compiler/rustc_trait_selection/src/traits/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
55
pub mod auto_trait;
66
mod chalk_fulfill;
7-
pub mod codegen;
87
mod coherence;
98
pub mod const_evaluatable;
109
mod engine;
@@ -569,7 +568,6 @@ pub fn provide(providers: &mut ty::query::Providers) {
569568
*providers = ty::query::Providers {
570569
specialization_graph_of: specialize::specialization_graph_provider,
571570
specializes: specialize::specializes,
572-
codegen_select_candidate: codegen::codegen_select_candidate,
573571
subst_and_check_impossible_predicates,
574572
is_impossible_method,
575573
..*providers

compiler/rustc_trait_selection/src/traits/codegen.rs renamed to compiler/rustc_traits/src/codegen.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
// seems likely that they should eventually be merged into more
44
// general routines.
55

6-
use crate::infer::{DefiningAnchor, TyCtxtInferExt};
7-
use crate::traits::error_reporting::TypeErrCtxtExt;
8-
use crate::traits::{
9-
ImplSource, Obligation, ObligationCause, SelectionContext, TraitEngine, TraitEngineExt,
10-
Unimplemented,
11-
};
6+
use rustc_infer::infer::{DefiningAnchor, TyCtxtInferExt};
127
use rustc_infer::traits::FulfillmentErrorCode;
138
use rustc_middle::traits::CodegenObligationError;
149
use rustc_middle::ty::{self, TyCtxt};
10+
use rustc_trait_selection::traits::error_reporting::TypeErrCtxtExt;
11+
use rustc_trait_selection::traits::{
12+
ImplSource, Obligation, ObligationCause, SelectionContext, TraitEngine, TraitEngineExt,
13+
Unimplemented,
14+
};
1515

1616
/// Attempts to resolve an obligation to an `ImplSource`. The result is
1717
/// a shallow `ImplSource` resolution, meaning that we do not

compiler/rustc_traits/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ mod implied_outlives_bounds;
1818
mod normalize_erasing_regions;
1919
mod normalize_projection_ty;
2020
mod type_op;
21+
mod codegen;
2122

2223
pub use type_op::{type_op_ascribe_user_type_with_span, type_op_prove_predicate_with_cause};
2324

@@ -31,4 +32,5 @@ pub fn provide(p: &mut Providers) {
3132
normalize_projection_ty::provide(p);
3233
normalize_erasing_regions::provide(p);
3334
type_op::provide(p);
35+
p.codegen_select_candidate = codegen::codegen_select_candidate;
3436
}

0 commit comments

Comments
 (0)