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

Forbid non-structural_match types in const generics #65627

Merged

Conversation

varkor
Copy link
Member

@varkor varkor commented Oct 20, 2019

Fixes #60286.

@rust-highfive
Copy link
Collaborator

Some changes occurred in diagnostic error codes

cc @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 20, 2019
@petrochenkov
Copy link
Contributor

IIRC, resolve had some hack making sure that generic parameters cannot be used in const generics.
It should be possible to remove it now because generic parameters are not structural_match.

@rust-highfive

This comment has been minimized.

@varkor
Copy link
Member Author

varkor commented Oct 20, 2019

@petrochenkov: just remembered this too — working on that now.

@varkor varkor added the F-const_generics `#![feature(const_generics)]` label Oct 20, 2019
@Centril
Copy link
Contributor

Centril commented Oct 20, 2019

Shouldn't this use the mechanism in #65519?

@Centril
Copy link
Contributor

Centril commented Oct 20, 2019

(cc @pnkfelix)

@rust-highfive

This comment has been minimized.

@varkor
Copy link
Member Author

varkor commented Oct 20, 2019

@Centril: this is compatible with that PR (up to rebasing).

@bors

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@varkor varkor force-pushed the const-generics-forbid-non-structural_match branch 2 times, most recently from 9e66c91 to ee55bcc Compare October 21, 2019 09:17
@rust-highfive

This comment has been minimized.

@varkor varkor force-pushed the const-generics-forbid-non-structural_match branch from ee55bcc to 161fab9 Compare October 21, 2019 15:54
@varkor
Copy link
Member Author

varkor commented Oct 21, 2019

@petrochenkov: I've removed the hack from resolve.

@rust-highfive

This comment has been minimized.

@varkor varkor force-pushed the const-generics-forbid-non-structural_match branch from 54eac6a to 2dda8ad Compare October 22, 2019 11:28
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Oct 22, 2019

📌 Commit 2dda8ad has been approved by petrochenkov

@bors
Copy link
Contributor

bors commented Oct 22, 2019

🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened

@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 Oct 22, 2019
@varkor
Copy link
Member Author

varkor commented Oct 23, 2019

@bors rollup

Centril added a commit to Centril/rust that referenced this pull request Oct 24, 2019
…ructural_match, r=petrochenkov

Forbid non-`structural_match` types in const generics

Fixes rust-lang#60286.
Centril added a commit to Centril/rust that referenced this pull request Oct 24, 2019
…ructural_match, r=petrochenkov

Forbid non-`structural_match` types in const generics

Fixes rust-lang#60286.
bors added a commit that referenced this pull request Oct 25, 2019
Rollup of 8 pull requests

Successful merges:

 - #65625 (Turn crate store into a resolver output)
 - #65627 (Forbid non-`structural_match` types in const generics)
 - #65710 (Update cargo)
 - #65729 (Update test cases for vxWorks)
 - #65746 (Tweak format string error to point at arguments always)
 - #65753 (Don't assert for different instance on impl trait alias)
 - #65755 (Avoid ICE when adjusting bad self ty)
 - #65766 (Update hashbrown to 0.6.2)

Failed merges:

r? @ghost
@bors bors merged commit 2dda8ad into rust-lang:master Oct 25, 2019
@varkor varkor deleted the const-generics-forbid-non-structural_match branch January 2, 2020 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-const_generics `#![feature(const_generics)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only permit structural_match types as const generic types
5 participants