Generalize trait object generic param check to aliases.#100247
Merged
bors merged 2 commits intorust-lang:masterfrom Aug 12, 2022
Merged
Generalize trait object generic param check to aliases.#100247bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
Contributor
|
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
ab8fe17 to
ee7eb58
Compare
lcnr
reviewed
Aug 10, 2022
Contributor
There was a problem hiding this comment.
maybe instead use ty.walk().any(|arg| arg == dummy_self.into()) 🤔 this feels a lot more clear than checking for HAS_TY_FRESH
ee7eb58 to
0df84ae
Compare
Contributor
Author
|
@bors r=lcnr |
Collaborator
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Aug 11, 2022
…faults, r=lcnr Generalize trait object generic param check to aliases. The current algorithm only checks that `Self` does not appear in defaults for traits. This is not sufficient for trait aliases. This PR moves the check to trait object elaboration, which sees through trait aliases. Fixes rust-lang#82927. Fixes rust-lang#84789.
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Aug 12, 2022
…faults, r=lcnr Generalize trait object generic param check to aliases. The current algorithm only checks that `Self` does not appear in defaults for traits. This is not sufficient for trait aliases. This PR moves the check to trait object elaboration, which sees through trait aliases. Fixes rust-lang#82927. Fixes rust-lang#84789.
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Aug 12, 2022
…faults, r=lcnr Generalize trait object generic param check to aliases. The current algorithm only checks that `Self` does not appear in defaults for traits. This is not sufficient for trait aliases. This PR moves the check to trait object elaboration, which sees through trait aliases. Fixes rust-lang#82927. Fixes rust-lang#84789.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 12, 2022
Rollup of 9 pull requests Successful merges: - rust-lang#100022 (Optimize thread ID generation) - rust-lang#100030 (cleanup code w/ pointers in std a little) - rust-lang#100229 (add -Zextra-const-ub-checks to enable more UB checking in const-eval) - rust-lang#100247 (Generalize trait object generic param check to aliases.) - rust-lang#100255 (Adding more verbose documentation for `std::fmt::Write`) - rust-lang#100366 (errors: don't fail on broken primary translations) - rust-lang#100396 (Suggest const and static for global variable) - rust-lang#100409 (rustdoc: don't generate DOM element for operator) - rust-lang#100443 (Add two let else regression tests) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 2, 2022
Rollup of 7 pull requests Successful merges: - rust-lang#92744 (Check if enum from foreign crate has any non exhaustive variants when attempting a cast) - rust-lang#99337 (rustdoc: simplify highlight.rs) - rust-lang#100007 (Never inline Windows dtor access) - rust-lang#100030 (cleanup code w/ pointers in std a little) - rust-lang#100192 ( Remove duplicated temporaries creating during box derefs elaboration) - rust-lang#100247 (Generalize trait object generic param check to aliases.) - rust-lang#100374 (Improve crate selection on rustdoc search results page) Failed merges: 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.
The current algorithm only checks that
Selfdoes not appear in defaults for traits. This is not sufficient for trait aliases.This PR moves the check to trait object elaboration, which sees through trait aliases.
Fixes #82927.
Fixes #84789.