Skip to content

Commit 58100c0

Browse files
committed
Auto merge of #104905 - compiler-errors:normalization-changes, r=spastorino
Some initial normalization method changes 1. Rename `AtExt::normalize` to `QueryNormalizeExt::query_normalize` (using the `QueryNormalizer`) 2. Introduce `NormalizeExt::normalize` to replace `partially_normalize_associated_types_in` (using the `AssocTypeNormalizer`) 3. Rename `FnCtxt::normalize_associated_types_in` to `FnCtxt::normalize` 4. Remove some unused other normalization fns in `Inherited` and `FnCtxt` Also includes one drive-by where we're no longer creating a `FnCtxt` inside of `check_fn`, but passing it in. This means we don't need such weird `FnCtxt` construction logic. Stacked on top of #104835 for convenience. r? types
2 parents 0eaa0d3 + a61e2a9 commit 58100c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_utils/src/ty.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use rustc_span::symbol::Ident;
2222
use rustc_span::{sym, Span, Symbol, DUMMY_SP};
2323
use rustc_target::abi::{Size, VariantIdx};
2424
use rustc_trait_selection::infer::InferCtxtExt;
25-
use rustc_trait_selection::traits::query::normalize::AtExt;
25+
use rustc_trait_selection::traits::query::normalize::QueryNormalizeExt;
2626
use std::iter;
2727

2828
use crate::{match_def_path, path_res, paths};
@@ -283,7 +283,7 @@ fn is_normalizable_helper<'tcx>(
283283
cache.insert(ty, false);
284284
let infcx = cx.tcx.infer_ctxt().build();
285285
let cause = rustc_middle::traits::ObligationCause::dummy();
286-
let result = if infcx.at(&cause, param_env).normalize(ty).is_ok() {
286+
let result = if infcx.at(&cause, param_env).query_normalize(ty).is_ok() {
287287
match ty.kind() {
288288
ty::Adt(def, substs) => def.variants().iter().all(|variant| {
289289
variant

0 commit comments

Comments
 (0)