Skip to content
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

when checking pointee metadata, canonicalize the Sized check #95315

Merged
merged 1 commit into from
Apr 14, 2022

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Mar 25, 2022

Use infcx.predicate_must_hold_modulo_regions with a Sized obligation instead of just calling ty.is_sized, because the latter does not canonicalize region and type vars (and in the test case I added in this PR, there's a region var in the ParamEnv).

Fixes #95311

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 25, 2022
@rust-highfive
Copy link
Collaborator

r? @matthewjasper

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 25, 2022
@bjorn3
Copy link
Member

bjorn3 commented Mar 26, 2022

because the latter does not canonicalize region and type vars (and in the test case I added in this PR, there's a region var in the ParamEnv)

Would it make sense to change .is_sized() instead? That may avoid future occurrence of a similar issue.

@compiler-errors
Copy link
Member Author

@bjorn3 that works, but might be a perf regression because we need to do extra canonicalization every call

@dimpolo
Copy link
Contributor

dimpolo commented Apr 8, 2022

Is anything blocking this?
I would love to switch to a new nightly release 🤓

@compiler-errors
Copy link
Member Author

rolling a new reviewer...

r? rust-lang/compiler

@pnkfelix
Copy link
Member

pnkfelix commented Apr 14, 2022

@bors r+ rollup=never

(discussed at T-compiler triage meeting.)

@bors
Copy link
Contributor

bors commented Apr 14, 2022

📌 Commit 3624f1c has been approved by pnkfelix

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 14, 2022
@bors
Copy link
Contributor

bors commented Apr 14, 2022

⌛ Testing commit 3624f1c with merge e7575f9...

@bors
Copy link
Contributor

bors commented Apr 14, 2022

☀️ Test successful - checks-actions
Approved by: pnkfelix
Pushing e7575f9 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 14, 2022
@bors bors merged commit e7575f9 into rust-lang:master Apr 14, 2022
@rustbot rustbot added this to the 1.62.0 milestone Apr 14, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e7575f9): comparison url.

Summary:

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: mixed results
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 0 1 0 1 0
mean2 N/A 0.3% N/A -0.4% N/A
max N/A 0.3% N/A -0.4% N/A

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. number of relevant changes

  2. the arithmetic mean of the percent change

@compiler-errors compiler-errors deleted the pointee-fix branch August 11, 2023 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: StableHasher: unexpected region '_#0r
10 participants