Skip to content
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

Eagerly normalize HIR paths in new trait solver #113473

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jul 8, 2023

TODO: needs a new description now

r? @lcnr

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 8, 2023
@lcnr
Copy link
Contributor

lcnr commented Jul 11, 2023

I think always using try_structurally_resolve_type for RawTy would result in "too much" normalization. I don't have a clear idea how to proceed here. Maybe:

Make the fields of RawTy private and add 3 accessors to RawTy:

  • unnormalized_ty (currently raw)
  • ty (currently normalized, would stay unnormalized with the new solver. idk what would be a good name here: This should be the default once we're outside of astconv, but ty feels like it's prone to get misused in astconv itself. maybe finished_ty or sth 🤷 )
  • structurally_normalized_ty (new: normalized with old solver, after try_structurally_normalize_type in new solver)

@lcnr lcnr added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 11, 2023
@compiler-errors
Copy link
Member Author

@lcnr: In that case, I think I'd just rather put structurally_resolved_ty calls in all of the places where we actually require a structurally resolved type in hir typeck, rather than adding a 3rd field to RawTy with a slightly different meaning than the other 2 :s

@lcnr
Copy link
Contributor

lcnr commented Jul 11, 2023

@lcnr: In that case, I think I'd just rather put structurally_resolved_ty calls in all of the places where we actually require a structurally resolved type in hir typeck, rather than adding a 3rd field to RawTy with a slightly different meaning than the other 2 :s

That's also fine 👍

@compiler-errors
Copy link
Member Author

Actually, changing all the places where RawTy.normalized is used is actually hell. Path resolving code in hir typeck is a mess, literally spaghetti.

I would try the 3 field option above, but literally every current usage of RawTy.normalized would just be moved to the structurally_normalized_ty one, with no usages for finished_ty (except for a single usage in the offset_of! macro)

@rust-cloud-vms rust-cloud-vms bot force-pushed the new-solver-eager-resolve-hir-paths branch from cc9bb78 to 4973567 Compare August 2, 2023 04:11
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check-tidy failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v3' (SHA:c85c95e3d7251135ab7dc9ce3241c5835cc595a9)
Download action repository 'actions/upload-artifact@v3' (SHA:0b7f8abb1508181956e8e162db84b466c27e18ce)
Complete job name: PR - mingw-check-tidy
git config --global core.autocrlf false
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
---
  lfs: false
  submodules: false
  set-safe-directory: true
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
---
##[group]Run src/ci/scripts/setup-environment.sh
src/ci/scripts/setup-environment.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  CACHE_DOMAIN: ci-caches.rust-lang.org
  EXTRA_VARIABLES: {}
##[endgroup]
linux builder detected, using docker to run the build
##[group]Run src/ci/scripts/should-skip-this.sh
src/ci/scripts/should-skip-this.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: mingw-check-tidy
##[endgroup]
Executing the job since there is no skip rule preventing the execution
##[group]Run src/ci/scripts/verify-channel.sh
src/ci/scripts/verify-channel.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: mingw-check-tidy
##[endgroup]
##[group]Run src/ci/scripts/collect-cpu-stats.sh
src/ci/scripts/collect-cpu-stats.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
---
##[group]Run src/ci/scripts/install-sccache.sh
src/ci/scripts/install-sccache.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: mingw-check-tidy
##[endgroup]
##[group]Run src/ci/scripts/select-xcode.sh
src/ci/scripts/select-xcode.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: mingw-check-tidy
##[endgroup]
##[group]Run src/ci/scripts/install-clang.sh
src/ci/scripts/install-clang.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: mingw-check-tidy
##[endgroup]
##[group]Run src/ci/scripts/install-wix.sh
src/ci/scripts/install-wix.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: mingw-check-tidy
##[endgroup]
##[group]Run src/ci/scripts/disable-git-crlf-conversion.sh
src/ci/scripts/disable-git-crlf-conversion.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
---
##[group]Run src/ci/scripts/install-msys2.sh
src/ci/scripts/install-msys2.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: mingw-check-tidy
##[endgroup]
##[group]Run src/ci/scripts/install-mingw.sh
src/ci/scripts/install-mingw.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: mingw-check-tidy
##[endgroup]
##[group]Run src/ci/scripts/install-ninja.sh
src/ci/scripts/install-ninja.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: mingw-check-tidy
##[endgroup]
##[group]Run src/ci/scripts/enable-docker-ipv6.sh
src/ci/scripts/enable-docker-ipv6.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: mingw-check-tidy
##[endgroup]
{"ipv6":true,"fixed-cidr-v6":"fd9a:8454:6789:13f7::/64"}
##[group]Run src/ci/scripts/disable-git-crlf-conversion.sh
src/ci/scripts/disable-git-crlf-conversion.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: mingw-check-tidy
##[endgroup]
##[group]Run src/ci/scripts/verify-line-endings.sh
src/ci/scripts/verify-line-endings.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: mingw-check-tidy
##[endgroup]
##[group]Run src/ci/scripts/verify-backported-commits.sh
src/ci/scripts/verify-backported-commits.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: mingw-check-tidy
##[endgroup]
Skipping. This is only run when merging to the beta or stable branches.
##[group]Run src/ci/scripts/verify-stable-version-number.sh
src/ci/scripts/verify-stable-version-number.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: mingw-check-tidy
##[endgroup]
This script only works on the stable channel. Skipping the check.
##[group]Run src/ci/scripts/run-build-from-ci.sh
src/ci/scripts/run-build-from-ci.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CI_JOB_NAME: mingw-check-tidy
  HEAD_SHA: 497356779a2dbca8a61308c933550718bc96726d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
---
Building wheels for collected packages: reuse
  Building wheel for reuse (pyproject.toml): started
  Building wheel for reuse (pyproject.toml): finished with status 'done'
  Created wheel for reuse: filename=reuse-1.1.0-cp310-cp310-manylinux_2_35_x86_64.whl size=180116 sha256=351235b2326fb4db7a18e257e13ce7896c5f77339521e2c2612e71e154800a19
  Stored in directory: /tmp/pip-ephem-wheel-cache-iw66pibn/wheels/c2/3c/b9/1120c2ab4bd82694f7e6f0537dc5b9a085c13e2c69a8d0c76d
Installing collected packages: boolean-py, binaryornot, setuptools, reuse, python-debian, markupsafe, license-expression, jinja2, chardet
  Attempting uninstall: setuptools
    Found existing installation: setuptools 59.6.0
    Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr
---
##[endgroup]
Built container sha256:48813c502b989e90931a61a8f5e134893aed7889c5be0177bb8a1a0fe9117622
Uploading finished image to https://ci-caches.rust-lang.org/docker/39289e18f1ac1b1a573d1a3c658528cab0cbfec4029e2def8ed615ecd4b1295e23213ab5b134f4a50a4bd45af0a8a4266b7571ba256dc217696d0f040efcd003

<botocore.awsrequest.AWSRequest object at 0x7f1682b21cd0>
gzip: stdout: Broken pipe
xargs: docker: terminated by signal 13
[CI_JOB_NAME=mingw-check-tidy]
[CI_JOB_NAME=mingw-check-tidy]
---
##[endgroup]
fmt check
tidy check
tidy: Skipping binary file check, read-only filesystem
##[error]tidy error: /checkout/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs:329: TODO is used for tasks that should be done before merging a PR; If you want to leave a message in the codebase use FIXME
some tidy checks failed
##[group]Clock drift check
  local time: Wed Aug  2 04:15:39 UTC 2023
  network time: Wed, 02 Aug 2023 04:15:39 GMT
##[endgroup]

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits, then r=me

@@ -3142,7 +3144,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
fields: &[Ident],
expr: &'tcx hir::Expr<'tcx>,
) -> Ty<'tcx> {
let container = self.to_ty(container).normalized;
// We only need to normalize in the old solver
let container = self.normalize(expr.span, self.to_ty(container));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we not normalize in the structurally_resolve_type inside of the loop?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, structurally resolve only processes obligations in the old solver

}
QPath::LangItem(..) => {
bug!("`resolve_ty_and_res_fully_qualified_call` called on `LangItem`")
}
};

// FIXME(-Ztrait-solver=next): Can use `try_structurally_resolve` after migration.
let normalized =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let normalized =
let normalized_ty =

self.handle_raw_ty(span, tcx.at(span).type_of(impl_def_id).instantiate_identity());
match ty.normalized.ty_adt_def() {
let ty = tcx.at(span).type_of(impl_def_id).instantiate_identity();
let normalized = self.structurally_normalize_after_astconv(span, ty);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let normalized = self.structurally_normalize_after_astconv(span, ty);
let normalized_ty = self.structurally_normalize_after_astconv(span, ty);

@@ -1367,7 +1388,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
def_id,
&[],
has_self,
self_ty.map(|s| s.raw),
self_ty.map(|s| s),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self_ty.map(|s| s),
self_ty,

?

@@ -1346,25 +1346,31 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
) -> Result<(&'tcx ty::VariantDef, Ty<'tcx>), ErrorGuaranteed> {
let path_span = qpath.span();
let (def, ty) = self.finish_resolving_struct_path(qpath, path_span, hir_id);
let normalized = self.structurally_normalize_after_astconv(path_span, ty);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let normalized = self.structurally_normalize_after_astconv(path_span, ty);
let normalized_ty = self.structurally_normalize_after_astconv(path_span, ty);

@@ -324,6 +324,26 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
)
}

// FIXME(-Ztrait-solver=next): This could be replaced with `try_structurally_resolve`
// calls after the new trait solver is stable.
/// TODO: I don't know what to call this.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is that method needed 🤔 because we don't want to normalize with the old solver here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, because we need to normalize with the old solver here. This one calls the version of normalize that does both.

@bors
Copy link
Contributor

bors commented Aug 3, 2023

☔ The latest upstream changes (presumably #113199) made this pull request unmergeable. Please resolve the merge conflicts.

@JohnCSimon
Copy link
Member

@compiler-errors
ping from triage - can you post your status on this PR? This PR has not received an update in a few months. Thank you!

FYI: when a PR is ready for review, send a message containing
@rustbot ready to switch to S-waiting-on-review so the PR is in the reviewer's backlog.

@compiler-errors
Copy link
Member Author

I really don't have the patience to rework this PR. The way that RawTy is shuttled around hir typeck is very inconsistent, and it's kind of hellish trying to validate this is both correct and also will not affect the old solver. Sorry.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 26, 2024
always normalize `LoweredTy` in the new solver

I currently expect us to stop using alias bound candidates of normalizable aliases due to rust-lang/trait-system-refactor-initiative#77 by landing rust-lang#119744. At this point it mostly doesn't matter whether we eagerly normalize (and replace with infer vars in case of ambiguity). cc rust-lang#113473 previous attempt

The infer var replacement for ambiguous projections can in very rare cases:
- weaken inference rust-lang/trait-system-refactor-initiative#81
- strengthen inference rust-lang/trait-system-refactor-initiative#7

I do not expect this impact on inference to significantly affect real crates.

r? `@compiler-errors`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 26, 2024
always normalize `LoweredTy` in the new solver

I currently expect us to stop using alias bound candidates of normalizable aliases due to rust-lang/trait-system-refactor-initiative#77 by landing rust-lang#119744. At this point it mostly doesn't matter whether we eagerly normalize (and replace with infer vars in case of ambiguity). cc rust-lang#113473 previous attempt

The infer var replacement for ambiguous projections can in very rare cases:
- weaken inference rust-lang/trait-system-refactor-initiative#81
- strengthen inference rust-lang/trait-system-refactor-initiative#7

I do not expect this impact on inference to significantly affect real crates.

r? ``@compiler-errors``
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 27, 2024
Rollup merge of rust-lang#120378 - lcnr:normalize-ast, r=compiler-errors

always normalize `LoweredTy` in the new solver

I currently expect us to stop using alias bound candidates of normalizable aliases due to rust-lang/trait-system-refactor-initiative#77 by landing rust-lang#119744. At this point it mostly doesn't matter whether we eagerly normalize (and replace with infer vars in case of ambiguity). cc rust-lang#113473 previous attempt

The infer var replacement for ambiguous projections can in very rare cases:
- weaken inference rust-lang/trait-system-refactor-initiative#81
- strengthen inference rust-lang/trait-system-refactor-initiative#7

I do not expect this impact on inference to significantly affect real crates.

r? ``@compiler-errors``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants