]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-87199.stderr
Merge commit '9809f5d21990d9e24b3e9876ea7da756fd4e9def' into libgccjit-codegen
[rust.git] / src / test / ui / issues / issue-87199.stderr
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:10: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:12:13
15    |
16 LL | fn ret() -> impl Iterator<Item = ()> + ?Send { std::iter::empty() }
17    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
19 error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
20   --> $DIR/issue-87199.rs:18:22
21    |
22 LL | fn ref_arg<T: ?Send>(_: &T) {}
23    |            - required by this bound in `ref_arg`
24 ...
25 LL |     ref_arg::<[i32]>(&[5]);
26    |                      ^^^^ doesn't have a size known at compile-time
27    |
28    = help: the trait `Sized` is not implemented for `[i32]`
29 help: consider relaxing the implicit `Sized` restriction
30    |
31 LL | fn ref_arg<T: ?Send + ?Sized>(_: &T) {}
32    |                     ^^^^^^^^
33
34 error: aborting due to previous error; 3 warnings emitted
35
36 For more information about this error, try `rustc --explain E0277`.