-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
I tried this code:
struct Foo<T = i32>(&'static T);
I expected to see this happen:
help: consider adding an explicit lifetime bound
|
1 | struct Foo<T: 'static = i32>(&'static T);
| +++++++++
Instead, this happened:
help: consider adding an explicit lifetime bound
|
1 | struct Foo<T = i32: 'static>(&'static T);
| +++++++++
is syntax error
Meta
(rust playground version):
1.80.0-nightly
(2024-05-05 9c9b568792ef20d8459c)
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
Rollup merge of rust-lang#124884 - bvanjoi:fix-124785, r=estebank
Rollup merge of rust-lang#124884 - bvanjoi:fix-124785, r=estebank
Unrolled build for rust-lang#124884