2021-07-18 05:21:09 -05:00
|
|
|
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
|
2021-07-18 05:29:21 -05:00
|
|
|
--> $DIR/issue-87199.rs:10:12
|
2021-07-18 05:21:09 -05:00
|
|
|
|
|
|
|
|
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
|
2021-07-18 05:29:21 -05:00
|
|
|
--> $DIR/issue-87199.rs:12:13
|
2021-07-18 05:21:09 -05:00
|
|
|
|
|
|
|
|
LL | fn ret() -> impl Iterator<Item = ()> + ?Send { std::iter::empty() }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2021-07-18 05:29:21 -05:00
|
|
|
error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
|
|
|
|
--> $DIR/issue-87199.rs:18:22
|
2021-07-18 05:21:09 -05:00
|
|
|
|
|
2021-07-18 05:29:21 -05:00
|
|
|
LL | fn ref_arg<T: ?Send>(_: &T) {}
|
|
|
|
| - required by this bound in `ref_arg`
|
|
|
|
...
|
|
|
|
LL | ref_arg::<[i32]>(&[5]);
|
|
|
|
| ^^^^ doesn't have a size known at compile-time
|
2021-07-18 05:21:09 -05:00
|
|
|
|
|
2021-07-18 05:29:21 -05:00
|
|
|
= help: the trait `Sized` is not implemented for `[i32]`
|
|
|
|
help: consider relaxing the implicit `Sized` restriction
|
2021-07-18 05:21:09 -05:00
|
|
|
|
|
2021-07-18 05:29:21 -05:00
|
|
|
LL | fn ref_arg<T: ?Send + ?Sized>(_: &T) {}
|
2021-06-21 21:07:19 -05:00
|
|
|
| ++++++++
|
2021-07-18 05:21:09 -05:00
|
|
|
|
2021-07-18 05:29:21 -05:00
|
|
|
error: aborting due to previous error; 3 warnings emitted
|
2021-07-18 05:21:09 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|