2023-10-30 17:47:07 +00:00
|
|
|
warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
|
|
|
|
--> $DIR/issue-87199.rs:8:11
|
2021-07-18 10:21:09 +00:00
|
|
|
|
|
|
|
|
LL | fn arg<T: ?Send>(_: T) {}
|
2023-10-30 17:47:07 +00:00
|
|
|
| ^^^^^
|
2021-07-18 10:21:09 +00:00
|
|
|
|
2023-10-30 17:47:07 +00:00
|
|
|
warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
|
|
|
|
--> $DIR/issue-87199.rs:10:15
|
2021-07-18 10:21:09 +00:00
|
|
|
|
|
|
|
|
LL | fn ref_arg<T: ?Send>(_: &T) {}
|
2023-10-30 17:47:07 +00:00
|
|
|
| ^^^^^
|
2021-07-18 10:21:09 +00:00
|
|
|
|
2023-10-30 17:47:07 +00:00
|
|
|
warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
|
|
|
|
--> $DIR/issue-87199.rs:12:40
|
2021-07-18 10:21:09 +00:00
|
|
|
|
|
|
|
|
LL | fn ret() -> impl Iterator<Item = ()> + ?Send { std::iter::empty() }
|
2023-10-30 17:47:07 +00:00
|
|
|
| ^^^^^
|
2021-07-18 10:21:09 +00:00
|
|
|
|
2024-03-20 16:52:54 +00:00
|
|
|
warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
|
|
|
|
--> $DIR/issue-87199.rs:12:40
|
|
|
|
|
|
|
|
|
LL | fn ret() -> impl Iterator<Item = ()> + ?Send { std::iter::empty() }
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
|
2021-07-18 10:29:21 +00:00
|
|
|
error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
|
2024-03-20 16:52:54 +00:00
|
|
|
--> $DIR/issue-87199.rs:19:15
|
2021-07-18 10:21:09 +00:00
|
|
|
|
|
2021-07-18 10:29:21 +00:00
|
|
|
LL | ref_arg::<[i32]>(&[5]);
|
2023-08-24 19:23:06 +00:00
|
|
|
| ^^^^^ doesn't have a size known at compile-time
|
2021-07-18 10:21:09 +00:00
|
|
|
|
|
2021-07-18 10:29:21 +00:00
|
|
|
= help: the trait `Sized` is not implemented for `[i32]`
|
2024-01-24 21:29:15 +00:00
|
|
|
note: required by an implicit `Sized` bound in `ref_arg`
|
2021-07-31 16:26:55 +00:00
|
|
|
--> $DIR/issue-87199.rs:10:12
|
|
|
|
|
|
|
|
|
LL | fn ref_arg<T: ?Send>(_: &T) {}
|
2024-01-30 19:47:45 +00:00
|
|
|
| ^ required by the implicit `Sized` requirement on this type parameter in `ref_arg`
|
2021-07-18 10:29:21 +00:00
|
|
|
help: consider relaxing the implicit `Sized` restriction
|
2021-07-18 10:21:09 +00:00
|
|
|
|
|
2021-07-18 10:29:21 +00:00
|
|
|
LL | fn ref_arg<T: ?Send + ?Sized>(_: &T) {}
|
2021-06-22 02:07:19 +00:00
|
|
|
| ++++++++
|
2021-07-18 10:21:09 +00:00
|
|
|
|
2024-03-20 16:52:54 +00:00
|
|
|
error: aborting due to 1 previous error; 4 warnings emitted
|
2021-07-18 10:21:09 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|