Skip to content

Conversation

Soveu
Copy link
Contributor

@Soveu Soveu commented Apr 16, 2021

This fixes a bug where builtin derive macros (like Clone, Debug) would basically copy-paste the default from a const generic, causing a compile error with very confusing message - it would say defaults are not allowed in impl blocks, while pointing at struct/enum/union definition.

@rust-highfive
Copy link
Contributor

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 Apr 16, 2021
@jyn514 jyn514 added A-const-generics Area: const generics (parameters and arguments) A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 16, 2021
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 16, 2021

📌 Commit 9ecfae4 has been approved by petrochenkov

@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 Apr 16, 2021
jyn514 pushed a commit to jyn514/rust that referenced this pull request Apr 16, 2021
…t, r=petrochenkov

Builtin derive macros: fix error with const generics default

This fixes a bug where builtin derive macros (like Clone, Debug) would basically copy-paste the default from a const generic, causing a compile error with very confusing message - it would say defaults are not allowed in impl blocks, while pointing at struct/enum/union definition.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Apr 17, 2021
…t, r=petrochenkov

Builtin derive macros: fix error with const generics default

This fixes a bug where builtin derive macros (like Clone, Debug) would basically copy-paste the default from a const generic, causing a compile error with very confusing message - it would say defaults are not allowed in impl blocks, while pointing at struct/enum/union definition.
@bors
Copy link
Collaborator

bors commented Apr 17, 2021

⌛ Testing commit 9ecfae4 with merge 57e28ef...

@bors
Copy link
Collaborator

bors commented Apr 17, 2021

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 57e28ef to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 17, 2021
@bors bors merged commit 57e28ef into rust-lang:master Apr 17, 2021
@rustbot rustbot added this to the 1.53.0 milestone Apr 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-generics Area: const generics (parameters and arguments) A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) 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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants