-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use infcx.partially_normalize_associated_types_in #104835
Use infcx.partially_normalize_associated_types_in #104835
Conversation
What's the benefit of doing this? Consolidation? |
@compiler-errors exactly, to consolidate, right now there are a lot of ways to normalize stuff. |
i think we should have a clearer api for users of the trait solver, writing down my thoughts in https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/normalize.20outside.20of.20the.20solver |
as this is a step in the right direction imo @bors r+ rollup |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#104716 (move 2 candidates into builtin candidate) - rust-lang#104760 (Clarify `SyntaxExtensionKind::LegacyDerive`.) - rust-lang#104797 (rustc_codegen_ssa: write `.dwp` in a streaming fashion) - rust-lang#104835 (Use infcx.partially_normalize_associated_types_in) - rust-lang#104853 (Fix typo in miri sysroot) - rust-lang#104879 (jsondoclint: Recognise Typedef as valid kind for Type::ResolvedPath) - rust-lang#104887 (rustbuild: Don't build doc::SharedAssets when building JSON docs.) - rust-lang#104896 (rustdoc: fix broken tooltip CSS) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…s, 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 rust-lang#104835 for convenience. r? types
…s, 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 rust-lang#104835 for convenience. r? types
…s, 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 rust-lang#104835 for convenience. r? types
r? @lcnr