-
Notifications
You must be signed in to change notification settings - Fork 13.8k
support opaque types in method selection #146885
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
Conversation
|
This comment has been minimized.
This comment has been minimized.
9071886
to
0cf7b6a
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
45af29b
to
25acecb
Compare
This comment has been minimized.
This comment has been minimized.
25acecb
to
cb38942
Compare
This PR modifies |
This comment has been minimized.
This comment has been minimized.
cb38942
to
be0f84f
Compare
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.
This comment has been minimized.
This comment has been minimized.
support opaque types in method selection
be0f84f
to
0050715
Compare
508b75d
to
8ff5eee
Compare
This comment has been minimized.
This comment has been minimized.
`autoderef` already resolved and `method_autoderef_steps` makes sure we won't encounter an inference variable
We'll still error due to the `opt_bad_ty` of `method_autoderef_steps`. This slightly worsens the span of `infer_var.method()` which is now the same as for `Box::new(infer_var).method()`. Unlike `structurally_resolve_type`, `probe_op` does not check whether the infcx is already tainted, so this results in 2 previously not emitted errors.
8ff5eee
to
c2e39c2
Compare
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
@bors r=BoxyUwU |
☀️ Test successful - checks-actions |
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 a885811 (parent) -> 54a8a1d (this PR) Test differencesShow 102 test diffsStage 1
Stage 2
Additionally, 42 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 54a8a1db604e4caff93e26e167ad4a6fde9f0681 --output-dir test-dashboard And 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 (54a8a1d): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary -2.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 3.5%, secondary 10.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 470.315s -> 471.437s (0.24%) |
See my notes in https://hackmd.io/4ILASx3mQ3u_gW9r1JyqCw.
This PR builds on #145993 and allows not-yet defined opaque types as self types in the
method_autoderef_chain
.E.g. for
Box<impl Deref<impl Foo>>
this results in the autoderef chainBox<impl Deref> -> ?deref_hidden_ty -> ?foo_hidden_ty
. Method selection stays ambiguous if the final autoderef step is still an infer var unless that var is an opaque.TODO: treating opaques as rigid jank.
r? @BoxyUwU