blob: d227c8778fe58bf4ba9d1674ee25be4be97fb50c [file] [log] [blame]
error[E0228]: the lifetime bound for this object type cannot be deduced from context; please supply an explicit bound
--> $DIR/object-lifetime-default-dyn-binding-nonstatic3.rs:16:36
|
LL | fn bar(x: &str) -> &dyn Foo<Item = dyn Bar> { &() }
| ^^^^^^^
error[E0277]: the trait bound `(): Foo<'_>` is not satisfied
--> $DIR/object-lifetime-default-dyn-binding-nonstatic3.rs:16:47
|
LL | fn bar(x: &str) -> &dyn Foo<Item = dyn Bar> { &() }
| ^^^ the trait `Foo<'_>` is not implemented for `()`
|
help: this trait has no implementations, consider adding one
--> $DIR/object-lifetime-default-dyn-binding-nonstatic3.rs:4:1
|
LL | trait Foo<'a> {
| ^^^^^^^^^^^^^
= note: required for the cast from `&()` to `&dyn Foo<'_, Item = dyn Bar>`
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0228, E0277.
For more information about an error, try `rustc --explain E0228`.