1 error[E0277]: cannot add `<T as SubEncoder>::ActualSize` to `<T as SubEncoder>::ActualSize`
2 --> $DIR/issue-54108.rs:19:17
4 LL | type Size = <Self as SubEncoder>::ActualSize;
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `<T as SubEncoder>::ActualSize + <T as SubEncoder>::ActualSize`
7 = help: the trait `Add` is not implemented for `<T as SubEncoder>::ActualSize`
8 note: required by a bound in `Encoder::Size`
9 --> $DIR/issue-54108.rs:4:16
11 LL | type Size: Add<Output = Self::Size>;
12 | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Encoder::Size`
13 help: consider further restricting the associated type
15 LL | T: SubEncoder, <T as SubEncoder>::ActualSize: Add
16 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 error: aborting due to previous error
20 For more information about this error, try `rustc --explain E0277`.