|
| 1 | +error[E0391]: cycle detected when computing type of `<impl at $DIR/unknown-lifetime-ice-119827.rs:7:1: 7:26>` |
| 2 | + --> $DIR/unknown-lifetime-ice-119827.rs:7:1 |
| 3 | + | |
| 4 | +LL | impl Foo for Box<dyn Foo> {} |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | +note: ...which requires finding trait impls of `Foo`... |
| 8 | + --> $DIR/unknown-lifetime-ice-119827.rs:1:1 |
| 9 | + | |
| 10 | +LL | trait Foo { |
| 11 | + | ^^^^^^^^^ |
| 12 | + = note: ...which again requires computing type of `<impl at $DIR/unknown-lifetime-ice-119827.rs:7:1: 7:26>`, completing the cycle |
| 13 | +note: cycle used when collecting item types in top-level module |
| 14 | + --> $DIR/unknown-lifetime-ice-119827.rs:1:1 |
| 15 | + | |
| 16 | +LL | / trait Foo { |
| 17 | +LL | | type Context<'c> |
| 18 | +LL | | where |
| 19 | +LL | | Self: 'c; |
| 20 | +... | |
| 21 | +LL | | |
| 22 | +LL | | fn main() {} |
| 23 | + | |____________^ |
| 24 | + = 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 |
| 25 | + |
| 26 | +error[E0391]: cycle detected when computing type of `<impl at $DIR/unknown-lifetime-ice-119827.rs:7:1: 7:26>` |
| 27 | + --> $DIR/unknown-lifetime-ice-119827.rs:7:1 |
| 28 | + | |
| 29 | +LL | impl Foo for Box<dyn Foo> {} |
| 30 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 31 | + | |
| 32 | + = note: ...which immediately requires computing type of `<impl at $DIR/unknown-lifetime-ice-119827.rs:7:1: 7:26>` again |
| 33 | +note: cycle used when collecting item types in top-level module |
| 34 | + --> $DIR/unknown-lifetime-ice-119827.rs:1:1 |
| 35 | + | |
| 36 | +LL | / trait Foo { |
| 37 | +LL | | type Context<'c> |
| 38 | +LL | | where |
| 39 | +LL | | Self: 'c; |
| 40 | +... | |
| 41 | +LL | | |
| 42 | +LL | | fn main() {} |
| 43 | + | |____________^ |
| 44 | + = 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 |
| 45 | + |
| 46 | +error[E0391]: cycle detected when computing type of `<impl at $DIR/unknown-lifetime-ice-119827.rs:7:1: 7:26>` |
| 47 | + --> $DIR/unknown-lifetime-ice-119827.rs:7:1 |
| 48 | + | |
| 49 | +LL | impl Foo for Box<dyn Foo> {} |
| 50 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 51 | + | |
| 52 | + = note: ...which immediately requires computing type of `<impl at $DIR/unknown-lifetime-ice-119827.rs:7:1: 7:26>` again |
| 53 | +note: cycle used when collecting item types in top-level module |
| 54 | + --> $DIR/unknown-lifetime-ice-119827.rs:1:1 |
| 55 | + | |
| 56 | +LL | / trait Foo { |
| 57 | +LL | | type Context<'c> |
| 58 | +LL | | where |
| 59 | +LL | | Self: 'c; |
| 60 | +... | |
| 61 | +LL | | |
| 62 | +LL | | fn main() {} |
| 63 | + | |____________^ |
| 64 | + = 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 |
| 65 | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 66 | + |
| 67 | +error[E0038]: the trait `Foo` cannot be made into an object |
| 68 | + --> $DIR/unknown-lifetime-ice-119827.rs:7:22 |
| 69 | + | |
| 70 | +LL | impl Foo for Box<dyn Foo> {} |
| 71 | + | ^^^ `Foo` cannot be made into an object |
| 72 | + | |
| 73 | +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> |
| 74 | + --> $DIR/unknown-lifetime-ice-119827.rs:2:10 |
| 75 | + | |
| 76 | +LL | trait Foo { |
| 77 | + | --- this trait cannot be made into an object... |
| 78 | +LL | type Context<'c> |
| 79 | + | ^^^^^^^ ...because it contains the generic associated type `Context` |
| 80 | + = help: consider moving `Context` to another trait |
| 81 | + = help: only type `{type error}` implements the trait, consider using it directly instead |
| 82 | + |
| 83 | +error[E0277]: the trait bound `Box<(dyn Foo + 'static)>: Foo` is not satisfied |
| 84 | + --> $DIR/unknown-lifetime-ice-119827.rs:7:14 |
| 85 | + | |
| 86 | +LL | impl Foo for Box<dyn Foo> {} |
| 87 | + | ^^^^^^^^^^^^ the trait `Foo` is not implemented for `Box<(dyn Foo + 'static)>` |
| 88 | + | |
| 89 | + = help: the trait `Foo` is implemented for `Box<(dyn Foo + 'static)>` |
| 90 | + |
| 91 | +error[E0038]: the trait `Foo` cannot be made into an object |
| 92 | + --> $DIR/unknown-lifetime-ice-119827.rs:7:14 |
| 93 | + | |
| 94 | +LL | impl Foo for Box<dyn Foo> {} |
| 95 | + | ^^^^^^^^^^^^ `Foo` cannot be made into an object |
| 96 | + | |
| 97 | +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> |
| 98 | + --> $DIR/unknown-lifetime-ice-119827.rs:2:10 |
| 99 | + | |
| 100 | +LL | trait Foo { |
| 101 | + | --- this trait cannot be made into an object... |
| 102 | +LL | type Context<'c> |
| 103 | + | ^^^^^^^ ...because it contains the generic associated type `Context` |
| 104 | + = help: consider moving `Context` to another trait |
| 105 | + = help: only type `std::boxed::Box<(dyn Foo + 'static)>` implements the trait, consider using it directly instead |
| 106 | + |
| 107 | +error[E0046]: not all trait items implemented, missing: `Context` |
| 108 | + --> $DIR/unknown-lifetime-ice-119827.rs:7:1 |
| 109 | + | |
| 110 | +LL | type Context<'c> |
| 111 | + | ---------------- `Context` from trait |
| 112 | +... |
| 113 | +LL | impl Foo for Box<dyn Foo> {} |
| 114 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Context` in implementation |
| 115 | + |
| 116 | +error: aborting due to 7 previous errors |
| 117 | + |
| 118 | +Some errors have detailed explanations: E0038, E0046, E0277, E0391. |
| 119 | +For more information about an error, try `rustc --explain E0038`. |
0 commit comments