]>
Commit | Line | Data |
---|---|---|
dc9dc135 XL |
1 | warning: trait objects without an explicit `dyn` are deprecated |
2 | --> $DIR/trait-bounds-not-on-bare-trait.rs:7:12 | |
3 | | | |
4 | LL | 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 | 9 | error[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 | | |
12 | LL | 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 |
17 | help: function arguments must have a statically known size, borrowed types always have a known size |
18 | | | |
29967ef6 XL |
19 | LL | fn foo(&_x: Foo + Send) { |
20 | | ^ | |
b7449926 | 21 | |
ba9703b0 | 22 | error: aborting due to previous error; 1 warning emitted |
b7449926 XL |
23 | |
24 | For more information about this error, try `rustc --explain E0277`. |