Move codegen_select_candidate to a rustc_traits

This commit is contained in:
Michael Goulet 2022-12-08 05:16:39 +00:00
parent b36035c20f
commit 25a6daccab
3 changed files with 8 additions and 8 deletions

View File

@ -4,7 +4,6 @@
pub mod auto_trait;
mod chalk_fulfill;
pub mod codegen;
mod coherence;
pub mod const_evaluatable;
mod engine;
@ -569,7 +568,6 @@ pub fn provide(providers: &mut ty::query::Providers) {
*providers = ty::query::Providers {
specialization_graph_of: specialize::specialization_graph_provider,
specializes: specialize::specializes,
codegen_select_candidate: codegen::codegen_select_candidate,
subst_and_check_impossible_predicates,
is_impossible_method,
..*providers

View File

@ -3,15 +3,15 @@
// seems likely that they should eventually be merged into more
// general routines.
use crate::infer::{DefiningAnchor, TyCtxtInferExt};
use crate::traits::error_reporting::TypeErrCtxtExt;
use crate::traits::{
ImplSource, Obligation, ObligationCause, SelectionContext, TraitEngine, TraitEngineExt,
Unimplemented,
};
use rustc_infer::infer::{DefiningAnchor, TyCtxtInferExt};
use rustc_infer::traits::FulfillmentErrorCode;
use rustc_middle::traits::CodegenObligationError;
use rustc_middle::ty::{self, TyCtxt};
use rustc_trait_selection::traits::error_reporting::TypeErrCtxtExt;
use rustc_trait_selection::traits::{
ImplSource, Obligation, ObligationCause, SelectionContext, TraitEngine, TraitEngineExt,
Unimplemented,
};
/// Attempts to resolve an obligation to an `ImplSource`. The result is
/// a shallow `ImplSource` resolution, meaning that we do not

View File

@ -18,6 +18,7 @@ mod implied_outlives_bounds;
mod normalize_erasing_regions;
mod normalize_projection_ty;
mod type_op;
mod codegen;
pub use type_op::{type_op_ascribe_user_type_with_span, type_op_prove_predicate_with_cause};
@ -31,4 +32,5 @@ pub fn provide(p: &mut Providers) {
normalize_projection_ty::provide(p);
normalize_erasing_regions::provide(p);
type_op::provide(p);
p.codegen_select_candidate = codegen::codegen_select_candidate;
}