Closed
Description
Code
fn foo(_: impl ?Sized + ?Sized) {}
fn main() {}
Current output
error[E0203]: type parameter has more than one relaxed default bound, only one is supported
--> a.rs:1:16
|
1 | fn foo(_: impl ?Sized + ?Sized) {}
| ^^^^^^ ^^^^^^
error[E0277]: the size for values of type `impl ?Sized + ?Sized` cannot be known at compilation time
--> a.rs:1:8
|
1 | fn foo(_: impl ?Sized + ?Sized) {}
| ^ -------------------- this type parameter needs to be `Sized`
| |
| doesn't have a size known at compile-time
|
= help: unsized fn params are gated as an unstable feature
help: consider restricting type parameters
|
1 - fn foo(_: impl ?Sized + ?Sized) {}
1 + fn foo(_: impl ) {}
|
help: function arguments must have a statically known size, borrowed types always have a known size
|
1 | fn foo(_: &impl ?Sized + ?Sized) {}
| +
error: aborting due to 2 previous
Desired output
No response
Rationale and extra context
No response
Other cases
No response
Rust Version
51917e2e69702e5752bce6a4f3bfd285d0f4ae39
Anything else?
I found the fn foo(_: impl ) {}
suggestion slightly amusing :)