rust/compiler/rustc_hir_analysis
bors 4c83bd03a9 Auto merge of #107038 - compiler-errors:dont-wfcheck-non-local-rpit, r=oli-obk
Don't wf-check non-local RPITs

We were using `ty::is_impl_trait_defn(..).is_none()` to check if we need to add WF obligations for an opaque type.

This is *supposed* to be checking if the type is a TAIT, since RPITs' wfness is implied by wf checking its parent item, but since `is_impl_trait_defn` returns `None` for non-local RPIT and async futures, we unnecessarily consider wf predicates for an RPIT if it is coming from a foreign crate.

Fixes #107036

r? `@oli-obk` but feel free to reassign
2023-01-19 16:49:06 +00:00
..
src Auto merge of #107038 - compiler-errors:dont-wfcheck-non-local-rpit, r=oli-obk 2023-01-19 16:49:06 +00:00
Cargo.toml Rewrite representability 2022-10-07 09:33:46 -05:00
README.md rustc_typeck to rustc_hir_analysis 2022-09-27 10:37:23 +02:00

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.