-
Notifications
You must be signed in to change notification settings - Fork 14k
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
Hi,
I've got following code:
fn foo1<T: ?Sized>(_: T) {
// here be dragons
}
fn foo2<T>(_: T) where T: ?Sized {
// here be dragons
}... that returns:
error[E0277]: the size for values of type `T` cannot be known at compilation time
--> src/lib.rs:1:26
|
1 | fn foo1<T: ?Sized>(_: T) {
| -- ^ doesn't have a size known at compile-time
error[E0277]: the size for values of type `T` cannot be known at compilation time
--> src/lib.rs:5:18
|
5 | fn foo2<T>(_: T) where T: ?Sized {
| ^ - help: consider further restricting type parameter `T`: `, T: std::marker::Sized`
| |
| doesn't have a size known at compile-time
In both cases the tip points at the very next token after the parameter list, instead of the underscore. Additionally, the foo2's help message (consider further restricting ...) has broken formatting.
I'd like to fix this myself, if only you'd give me a hint where to look :-)
Thanks;
hellow554
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.