fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0277]: the size for values of type `impl Iterator<Item = i32> + ?Sized` cannot be known at compilation time 2 --> $DIR/apit-unsized.rs:1:8 3 | 4LL | fn foo(_: impl Iterator<Item = i32> + ?Sized) {} 5 | ^ ---------------------------------- this type parameter needs to be `Sized` 6 | | 7 | doesn't have a size known at compile-time 8 | 9 = help: unsized fn params are gated as an unstable feature 10help: consider removing the `?Sized` bound to make the type parameter `Sized` 11 | 12LL - fn foo(_: impl Iterator<Item = i32> + ?Sized) {} 13LL + fn foo(_: impl Iterator<Item = i32>) {} 14 | 15help: function arguments must have a statically known size, borrowed types always have a known size 16 | 17LL | fn foo(_: &impl Iterator<Item = i32> + ?Sized) {} 18 | + 19 20error[E0277]: the size for values of type `impl ?Sized` cannot be known at compilation time 21 --> $DIR/apit-unsized.rs:2:8 22 | 23LL | fn bar(_: impl ?Sized) {} 24 | ^ ----------- this type parameter needs to be `Sized` 25 | | 26 | doesn't have a size known at compile-time 27 | 28 = help: unsized fn params are gated as an unstable feature 29help: consider replacing `?Sized` with `Sized` 30 | 31LL - fn bar(_: impl ?Sized) {} 32LL + fn bar(_: impl Sized) {} 33 | 34help: function arguments must have a statically known size, borrowed types always have a known size 35 | 36LL | fn bar(_: &impl ?Sized) {} 37 | + 38 39error: aborting due to 2 previous errors 40 41For more information about this error, try `rustc --explain E0277`.