-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
TypingMode: merge intercrate, reveal, and defining_opaque_types #131856
Conversation
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #131988) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
TypingMode 🤔 unsure how and whether to actually get this ready for merge, opening for input + perf for now r? `@compiler-errors`
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
☔ The latest upstream changes (presumably #132079) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
TypingMode 🤔 unsure how and whether to actually get this ready for merge, opening for input + perf for now r? `@compiler-errors`
This comment has been minimized.
This comment has been minimized.
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
TypingMode 🤔 unsure how and whether to actually get this ready for merge, opening for input + perf for now #### `TypingMode::from_param_env` I am using this even in cases where I know that the `param_env` will always be `Reveal::UserFacing`. This is to make it easier to correctly refactor this code in the future, any time we use `Reveal::UserFacing` in a body while not defining its opaque types is incorrect and should use a `TypingMode` which only reveals opaques defined by that body instead, cc rust-lang#124598 r? `@compiler-errors`
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
TypingMode: merge intercrate, reveal, and defining_opaque_types This adds `TypingMode` and uses it in most places. We do not yet remove `Reveal` from `param_env`s. This and other future work as tracked in rust-lang#132279 and via `FIXME`s. Fetching the `TypingMode` of the `InferCtxt` asserts that the `TypingMode` agrees with `ParamEnv::reveal` to make sure we don't introduce any subtle bugs here. This will be unnecessary once `ParamEnv::reveal` no longer exists. As the `TypingMode` is now a part of the query input, I've merged the coherence and non-coherence caches for the new solver. I've also enabled the local `infcx` cache during coherence by clearing the cache when forking it with a different `TypingMode`. #### `TypingMode::from_param_env` I am using this even in cases where I know that the `param_env` will always be `Reveal::UserFacing`. This is to make it easier to correctly refactor this code in the future, any time we use `Reveal::UserFacing` in a body while not defining its opaque types is incorrect and should use a `TypingMode` which only reveals opaques defined by that body instead, cc rust-lang#124598 r? `@compiler-errors`
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (5c3ff89): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary -1.2%, secondary 0.1%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary 2.6%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 783.339s -> 782.831s (-0.06%) |
This comment has been minimized.
This comment has been minimized.
@@ -362,7 +362,7 @@ fn is_normalizable_helper<'tcx>( | |||
} | |||
// prevent recursive loops, false-negative is better than endless loop leading to stack overflow | |||
cache.insert(ty, false); | |||
let infcx = cx.tcx.infer_ctxt().build(); | |||
let infcx = cx.tcx.infer_ctxt().build(TypingMode::from_param_env(param_env)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has a late context :<
@bors r+ rollup |
TypingMode: merge intercrate, reveal, and defining_opaque_types This adds `TypingMode` and uses it in most places. We do not yet remove `Reveal` from `param_env`s. This and other future work as tracked in rust-lang#132279 and via `FIXME`s. Fetching the `TypingMode` of the `InferCtxt` asserts that the `TypingMode` agrees with `ParamEnv::reveal` to make sure we don't introduce any subtle bugs here. This will be unnecessary once `ParamEnv::reveal` no longer exists. As the `TypingMode` is now a part of the query input, I've merged the coherence and non-coherence caches for the new solver. I've also enabled the local `infcx` cache during coherence by clearing the cache when forking it with a different `TypingMode`. #### `TypingMode::from_param_env` I am using this even in cases where I know that the `param_env` will always be `Reveal::UserFacing`. This is to make it easier to correctly refactor this code in the future, any time we use `Reveal::UserFacing` in a body while not defining its opaque types is incorrect and should use a `TypingMode` which only reveals opaques defined by that body instead, cc rust-lang#124598 r? `@compiler-errors`
…kingjubilee Rollup of 8 pull requests Successful merges: - rust-lang#129394 (Don't lint `irrefutable_let_patterns` on leading patterns if `else if` let-chains) - rust-lang#131856 (TypingMode: merge intercrate, reveal, and defining_opaque_types) - rust-lang#132246 (Rename `rustc_abi::Abi` to `BackendRepr`) - rust-lang#132322 (powerpc64-ibm-aix: update maintainters) - rust-lang#132327 (Point to Fuchsia team in platform support docs) - rust-lang#132332 (Use `token_descr` more in error messages) - rust-lang#132338 (Remove `Engine`) - rust-lang#132340 (cg_llvm: Consistently use safe wrapper function `set_section`) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#129394 (Don't lint `irrefutable_let_patterns` on leading patterns if `else if` let-chains) - rust-lang#131856 (TypingMode: merge intercrate, reveal, and defining_opaque_types) - rust-lang#132322 (powerpc64-ibm-aix: update maintainters) - rust-lang#132327 (Point to Fuchsia team in platform support docs) - rust-lang#132332 (Use `token_descr` more in error messages) - rust-lang#132338 (Remove `Engine`) - rust-lang#132340 (cg_llvm: Consistently use safe wrapper function `set_section`) - rust-lang#132342 (cg_llvm: Clean up FFI calls for operand bundles) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#131856 - lcnr:typing-mode, r=compiler-errors TypingMode: merge intercrate, reveal, and defining_opaque_types This adds `TypingMode` and uses it in most places. We do not yet remove `Reveal` from `param_env`s. This and other future work as tracked in rust-lang#132279 and via `FIXME`s. Fetching the `TypingMode` of the `InferCtxt` asserts that the `TypingMode` agrees with `ParamEnv::reveal` to make sure we don't introduce any subtle bugs here. This will be unnecessary once `ParamEnv::reveal` no longer exists. As the `TypingMode` is now a part of the query input, I've merged the coherence and non-coherence caches for the new solver. I've also enabled the local `infcx` cache during coherence by clearing the cache when forking it with a different `TypingMode`. #### `TypingMode::from_param_env` I am using this even in cases where I know that the `param_env` will always be `Reveal::UserFacing`. This is to make it easier to correctly refactor this code in the future, any time we use `Reveal::UserFacing` in a body while not defining its opaque types is incorrect and should use a `TypingMode` which only reveals opaques defined by that body instead, cc rust-lang#124598 r? ``@compiler-errors``
This adds
TypingMode
and uses it in most places. We do not yet removeReveal
fromparam_env
s. This and other future work as tracked in #132279 and viaFIXME
s.Fetching the
TypingMode
of theInferCtxt
asserts that theTypingMode
agrees withParamEnv::reveal
to make sure we don't introduce any subtle bugs here. This will be unnecessary onceParamEnv::reveal
no longer exists.As the
TypingMode
is now a part of the query input, I've merged the coherence and non-coherence caches for the new solver. I've also enabled the localinfcx
cache during coherence by clearing the cache when forking it with a differentTypingMode
.TypingMode::from_param_env
I am using this even in cases where I know that the
param_env
will always beReveal::UserFacing
. This is to make it easier to correctly refactor this code in the future, any time we useReveal::UserFacing
in a body while not defining its opaque types is incorrect and should use aTypingMode
which only reveals opaques defined by that body instead, cc #124598r? @compiler-errors