mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
b71fb5edc0
Use `TypingMode` throughout the compiler instead of `ParamEnv` Hopefully the biggest single PR as part of https://github.com/rust-lang/types-team/issues/128. ## `infcx.typing_env` while defining opaque types I don't know how'll be able to correctly handle opaque types when using something taking a `TypingEnv` while defining opaque types. To correctly handle the opaques we need to be able to pass in the current `opaque_type_storage` and return constraints, i.e. we need to use a proper canonical query. We should migrate all the queries used during HIR typeck and borrowck where this matters to proper canonical queries. This is ## `layout_of` and `Reveal::All` We convert the `ParamEnv` to `Reveal::All` right at the start of the `layout_of` query, so I've changed callers of `layout_of` to already use a post analysis `TypingEnv` when encountering it. |
||
---|---|---|
.. | ||
dep_graph | ||
hir | ||
hooks | ||
infer | ||
middle | ||
mir | ||
query | ||
thir | ||
traits | ||
ty | ||
util | ||
arena.rs | ||
error.rs | ||
lib.rs | ||
lint.rs | ||
macros.rs | ||
metadata.rs | ||
tests.rs | ||
thir.rs | ||
values.rs |