fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.5 KiB38 linesraw
1warning: 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   |
4LL | fn arg<T: ?Send>(_: T) {}
5   |        ^
6
7warning: 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   |
10LL | fn ref_arg<T: ?Send>(_: &T) {}
11   |            ^
12
13warning: 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   |
16LL | fn ret() -> impl Iterator<Item = ()> + ?Send { std::iter::empty() }
17   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
19error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
20  --> $DIR/issue-87199.rs:18:15
21   |
22LL |     ref_arg::<[i32]>(&[5]);
23   |               ^^^^^ doesn't have a size known at compile-time
24   |
25   = help: the trait `Sized` is not implemented for `[i32]`
26note: required by a bound in `ref_arg`
27  --> $DIR/issue-87199.rs:10:12
28   |
29LL | fn ref_arg<T: ?Send>(_: &T) {}
30   |            ^ required by this bound in `ref_arg`
31help: consider relaxing the implicit `Sized` restriction
32   |
33LL | fn ref_arg<T: ?Send + ?Sized>(_: &T) {}
34   |                     ++++++++
35
36error: aborting due to previous error; 3 warnings emitted
37
38For more information about this error, try `rustc --explain E0277`.