diff --git a/src/connectivity/network/netstack3/core/ip/src/base.rs b/src/connectivity/network/netstack3/core/ip/src/base.rs index 05064b962f9..117fbf1f0a3 100644 --- a/src/connectivity/network/netstack3/core/ip/src/base.rs +++ b/src/connectivity/network/netstack3/core/ip/src/base.rs @@ -974,7 +974,7 @@ pub trait IpLayerIngressContext< I: IpLayerIpExt + IcmpHandlerIpExt, BC: IpLayerBindingsContext, >: - IpTransportDispatchContext + IpTransportDispatchContext> + IpDeviceStateContext + IpDeviceSendContext + IcmpErrorHandler @@ -983,20 +983,16 @@ pub trait IpLayerIngressContext< + FilterHandlerProvider + RawIpSocketHandler { - // This is working around the fact that currently, where clauses are only - // elaborated for supertraits, and not, for example, bounds on associated types - // as we have here. - // - // See https://github.com/rust-lang/rust/issues/20671#issuecomment-1905186183 - // for more discussion. - type DeviceId_: filter::InterfaceProperties + Debug; } impl< I: IpLayerIpExt + IcmpHandlerIpExt, BC: IpLayerBindingsContext, - CC: IpTransportDispatchContext - + IpDeviceStateContext + CC: IpTransportDispatchContext< + I, + BC, + DeviceId: filter::InterfaceProperties, + > + IpDeviceStateContext + IpDeviceSendContext + IcmpErrorHandler + IpLayerContext @@ -1004,36 +1000,26 @@ impl< + FilterHandlerProvider + RawIpSocketHandler, > IpLayerIngressContext for CC -where - Self::DeviceId: filter::InterfaceProperties, { - type DeviceId_ = Self::DeviceId; } /// A marker trait for all the contexts required for IP egress. pub(crate) trait IpLayerEgressContext: - IpDeviceSendContext + FilterHandlerProvider + IpDeviceSendContext> + + FilterHandlerProvider where I: IpLayerIpExt, BC: FilterBindingsContext, { - // This is working around the fact that currently, where clauses are only - // elaborated for supertraits, and not, for example, bounds on associated types - // as we have here. - // - // See https://github.com/rust-lang/rust/issues/20671#issuecomment-1905186183 - // for more discussion. - type DeviceId_: filter::InterfaceProperties + StrongDeviceIdentifier + Debug; } impl IpLayerEgressContext for CC where I: IpLayerIpExt, BC: FilterBindingsContext, - CC: IpDeviceSendContext + FilterHandlerProvider, - Self::DeviceId: filter::InterfaceProperties, + CC: IpDeviceSendContext> + + FilterHandlerProvider, { - type DeviceId_ = Self::DeviceId; } /// A builder for IPv4 state.