]> git.proxmox.com Git - rustc.git/blame - src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / traits / trait-bounds-not-on-bare-trait.stderr
CommitLineData
dc9dc135
XL
1warning: trait objects without an explicit `dyn` are deprecated
2 --> $DIR/trait-bounds-not-on-bare-trait.rs:7:12
3 |
4LL | fn foo(_x: Foo + Send) {
5 | ^^^^^^^^^^ help: use `dyn`: `dyn Foo + Send`
6 |
416331ca 7 = note: `#[warn(bare_trait_objects)]` on by default
dc9dc135 8
1b1a35ee 9error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be known at compilation time
0731742a 10 --> $DIR/trait-bounds-not-on-bare-trait.rs:7:8
b7449926
XL
11 |
12LL | fn foo(_x: Foo + Send) {
13 | ^^ doesn't have a size known at compile-time
14 |
1b1a35ee 15 = help: the trait `Sized` is not implemented for `(dyn Foo + Send + 'static)`
29967ef6 16 = help: unsized fn params are gated as an unstable feature
3dfed10e
XL
17help: function arguments must have a statically known size, borrowed types always have a known size
18 |
29967ef6
XL
19LL | fn foo(&_x: Foo + Send) {
20 | ^
b7449926 21
ba9703b0 22error: aborting due to previous error; 1 warning emitted
b7449926
XL
23
24For more information about this error, try `rustc --explain E0277`.