diff options
| author | bors <bors@rust-lang.org> | 2022-11-30 11:13:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-30 11:13:09 +0000 |
| commit | 58100c014a815f7bc30d58f27e4283166146fbbb (patch) | |
| tree | 032702e2011d954e421ce7c09f72658a4a0f4c17 | |
| parent | 0eaa0d33263ba1f971fac6c8350708d33b1b1e86 (diff) | |
| parent | a61e2a91f5071719f3ac4696ee3061c171a47798 (diff) | |
| download | rust-58100c014a815f7bc30d58f27e4283166146fbbb.tar.gz rust-58100c014a815f7bc30d58f27e4283166146fbbb.zip | |
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
| -rw-r--r-- | clippy_utils/src/ty.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_utils/src/ty.rs b/clippy_utils/src/ty.rs index f4459e3e663..2ceda3511fe 100644 --- a/clippy_utils/src/ty.rs +++ b/clippy_utils/src/ty.rs @@ -22,7 +22,7 @@ use rustc_span::symbol::Ident; use rustc_span::{sym, Span, Symbol, DUMMY_SP}; use rustc_target::abi::{Size, VariantIdx}; use rustc_trait_selection::infer::InferCtxtExt; -use rustc_trait_selection::traits::query::normalize::AtExt; +use rustc_trait_selection::traits::query::normalize::QueryNormalizeExt; use std::iter; use crate::{match_def_path, path_res, paths}; @@ -283,7 +283,7 @@ fn is_normalizable_helper<'tcx>( cache.insert(ty, false); let infcx = cx.tcx.infer_ctxt().build(); let cause = rustc_middle::traits::ObligationCause::dummy(); - let result = if infcx.at(&cause, param_env).normalize(ty).is_ok() { + let result = if infcx.at(&cause, param_env).query_normalize(ty).is_ok() { match ty.kind() { ty::Adt(def, substs) => def.variants().iter().all(|variant| { variant |
