Delay replacing escaping bound vars in FindParamInClause#142441
Delay replacing escaping bound vars in FindParamInClause#142441bors merged 5 commits intorust-lang:masterfrom
FindParamInClause#142441Conversation
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. Some changes occurred in src/tools/clippy cc @rust-lang/clippy HIR ty lowering was modified cc @fmease |
| mapped_regions: FxIndexMap<ty::PlaceholderRegion, ty::BoundRegion>, | ||
| mapped_types: FxIndexMap<ty::PlaceholderType, ty::BoundTy>, | ||
| mapped_consts: BTreeMap<ty::PlaceholderConst, ty::BoundVar>, | ||
| mapped_consts: FxIndexMap<ty::PlaceholderConst, ty::BoundVar>, |
| } | ||
|
|
||
| impl<I: Interner, T: TypeFoldable<I>> TypeVisitable<I> for Binder<I, T> { | ||
| impl<I: Interner, T: TypeVisitable<I>> TypeVisitable<I> for Binder<I, T> { |
There was a problem hiding this comment.
This is the motivation for this PR.
|
@bors2 try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…r=<try> Delay replacing escaping bound vars in `FindParamInClause` By uplifting the `BoundVarReplacer`, which is used by (e.g.) normalization to replace escaping bound vars that are encountered when folding binders, we can use a similar strategy to delay the instantiation of a binder's contents in the `FindParamInClause` used by the new trait solver. This should alleviate the recently added requirement that `Binder<T>: TypeVisitable` only if `T: TypeFoldable`, which was previously required b/c we were calling `enter_forall` so that we could structurally normalize aliases that we found within the predicates of a param-env clause. r? lcnr
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (e40247b): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary 9.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 754.801s -> 755.78s (0.13%) |
… type abstraction
216d418 to
b138202
Compare
|
fixed clippy |
|
@bors r+ |
|
@bors rollup=always |
Rollup of 16 pull requests Successful merges: - #140969 (Allow initializing logger with additional tracing Layer) - #141352 (builtin dyn impl no guide inference) - #142046 (add Vec::peek_mut) - #142273 (tests: Minicore `extern "gpu-kernel"` feature test) - #142302 (Rework how the disallowed qualifier in function type diagnostics are generated) - #142405 (Don't hardcode the intrinsic return types twice in the compiler) - #142434 ( Pre-install JS dependencies in tidy Dockerfile) - #142439 (doc: mention that intrinsics should not be called in user code) - #142441 (Delay replacing escaping bound vars in `FindParamInClause`) - #142449 (Require generic params for const generic params) - #142452 (Remove "intermittent" wording from `ReadDir`) - #142459 (Remove output helper bootstrap) - #142460 (cleanup search graph impl) - #142461 (compiletest: Clarify that `--no-capture` is needed with `--verbose`) - #142475 (Add platform support docs & maintainers for *-windows-msvc) - #142480 (tests: Convert two handwritten minicores to add-core-stubs) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #142441 - compiler-errors:lazier-binder-value-folding, r=lcnr Delay replacing escaping bound vars in `FindParamInClause` By uplifting the `BoundVarReplacer`, which is used by (e.g.) normalization to replace escaping bound vars that are encountered when folding binders, we can use a similar strategy to delay the instantiation of a binder's contents in the `FindParamInClause` used by the new trait solver. This should alleviate the recently added requirement that `Binder<T>: TypeVisitable` only if `T: TypeFoldable`, which was previously required b/c we were calling `enter_forall` so that we could structurally normalize aliases that we found within the predicates of a param-env clause. r? lcnr
By uplifting the
BoundVarReplacer, which is used by (e.g.) normalization to replace escaping bound vars that are encountered when folding binders, we can use a similar strategy to delay the instantiation of a binder's contents in theFindParamInClauseused by the new trait solver.This should alleviate the recently added requirement that
Binder<T>: TypeVisitableonly ifT: TypeFoldable, which was previously required b/c we were callingenter_forallso that we could structurally normalize aliases that we found within the predicates of a param-env clause.r? lcnr