| error[E0391]: cycle detected when computing type of `<impl at $DIR/unknown-lifetime-ice-119827.rs:7:1: 7:26>` |
| --> $DIR/unknown-lifetime-ice-119827.rs:7:1 |
| | |
| LL | impl Foo for Box<dyn Foo> {} |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| | |
| note: ...which requires finding trait impls of `Foo`... |
| --> $DIR/unknown-lifetime-ice-119827.rs:1:1 |
| | |
| LL | trait Foo { |
| | ^^^^^^^^^ |
| = note: ...which again requires computing type of `<impl at $DIR/unknown-lifetime-ice-119827.rs:7:1: 7:26>`, completing the cycle |
| note: cycle used when collecting item types in top-level module |
| --> $DIR/unknown-lifetime-ice-119827.rs:1:1 |
| | |
| LL | / trait Foo { |
| LL | | type Context<'c> |
| LL | | where |
| LL | | Self: 'c; |
| ... | |
| LL | | |
| LL | | fn main() {} |
| | |____________^ |
| = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information |
| |
| error[E0391]: cycle detected when computing type of `<impl at $DIR/unknown-lifetime-ice-119827.rs:7:1: 7:26>` |
| --> $DIR/unknown-lifetime-ice-119827.rs:7:1 |
| | |
| LL | impl Foo for Box<dyn Foo> {} |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| | |
| = note: ...which immediately requires computing type of `<impl at $DIR/unknown-lifetime-ice-119827.rs:7:1: 7:26>` again |
| note: cycle used when collecting item types in top-level module |
| --> $DIR/unknown-lifetime-ice-119827.rs:1:1 |
| | |
| LL | / trait Foo { |
| LL | | type Context<'c> |
| LL | | where |
| LL | | Self: 'c; |
| ... | |
| LL | | |
| LL | | fn main() {} |
| | |____________^ |
| = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information |
| |
| error[E0391]: cycle detected when computing type of `<impl at $DIR/unknown-lifetime-ice-119827.rs:7:1: 7:26>` |
| --> $DIR/unknown-lifetime-ice-119827.rs:7:1 |
| | |
| LL | impl Foo for Box<dyn Foo> {} |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| | |
| = note: ...which immediately requires computing type of `<impl at $DIR/unknown-lifetime-ice-119827.rs:7:1: 7:26>` again |
| note: cycle used when collecting item types in top-level module |
| --> $DIR/unknown-lifetime-ice-119827.rs:1:1 |
| | |
| LL | / trait Foo { |
| LL | | type Context<'c> |
| LL | | where |
| LL | | Self: 'c; |
| ... | |
| LL | | |
| LL | | fn main() {} |
| | |____________^ |
| = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information |
| = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| |
| error[E0038]: the trait `Foo` cannot be made into an object |
| --> $DIR/unknown-lifetime-ice-119827.rs:7:22 |
| | |
| LL | impl Foo for Box<dyn Foo> {} |
| | ^^^ `Foo` cannot be made into an object |
| | |
| note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety> |
| --> $DIR/unknown-lifetime-ice-119827.rs:2:10 |
| | |
| LL | trait Foo { |
| | --- this trait cannot be made into an object... |
| LL | type Context<'c> |
| | ^^^^^^^ ...because it contains the generic associated type `Context` |
| = help: consider moving `Context` to another trait |
| = help: only type `{type error}` implements the trait, consider using it directly instead |
| |
| error[E0277]: the trait bound `Box<(dyn Foo + 'static)>: Foo` is not satisfied |
| --> $DIR/unknown-lifetime-ice-119827.rs:7:14 |
| | |
| LL | impl Foo for Box<dyn Foo> {} |
| | ^^^^^^^^^^^^ the trait `Foo` is not implemented for `Box<(dyn Foo + 'static)>` |
| | |
| = help: the trait `Foo` is implemented for `Box<(dyn Foo + 'static)>` |
| |
| error[E0038]: the trait `Foo` cannot be made into an object |
| --> $DIR/unknown-lifetime-ice-119827.rs:7:14 |
| | |
| LL | impl Foo for Box<dyn Foo> {} |
| | ^^^^^^^^^^^^ `Foo` cannot be made into an object |
| | |
| note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety> |
| --> $DIR/unknown-lifetime-ice-119827.rs:2:10 |
| | |
| LL | trait Foo { |
| | --- this trait cannot be made into an object... |
| LL | type Context<'c> |
| | ^^^^^^^ ...because it contains the generic associated type `Context` |
| = help: consider moving `Context` to another trait |
| = help: only type `std::boxed::Box<(dyn Foo + 'static)>` implements the trait, consider using it directly instead |
| |
| error[E0046]: not all trait items implemented, missing: `Context` |
| --> $DIR/unknown-lifetime-ice-119827.rs:7:1 |
| | |
| LL | type Context<'c> |
| | ---------------- `Context` from trait |
| ... |
| LL | impl Foo for Box<dyn Foo> {} |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Context` in implementation |
| |
| error: aborting due to 7 previous errors |
| |
| Some errors have detailed explanations: E0038, E0046, E0277, E0391. |
| For more information about an error, try `rustc --explain E0038`. |