2020-11-05 13:29:48 +00:00
|
|
|
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/crashes/ice-6251.rs:4:45
|
2020-11-05 13:29:48 +00:00
|
|
|
|
|
|
|
|
LL | fn bug<T>() -> impl Iterator<Item = [(); { |x: [u8]| x }]> {
|
|
|
|
| ^ doesn't have a size known at compile-time
|
|
|
|
|
|
|
|
|
= help: the trait `std::marker::Sized` is not implemented for `[u8]`
|
|
|
|
= help: unsized fn params are gated as an unstable feature
|
2023-12-20 19:13:24 +00:00
|
|
|
help: function arguments must have a statically known size, borrowed slices always have a known size
|
2020-11-05 13:29:48 +00:00
|
|
|
|
|
2021-04-18 17:35:23 +00:00
|
|
|
LL | fn bug<T>() -> impl Iterator<Item = [(); { |x: &[u8]| x }]> {
|
2021-08-11 14:21:33 +00:00
|
|
|
| +
|
2020-11-05 13:29:48 +00:00
|
|
|
|
|
|
|
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/crashes/ice-6251.rs:4:54
|
2020-11-05 13:29:48 +00:00
|
|
|
|
|
|
|
|
LL | fn bug<T>() -> impl Iterator<Item = [(); { |x: [u8]| x }]> {
|
2023-10-02 21:39:07 +00:00
|
|
|
| ^ doesn't have a size known at compile-time
|
2020-11-05 13:29:48 +00:00
|
|
|
|
|
|
|
|
= help: the trait `std::marker::Sized` is not implemented for `[u8]`
|
|
|
|
= note: the return type of a function must have a statically known size
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/crashes/ice-6251.rs:4:44
|
2020-11-05 13:29:48 +00:00
|
|
|
|
|
|
|
|
LL | fn bug<T>() -> impl Iterator<Item = [(); { |x: [u8]| x }]> {
|
|
|
|
| ^^^^^^^^^^^ expected `usize`, found closure
|
|
|
|
|
|
|
|
|
= note: expected type `usize`
|
2024-02-27 14:25:18 +00:00
|
|
|
found closure `{closure@tests/ui/crashes/ice-6251.rs:4:44: 4:53}`
|
2020-11-05 13:29:48 +00:00
|
|
|
|
2023-07-02 12:35:19 +00:00
|
|
|
error: aborting due to 3 previous errors
|
2020-11-05 13:29:48 +00:00
|
|
|
|
2023-07-02 12:35:19 +00:00
|
|
|
Some errors have detailed explanations: E0277, E0308.
|
2020-11-05 13:29:48 +00:00
|
|
|
For more information about an error, try `rustc --explain E0277`.
|