Conversation
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
There was a problem hiding this comment.
e.g. this was wrong in that it could result in unnormalized types, we should be able to write a testcase for this 🤷 but that seems like effort, so i am not going to do it
There was a problem hiding this comment.
and woops, wrong param env xd
There was a problem hiding this comment.
ok, it feels wrong but polymorphization breaks with this change, ah whatever.
There was a problem hiding this comment.
Any idea of a "proper" solution for polymorphism?
There was a problem hiding this comment.
well, two ideas:
- don't normalize while computing whether we may polymorphize
- only use the normalized types after polymorphization
thinking about this, it would be correct to normalize twice here: once to get to the state assumed by polymorphization, and then once after the subst call to actually have a fully normalized type.
Actually, the result of fn_sig_for_fn_abi is only used by fn_abi_new_uncached which does the following 😁
let sig = self.tcx.normalize_erasing_late_bound_regions(self.param_env, sig);so we don't have to normalize here at all, except to deal with 2. added a comment mentioning this.
This comment has been minimized.
This comment has been minimized.
b2cf8e7 to
872aa52
Compare
|
☔ The latest upstream changes (presumably #98588) made this pull request unmergeable. Please resolve the merge conflicts. |
|
I think this is fine to land now, since the polymorphism thing is already labeled with a r=me once rebased |
|
I would like at least some idea of what the plan to fix polymorphism might look like though. (Though, I really do like the goal of this PR) |
872aa52 to
647052f
Compare
|
@bors r=compiler-errors |
|
☀️ Test successful - checks-actions |
Tested on commit rust-lang/rust@11bb80a. Direct link to PR: <rust-lang/rust#101901> 💔 miri on windows: test-fail → build-fail (cc @oli-obk @RalfJung). 💔 miri on linux: test-fail → build-fail (cc @oli-obk @RalfJung).
|
Finished benchmarking commit (11bb80a): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
Footnotes |
folding a type before substituting is pretty much always wrong and could happen by accident, e.g. see #99798 (comment)
this PR removes the
TypeFoldableandTypeVisitableimpl fromEarlyBinder.r? types cc @jackh726