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
(playground)
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;
Hi,
I've got following code:
... that returns:
(playground)
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;