]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/restrict-existing-type-bounds.stderr
Rollup merge of #107700 - jyn514:tools-builder, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / restrict-existing-type-bounds.stderr
1 error[E0308]: mismatched types
2   --> $DIR/restrict-existing-type-bounds.rs:13:12
3    |
4 LL | impl<T: TryAdd> TryAdd for Option<T> {
5    |      - this type parameter
6 ...
7 LL |         Ok(self)
8    |         -- ^^^^ expected `Option<<T as TryAdd>::Output>`, found `Option<T>`
9    |         |
10    |         arguments to this enum variant are incorrect
11    |
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
16    |
17 LL |         Ok(self)
18    |         ^^^----^
19    |            |
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
24    |
25 LL | impl<T: TryAdd<Output = T>> TryAdd for Option<T> {
26    |               ++++++++++++
27
28 error[E0308]: mismatched types
29   --> $DIR/restrict-existing-type-bounds.rs:26:12
30    |
31 LL | impl<T: TryAdd<Error = X>> TryAdd for Other<T> {
32    |      - this type parameter
33 ...
34 LL |         Ok(self)
35    |         -- ^^^^ expected `Other<<T as TryAdd>::Output>`, found `Other<T>`
36    |         |
37    |         arguments to this enum variant are incorrect
38    |
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
43    |
44 LL |         Ok(self)
45    |         ^^^----^
46    |            |
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
51    |
52 LL | impl<T: TryAdd<Error = X, Output = T>> TryAdd for Other<T> {
53    |                         ++++++++++++
54
55 error: aborting due to 2 previous errors
56
57 For more information about this error, try `rustc --explain E0308`.