fork/rust

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

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
1013 B22 linesraw
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   |
7   = note: `#[warn(bare_trait_objects)]` on by default
8
9error[E0277]: the size for values of type `(dyn Foo + std::marker::Send + 'static)` cannot be known at compilation time
10  --> $DIR/trait-bounds-not-on-bare-trait.rs:7:8
11   |
12LL | fn foo(_x: Foo + Send) {
13   |        ^^ doesn't have a size known at compile-time
14   |
15   = help: the trait `std::marker::Sized` is not implemented for `(dyn Foo + std::marker::Send + 'static)`
16   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
17   = note: all local variables must have a statically known size
18   = help: unsized locals are gated as an unstable feature
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0277`.