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

Clean up E0741 error explanation #74977

Merged
merged 1 commit into from
Aug 1, 2020
Merged

Conversation

GuillaumeGomez
Copy link
Member

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 31, 2020
@@ -9,12 +10,15 @@ struct A;
struct B<const X: A>; // error!
```

To fix this example, we derive `PartialEq` and `Eq`.
Only structural-match types (that is, types that derive `PartialEq` and `Eq`)
may be used as the types of const generic parameters.
Copy link
Contributor

@pickfire pickfire Aug 1, 2020

Choose a reason for hiding this comment

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

Suggested change
may be used as the types of const generic parameters.
may be used as the type of const generic parameters.

Is using type here more correct?

Or maybe we can change the wording a bit.

Const generic parameters must be structural-match types (types that derive PartialEq and Eq).

Not sure if must be is the right wording. Or maybe must be structural matchable (...)?

Copy link
Member Author

Choose a reason for hiding this comment

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

I *think* the current wording is correct. It's actually hard to phrase it haha.

Copy link
Contributor

@pickfire pickfire left a comment

Choose a reason for hiding this comment

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

Looks weird to me.

@GuillaumeGomez
Copy link
Member Author

@bors: r=pickfire rollup

@bors
Copy link
Contributor

bors commented Aug 1, 2020

📌 Commit 1a6730e has been approved by pickfire

@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 Aug 1, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 1, 2020
…arth

Rollup of 6 pull requests

Successful merges:

 - rust-lang#74977 (Clean up E0741 error explanation)
 - rust-lang#74981 (Some fixes for `plugin.md` in unstable-book)
 - rust-lang#74983 (Replace a recursive algorithm with an iterative one and a stack.)
 - rust-lang#74995 (Update the WASI libc build to LLVM 10.)
 - rust-lang#74996 (submodules: update cargo from 974eb438d to 2d5c2381e)
 - rust-lang#75007 (Clean up E0743 explanation)

Failed merges:

r? @ghost
@bors bors merged commit 60bf83d into rust-lang:master Aug 1, 2020
@GuillaumeGomez GuillaumeGomez deleted the cleanup-e0741 branch August 1, 2020 20:50
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

6 participants