|
| 1 | +warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported |
| 2 | + --> $DIR/issue-87199.rs:8:8 |
| 3 | + | |
| 4 | +LL | fn arg<T: ?Send>(_: T) {} |
| 5 | + | ^ |
| 6 | + |
| 7 | +warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported |
| 8 | + --> $DIR/issue-87199.rs:11:12 |
| 9 | + | |
| 10 | +LL | fn ref_arg<T: ?Send>(_: &T) {} |
| 11 | + | ^ |
| 12 | + |
| 13 | +warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported |
| 14 | + --> $DIR/issue-87199.rs:13:13 |
| 15 | + | |
| 16 | +LL | fn ret() -> impl Iterator<Item = ()> + ?Send { std::iter::empty() } |
| 17 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 18 | + |
| 19 | +error[E0277]: the size for values of type `impl Iterator+?Sized` cannot be known at compilation time |
| 20 | + --> $DIR/issue-87199.rs:13:13 |
| 21 | + | |
| 22 | +LL | fn ret() -> impl Iterator<Item = ()> + ?Send { std::iter::empty() } |
| 23 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
| 24 | + | |
| 25 | + = help: the trait `Sized` is not implemented for `impl Iterator+?Sized` |
| 26 | + = note: the return type of a function must have a statically known size |
| 27 | + |
| 28 | +error[E0277]: the size for values of type `T` cannot be known at compilation time |
| 29 | + --> $DIR/issue-87199.rs:8:18 |
| 30 | + | |
| 31 | +LL | fn arg<T: ?Send>(_: T) {} |
| 32 | + | - ^ doesn't have a size known at compile-time |
| 33 | + | | |
| 34 | + | this type parameter needs to be `std::marker::Sized` |
| 35 | + | |
| 36 | + = help: unsized fn params are gated as an unstable feature |
| 37 | +help: function arguments must have a statically known size, borrowed types always have a known size |
| 38 | + | |
| 39 | +LL | fn arg<T: ?Send>(_: &T) {} |
| 40 | + | ^ |
| 41 | + |
| 42 | +error: aborting due to 2 previous errors; 3 warnings emitted |
| 43 | + |
| 44 | +For more information about this error, try `rustc --explain E0277`. |
0 commit comments