Skip to content

Forbid non-structural_match types in const generics - #65627

Merged
bors merged 7 commits into
rust-lang:masterfrom
varkor:const-generics-forbid-non-structural_match
Oct 25, 2019
Merged

Forbid non-structural_match types in const generics#65627
bors merged 7 commits into
rust-lang:masterfrom
varkor:const-generics-forbid-non-structural_match

Conversation

@varkor

Copy link
Copy Markdown
Contributor

Fixes#60286.

@rust-highfive

Copy link
Copy Markdown
Contributor

Some changes occurred in diagnostic error codes

cc @GuillaumeGomez

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @petrochenkov

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

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

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

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

Copy link
Copy Markdown
Contributor

Shouldn't this use the mechanism in #65519?

@Centril

Copy link
Copy Markdown
Contributor

(cc @pnkfelix)

@rust-highfive

This comment has been minimized.

@varkor

Copy link
Copy Markdown
ContributorAuthor

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

@bors

This comment has been minimized.

@rust-highfive

This comment has been minimized.

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

This comment has been minimized.

@varkor
varkorforce-pushed the const-generics-forbid-non-structural_match branch from ee55bcc to 161fab9CompareOctober 21, 2019 15:54
@varkor

Copy link
Copy Markdown
ContributorAuthor

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

@rust-highfive

This comment has been minimized.

@varkor
varkorforce-pushed the const-generics-forbid-non-structural_match branch from 54eac6a to 2dda8adCompareOctober 22, 2019 11:28
@petrochenkov

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Oct 22, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 2dda8ad has been approved by petrochenkov

@bors

bors commented Oct 22, 2019

Copy link
Copy Markdown
Collaborator

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

@borsbors 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
Copy Markdown
ContributorAuthor

@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
Fixesrust-lang#60286.
@CentrilCentril mentioned this pull request Oct 24, 2019
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
Fixesrust-lang#60286.
@CentrilCentril mentioned this pull request Oct 24, 2019
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:masterOct 25, 2019
@varkor
varkor deleted the const-generics-forbid-non-structural_match branch January 2, 2020 11:53
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-const_generics`#![feature(const_generics)]`S-waiting-on-borsStatus: 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

@varkor@rust-highfive@petrochenkov@Centril@bors