File: issue-87199.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (46 lines) | stat: -rw-r--r-- 1,822 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
  --> $DIR/issue-87199.rs:8:11
   |
LL | fn arg<T: ?Send>(_: T) {}
   |           ^^^^^

warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
  --> $DIR/issue-87199.rs:10:15
   |
LL | fn ref_arg<T: ?Send>(_: &T) {}
   |               ^^^^^

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() }
   |                                        ^^^^^

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`

error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
  --> $DIR/issue-87199.rs:19:15
   |
LL |     ref_arg::<[i32]>(&[5]);
   |               ^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[i32]`
note: required by an implicit `Sized` bound in `ref_arg`
  --> $DIR/issue-87199.rs:10:12
   |
LL | fn ref_arg<T: ?Send>(_: &T) {}
   |            ^ required by the implicit `Sized` requirement on this type parameter in `ref_arg`
help: consider relaxing the implicit `Sized` restriction
   |
LL | fn ref_arg<T: ?Send + ?Sized>(_: &T) {}
   |                     ++++++++

error: aborting due to 1 previous error; 4 warnings emitted

For more information about this error, try `rustc --explain E0277`.