Probe when assembling upcast candidates so they don't step on eachother's toes in new solver#114828
Merged
bors merged 1 commit intorust-lang:masterfrom Aug 15, 2023
Merged
Conversation
Collaborator
|
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
compiler-errors
commented
Aug 15, 2023
| let _ = x as &dyn Bar<_>; // Ambiguous | ||
| //~^ ERROR non-primitive cast | ||
| //~^^ ERROR the trait bound `&dyn Foo: Bar<_>` is not satisfied | ||
| //[current]~^^ ERROR the trait bound `&dyn Foo: Bar<_>` is not satisfied |
Contributor
Author
There was a problem hiding this comment.
I actually have no idea where this error message is coming from. It also seems just wrong? This is the error message I'd expect to get if we had &x as &dyn Bar<_>, not x as &dyn Bar<_>...
edit: It was a bug in the error reporting code from a few years ago, code was using try_coerce instead of can_coerce: #114834
Contributor
|
@bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 15, 2023
…llaumeGomez Rollup of 10 pull requests Successful merges: - rust-lang#114711 (Infer `Lld::No` linker hint when the linker stem is a generic compiler driver) - rust-lang#114772 (Add `{Local}ModDefId` to more strongly type DefIds`) - rust-lang#114800 (std: add some missing repr(transparent)) - rust-lang#114820 (Add test for unknown_lints from another file.) - rust-lang#114825 (Upgrade std to gimli 0.28.0) - rust-lang#114827 (Only consider object candidates for object-safe dyn types in new solver) - rust-lang#114828 (Probe when assembling upcast candidates so they don't step on eachother's toes in new solver) - rust-lang#114829 (Separate `consider_unsize_to_dyn_candidate` from other unsize candidates) - rust-lang#114830 (Clean up some bad UI testing annotations) - rust-lang#114831 (Check projection args before substitution in new solver) r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lack of a probe causes one candidate to disqualify the other due to inference side-effects.
r? lcnr