Repository navigation
reflection: erase bound regions in function_ptr() - #166169
Conversation
| let (variant, variant_place) = ecx.project_downcast_named(dest, sym::Some)?; | ||
| let field_place = ecx.project_field(&variant_place, FieldIdx::ZERO)?; | ||
| let sig = sig.skip_binder(); // FIXME: handle lifetime bounds | ||
| let sig = ecx.tcx.instantiate_bound_regions_with_erased(*sig); |
There was a problem hiding this comment.
leave the FIXME here, we may want to actually expose binders in the API somehow
|
Reminder, once the PR becomes ready for a review, use |
|
@rustbot ready |
|
@bors r+ rollup |
This comment has been minimized.
This comment has been minimized.
|
❌ Commit aabc982 has been unapproved due to PR CI failure. Reapprove it with |
|
|
|
@bors squash |
This comment has been minimized.
This comment has been minimized.
|
🔨 2 commits were squashed into 78d5de8. |
aabc982 to
78d5de8
Compare
This comment has been minimized.
This comment has been minimized.
78d5de8 to
296ce75
Compare
This comment has been minimized.
This comment has been minimized.
* reflection: erase bound regions in function_ptr() * leave FIXME for handling bound lifetimes
296ce75 to
48e85dd
Compare
|
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 5debe6a (parent) -> 0259d5e (this PR) Test differencesShow 1 test diff1 doctest diff were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 0259d5e9a81c6af08e40f8c204f2c0c41dca1647 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (0259d5e): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary 3.1%, secondary 1.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -1.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 460.778s -> 460.582s (-0.04%) |
View all comments
Fixes: #153176
skip_binder() only removes for<'a, ...> bound region declarations, so regions without declarations were left behind.
On nightly, the problem issue mentioned occurs.
ICE
Not enough bound vars: '^0 not found in []on local (with debug assertions) when callingtrait_info_ofFixed this issue by using
instantiate_bound_regions_with_erasedto erase bound regions on function_ptr() not to leave regions without declarations.r? @oli-obk
(since you are the compiler champion of reflection & comptime, and I saw you asked the reviewee to leave a FIXME that I removed on this PR: #152173 (comment))