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

Add a min_type_alias_impl_trait feature gate #82898

Merged
merged 11 commits into from
Mar 16, 2021
Merged

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Mar 8, 2021

This new feature gate only permits type alias impl trait to be constrained by function and trait method return types. All other possible constraining sites like const/static types, closure return types and binding types are now forbidden and gated under the type_alias_impl_trait and impl_trait_in_bindings feature gates (which are both marked as incomplete, as they have various ways to ICE the compiler or cause query cycles where they shouldn't).

r? @nikomatsakis

This is best reviewed commit-by-commit

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 8, 2021
@rust-log-analyzer

This comment has been minimized.

@jackh726 jackh726 added the WG-traits Working group: Traits, https://internals.rust-lang.org/t/announcing-traits-working-group/6804 label Mar 9, 2021
@bors
Copy link
Contributor

bors commented Mar 10, 2021

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

@rust-log-analyzer

This comment has been minimized.

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

This PR...seems pretty clean, @oli-obk! Left one suggestion. r=me with the comments.

compiler/rustc_typeck/src/check/check.rs Show resolved Hide resolved
compiler/rustc_typeck/src/check/check.rs Outdated Show resolved Hide resolved
@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 15, 2021

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Mar 15, 2021

📌 Commit 5d112657219d6b9543793f61d4f649b8dde5829a has been approved by nikomatsakis

@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 Mar 15, 2021
@rust-log-analyzer

This comment has been minimized.

@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 15, 2021

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Mar 15, 2021

📌 Commit 4bc1434 has been approved by nikomatsakis

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Mar 15, 2021
Add a `min_type_alias_impl_trait` feature gate

This new feature gate only permits type alias impl trait to be constrained by function and trait method return types. All other possible constraining sites like const/static types, closure return types and binding types are now forbidden and gated under the `type_alias_impl_trait` and `impl_trait_in_bindings` feature gates (which are both marked as incomplete, as they have various ways to ICE the compiler or cause query cycles where they shouldn't).

r? `@nikomatsakis`

This is best reviewed commit-by-commit
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Mar 15, 2021
Add a `min_type_alias_impl_trait` feature gate

This new feature gate only permits type alias impl trait to be constrained by function and trait method return types. All other possible constraining sites like const/static types, closure return types and binding types are now forbidden and gated under the `type_alias_impl_trait` and `impl_trait_in_bindings` feature gates (which are both marked as incomplete, as they have various ways to ICE the compiler or cause query cycles where they shouldn't).

r? ``@nikomatsakis``

This is best reviewed commit-by-commit
@bors
Copy link
Contributor

bors commented Mar 15, 2021

⌛ Testing commit 4bc1434 with merge 1048ced8e57e19caa9b1ad54134043686f19b12c...

@Dylan-DPC-zz
Copy link

failed in rollup

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 15, 2021
@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 15, 2021

@bors r=nikomatsakis rollup=iffy

@bors
Copy link
Contributor

bors commented Mar 15, 2021

📌 Commit c2683aa has been approved by nikomatsakis

@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 15, 2021

@bors rollup=never

could theoretically affect perf

@bors
Copy link
Contributor

bors commented Mar 15, 2021

⌛ Testing commit c2683aa with merge 998cb3882f027433e1f5b17da3302abe8a78477e...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Mar 15, 2021

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 15, 2021
@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 15, 2021

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Mar 15, 2021

📌 Commit e675941 has been approved by nikomatsakis

@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 Mar 15, 2021
@bors
Copy link
Contributor

bors commented Mar 16, 2021

⌛ Testing commit e675941 with merge 195ad48...

@bors
Copy link
Contributor

bors commented Mar 16, 2021

☀️ Test successful - checks-actions
Approved by: nikomatsakis
Pushing 195ad48 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. WG-traits Working group: Traits, https://internals.rust-lang.org/t/announcing-traits-working-group/6804
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants