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

Imply outlives-bounds on lazy type aliases #119350

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

fmease
Copy link
Member

@fmease fmease commented Dec 27, 2023

Fixes #118479.

r? types

@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. labels Dec 27, 2023
@fmease fmease added A-implied-bounds Area: Implied bounds / inferred outlives-bounds F-lazy_type_alias `#![feature(lazy_type_alias)]` T-types Relevant to the types team, which will review and decide on the PR/issue. labels Dec 27, 2023
@fmease fmease force-pushed the lazy-ty-aliases-implied-bounds branch 2 times, most recently from 8c9c05c to be171ed Compare December 27, 2023 15:36
@rust-log-analyzer

This comment has been minimized.

@fmease fmease force-pushed the lazy-ty-aliases-implied-bounds branch from be171ed to 298bfd6 Compare December 27, 2023 16:05
Copy link
Member Author

Choose a reason for hiding this comment

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

Reordering of diagnostics prolly because some queries now get called earlier than later.

@compiler-errors
Copy link
Member

r? compiler-errors @bors r+

@bors
Copy link
Contributor

bors commented Dec 27, 2023

📌 Commit 298bfd6 has been approved by compiler-errors

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 Dec 27, 2023
@fmease
Copy link
Member Author

fmease commented Dec 27, 2023

Ah, if we want to “[treat] lazy type aliases like structs”, we should probably also imply implied bounds1 (transitively) and make the following code compile:

#![feature(lazy_type_alias)]
type Ref0<'a, T> = Ref1<'a, T>;
type Ref1<'a, T> = &'a T;

@bors r-
@rustbot author

Footnotes

  1. So no tests/ui/lazy-type-alias/dont-imply-implied-outlives-bounds.rs

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Dec 27, 2023
@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Dec 27, 2023
@fmease fmease force-pushed the lazy-ty-aliases-implied-bounds branch from 298bfd6 to b69457c Compare December 28, 2023 00:41
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 28, 2023
@fmease fmease force-pushed the lazy-ty-aliases-implied-bounds branch from b69457c to 90d6fe2 Compare December 28, 2023 01:05
@fmease
Copy link
Member Author

fmease commented Dec 28, 2023

I accidentally squashed the commits ^^', I can try to untangle it again if you'd like me to >.<

@compiler-errors
Copy link
Member

No it's fine

@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jan 4, 2024

📌 Commit 90d6fe2 has been approved by compiler-errors

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 Jan 4, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 5, 2024
…nds, r=compiler-errors

Imply outlives-bounds on lazy type aliases

Fixes rust-lang#118479.

r? types
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 5, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#118680 (Add support for shell argfiles)
 - rust-lang#119151 (Hide foreign `#[doc(hidden)]` paths in import suggestions)
 - rust-lang#119216 (Use diagnostic namespace in stdlib)
 - rust-lang#119350 (Imply outlives-bounds on lazy type aliases)
 - rust-lang#119538 (Cleanup error handlers: round 5)
 - rust-lang#119563 (Check yield terminator's resume type in borrowck)
 - rust-lang#119589 (cstore: Remove unnecessary locking from `CrateMetadata`)
 - rust-lang#119591 (rustc_mir_transform: Make DestinationPropagation stable for queries)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 5, 2024
…nds, r=compiler-errors

Imply outlives-bounds on lazy type aliases

Fixes rust-lang#118479.

r? types
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 5, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#118680 (Add support for shell argfiles)
 - rust-lang#119216 (Use diagnostic namespace in stdlib)
 - rust-lang#119350 (Imply outlives-bounds on lazy type aliases)
 - rust-lang#119538 (Cleanup error handlers: round 5)
 - rust-lang#119563 (Check yield terminator's resume type in borrowck)
 - rust-lang#119577 (Migrate memory overlap check from validator to lint)
 - rust-lang#119589 (cstore: Remove unnecessary locking from `CrateMetadata`)

Failed merges:

 - rust-lang#119591 (rustc_mir_transform: Make DestinationPropagation stable for queries)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 5, 2024
…nds, r=compiler-errors

Imply outlives-bounds on lazy type aliases

Fixes rust-lang#118479.

r? types
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 5, 2024
…nds, r=compiler-errors

Imply outlives-bounds on lazy type aliases

Fixes rust-lang#118479.

r? types
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 5, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#118680 (Add support for shell argfiles)
 - rust-lang#119151 (Hide foreign `#[doc(hidden)]` paths in import suggestions)
 - rust-lang#119350 (Imply outlives-bounds on lazy type aliases)
 - rust-lang#119354 (Make `negative_bounds` internal & fix some of its issues)
 - rust-lang#119506 (Use `resolutions(()).effective_visiblities` to avoid cycle errors in `report_object_error`)
 - rust-lang#119554 (Fix scoping for let chains in match guards)
 - rust-lang#119563 (Check yield terminator's resume type in borrowck)
 - rust-lang#119589 (cstore: Remove unnecessary locking from `CrateMetadata`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 5, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#119151 (Hide foreign `#[doc(hidden)]` paths in import suggestions)
 - rust-lang#119350 (Imply outlives-bounds on lazy type aliases)
 - rust-lang#119354 (Make `negative_bounds` internal & fix some of its issues)
 - rust-lang#119506 (Use `resolutions(()).effective_visiblities` to avoid cycle errors in `report_object_error`)
 - rust-lang#119554 (Fix scoping for let chains in match guards)
 - rust-lang#119563 (Check yield terminator's resume type in borrowck)
 - rust-lang#119589 (cstore: Remove unnecessary locking from `CrateMetadata`)
 - rust-lang#119622 (never patterns: Document behavior of never patterns with macros-by-example)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit fc591db into rust-lang:master Jan 5, 2024
11 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 5, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 5, 2024
Rollup merge of rust-lang#119350 - fmease:lazy-ty-aliases-implied-bounds, r=compiler-errors

Imply outlives-bounds on lazy type aliases

Fixes rust-lang#118479.

r? types
@fmease fmease deleted the lazy-ty-aliases-implied-bounds branch January 5, 2024 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-implied-bounds Area: Implied bounds / inferred outlives-bounds 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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Imply outlives-bounds on lazy type aliases
6 participants