-
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.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
Hii! 👋
Given the following code:
struct Wrapper<T>(T);
fn foo<T>(foo: Wrapper<T>)
where
T: ?Sized
{
//
}
The current output is (there are more messages, but focusing on the only problematic one):
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
|
The suggestion works correctly when the bound is represented as fn foo<T: ?Sized>
:
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
3 - fn foo<T: ?Sized>(foo: Wrapper<T>) {
3 + fn foo<T>(foo: Wrapper<T>) {
|
Checked on current stable, beta & nightly.
matthiaskrgr, ChayimFriedman2, compiler-errors and Kobzol
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.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.