diff options
| author | bors <bors@rust-lang.org> | 2023-03-22 05:33:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-03-22 05:33:18 +0000 |
| commit | 9bdb4881c7e6061fa8acdbb3ddfcd2dd7e11cc89 (patch) | |
| tree | c59f7768d8b6601fa8f8cda2ccbed52cf652e3dd /compiler/rustc_ty_utils/src | |
| parent | 5fa73a75ce94faf1d1008ec96c043134ef0df427 (diff) | |
| parent | b8541eb76769798cc34908dc815cc17b6a7a91bc (diff) | |
| download | rust-9bdb4881c7e6061fa8acdbb3ddfcd2dd7e11cc89.tar.gz rust-9bdb4881c7e6061fa8acdbb3ddfcd2dd7e11cc89.zip | |
Auto merge of #109119 - lcnr:trait-system-cleanup, r=compiler-errors
a general type system cleanup removes the helper functions `traits::fully_solve_X` as they add more complexity then they are worth. It's confusing which of these helpers should be used in which context. changes the way we deal with overflow to always add depth in `evaluate_predicates_recursively`. It may make sense to actually fully transition to not have `recursion_depth` on obligations but that's probably a bit too much for this PR. also removes some other small - and imo unnecessary - helpers. r? types
Diffstat (limited to 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/common_traits.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_ty_utils/src/common_traits.rs b/compiler/rustc_ty_utils/src/common_traits.rs index d3169b6d962..3b1abdcb24f 100644 --- a/compiler/rustc_ty_utils/src/common_traits.rs +++ b/compiler/rustc_ty_utils/src/common_traits.rs @@ -3,7 +3,6 @@ use rustc_hir::lang_items::LangItem; use rustc_infer::infer::TyCtxtInferExt; use rustc_middle::ty::{self, Ty, TyCtxt}; -use rustc_span::DUMMY_SP; use rustc_trait_selection::traits; fn is_copy_raw<'tcx>(tcx: TyCtxt<'tcx>, query: ty::ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool { @@ -30,7 +29,7 @@ fn is_item_raw<'tcx>( let (param_env, ty) = query.into_parts(); let trait_def_id = tcx.require_lang_item(item, None); let infcx = tcx.infer_ctxt().build(); - traits::type_known_to_meet_bound_modulo_regions(&infcx, param_env, ty, trait_def_id, DUMMY_SP) + traits::type_known_to_meet_bound_modulo_regions(&infcx, param_env, ty, trait_def_id) } pub(crate) fn provide(providers: &mut ty::query::Providers) { |
