fork/rust

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

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

master
800 B18 linesraw
1error[E0746]: return type cannot have an unboxed trait object
2  --> $DIR/issue-91803.rs:3:43
3   |
4LL | fn or<'a>(first: &'static dyn Foo<'a>) -> dyn Foo<'a> {
5   |                                           ^^^^^^^^^^^ doesn't have a size known at compile-time
6   |
7help: return an `impl Trait` instead of a `dyn Trait`, if all returned values are the same type
8   |
9LL | fn or<'a>(first: &'static dyn Foo<'a>) -> impl Foo<'a> {
10   |                                           ~~~~
11help: box the return type, and wrap all of the returned values in `Box::new`
12   |
13LL | fn or<'a>(first: &'static dyn Foo<'a>) -> Box<dyn Foo<'a>> {
14   |                                           ++++           +
15
16error: aborting due to previous error
17
18For more information about this error, try `rustc --explain E0746`.