1
Fork 0
rust/src/test/ui/issues/issue-87199.stderr

45 lines
1.8 KiB
Text
Raw Normal View History

warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported
--> $DIR/issue-87199.rs:8:8
|
LL | fn arg<T: ?Send>(_: T) {}
| ^
warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported
--> $DIR/issue-87199.rs:11:12
|
LL | fn ref_arg<T: ?Send>(_: &T) {}
| ^
warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported
--> $DIR/issue-87199.rs:13:13
|
LL | fn ret() -> impl Iterator<Item = ()> + ?Send { std::iter::empty() }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the size for values of type `impl Iterator+?Sized` cannot be known at compilation time
--> $DIR/issue-87199.rs:13:13
|
LL | fn ret() -> impl Iterator<Item = ()> + ?Send { std::iter::empty() }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `impl Iterator+?Sized`
= note: the return type of a function must have a statically known size
error[E0277]: the size for values of type `T` cannot be known at compilation time
--> $DIR/issue-87199.rs:8:18
|
LL | fn arg<T: ?Send>(_: T) {}
| - ^ doesn't have a size known at compile-time
| |
| this type parameter needs to be `std::marker::Sized`
|
= help: unsized fn params are gated as an unstable feature
help: function arguments must have a statically known size, borrowed types always have a known size
|
LL | fn arg<T: ?Send>(_: &T) {}
| ^
error: aborting due to 2 previous errors; 3 warnings emitted
For more information about this error, try `rustc --explain E0277`.