You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0277]: the trait bound `L: __tracing_subscriber_Layer<Registry>` is not satisfied --> src/main.rs:17:15
|
17 | .with(extra)
| ---- ^^^^^ the trait `__tracing_subscriber_Layer<Registry>` is not implemented for `L`
| |
| required by a bound introduced by this call
|
note: required by a bound in `with`
--> /home/lucas/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-subscriber-0.3.16/src/layer/mod.rs:1485:12
|
1485 | L: Layer<Self>,
| ^^^^^^^^^^^ required by this bound in `with`
help: consider further restricting this bound
|
8 | L: Layer<S> + tracing_subscriber::Layer<tracing_subscriber::Registry>,
| +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
But if I add the suggested bound
- L: Layer<S>,+ L: Layer<S> + Layer<Registry>,
init has trait bound issues
error[E0599]: the method `init` exists for struct `Layered<L, Registry>`, but its trait bounds were not satisfied
--> src/main.rs:19:10
|
19 | .init();
| ^^^^ method cannot be called on `Layered<L, Registry>` due to unsatisfied trait bounds
|
::: /home/lucas/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-subscriber-0.3.16/src/layer/layered.rs:22:1
|
22 | pub struct Layered<L, I, S = I> {
| -------------------------------
| |
| doesn't satisfy `Layered<L, Registry>: Into<Dispatch>`
| doesn't satisfy `Layered<L, Registry>: SubscriberInitExt`
|
= note: the following trait bounds were not satisfied:
`Layered<L, Registry>: Into<Dispatch>`
which is required by `Layered<L, Registry>: SubscriberInitExt`
`&Layered<L, Registry>: Into<Dispatch>`
which is required by `&Layered<L, Registry>: SubscriberInitExt`
`&mut Layered<L, Registry>: Into<Dispatch>`
which is required by `&mut Layered<L, Registry>: SubscriberInitExt`
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Using the same signature as the
Layer
trait:yields
But if I add the suggested bound
init
has trait bound issuesBeta Was this translation helpful? Give feedback.
All reactions