1 error[E0308]: mismatched types
2 --> $DIR/restrict-existing-type-bounds.rs:13:12
4 LL | impl<T: TryAdd> TryAdd for Option<T> {
5 | - this type parameter
8 | -- ^^^^ expected `Option<<T as TryAdd>::Output>`, found `Option<T>`
10 | arguments to this enum variant are incorrect
12 = note: expected enum `Option<<T as TryAdd>::Output>`
13 found enum `Option<T>`
14 help: the type constructed contains `Option<T>` due to the type of the argument passed
15 --> $DIR/restrict-existing-type-bounds.rs:13:9
20 | this argument influences the type of `Ok`
21 note: tuple variant defined here
22 --> $SRC_DIR/core/src/result.rs:LL:COL
23 help: consider further restricting this bound
25 LL | impl<T: TryAdd<Output = T>> TryAdd for Option<T> {
28 error[E0308]: mismatched types
29 --> $DIR/restrict-existing-type-bounds.rs:26:12
31 LL | impl<T: TryAdd<Error = X>> TryAdd for Other<T> {
32 | - this type parameter
35 | -- ^^^^ expected `Other<<T as TryAdd>::Output>`, found `Other<T>`
37 | arguments to this enum variant are incorrect
39 = note: expected struct `Other<<T as TryAdd>::Output>`
40 found struct `Other<T>`
41 help: the type constructed contains `Other<T>` due to the type of the argument passed
42 --> $DIR/restrict-existing-type-bounds.rs:26:9
47 | this argument influences the type of `Ok`
48 note: tuple variant defined here
49 --> $SRC_DIR/core/src/result.rs:LL:COL
50 help: consider further restricting this bound
52 LL | impl<T: TryAdd<Error = X, Output = T>> TryAdd for Other<T> {
55 error: aborting due to 2 previous errors
57 For more information about this error, try `rustc --explain E0308`.