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

Check lazy type aliases for well-formedness #114228

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

fmease
Copy link
Member

@fmease fmease commented Jul 29, 2023

Previously we didn't check if T: Mul holds given lazy type Alias<T> = <T as Mul>::Output;.
Now we do. It only makes sense.

@rustbot label F-lazy_type_alias

r? @oli-obk

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. F-lazy_type_alias `#![feature(lazy_type_alias)]` labels Jul 29, 2023
|| ty.has_opaque_types()
|| ty.has_inherent_projections()
{
// Bounds of lazy type aliases and on eager ones that contain opaque types or inherent
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if the phrasing is ok, bounds sounds ambiguous to me. One might wonder it refers to the bounds on the generic parameters (which is the case) or if it refers to the item bounds (i.e. the B in type T: B = … which is obviously invalid for type aliases).

@fmease
Copy link
Member Author

fmease commented Jul 30, 2023

Update: Done.
At this point I'm asking myself if we should introduce a separate UI test folder for lazy_type_alias.
Including this PR, there are 3 UI tests and 2 rustdoc tests for lazy type aliases ^^.

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jul 30, 2023
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jul 30, 2023

☔ The latest upstream changes (presumably #114226) made this pull request unmergeable. Please resolve the merge conflicts.

@oli-obk
Copy link
Contributor

oli-obk commented Jul 31, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 31, 2023

📌 Commit 0ca4328 has been approved by oli-obk

It is now in the queue for this repository.

@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 Jul 31, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 31, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#114111 (Improve test case for experimental API remove_matches)
 - rust-lang#114169 (refactor builtin unsize handling, extend comments)
 - rust-lang#114182 (clean up after 113312)
 - rust-lang#114193 (Update lexer emoji diagnostics to Unicode 15.0)
 - rust-lang#114200 (Detect trait upcasting through struct tail unsizing in new solver select)
 - rust-lang#114228 (Check lazy type aliases for well-formedness)
 - rust-lang#114267 (Map RPITIT's opaque type bounds back from projections to opaques)
 - rust-lang#114269 (Migrate GUI colors test to original CSS color format)
 - rust-lang#114286 (Add missing feature gate in multiple_supertrait_upcastable doc)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 95b7116 into rust-lang:master Jul 31, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Jul 31, 2023
@fmease fmease deleted the wf-lazy-ty-aliases branch July 31, 2023 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc F-lazy_type_alias `#![feature(lazy_type_alias)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.

5 participants