]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/impl-trait-plus-priority.stderr
Be more careful about unresolved exprs in suggestion
[rust.git] / src / test / ui / impl-trait / impl-trait-plus-priority.stderr
1 error: ambiguous `+` in a type
2   --> $DIR/impl-trait-plus-priority.rs:23:18
3    |
4 LL | type A = fn() -> impl A +;
5    |                  ^^^^^^^^ help: use parentheses to disambiguate: `(impl A)`
6
7 error: ambiguous `+` in a type
8   --> $DIR/impl-trait-plus-priority.rs:25:18
9    |
10 LL | type A = fn() -> impl A + B;
11    |                  ^^^^^^^^^^ help: use parentheses to disambiguate: `(impl A + B)`
12
13 error: ambiguous `+` in a type
14   --> $DIR/impl-trait-plus-priority.rs:27:18
15    |
16 LL | type A = fn() -> dyn A + B;
17    |                  ^^^^^^^^^ help: use parentheses to disambiguate: `(dyn A + B)`
18
19 error[E0178]: expected a path on the left-hand side of `+`, not `fn() -> A`
20   --> $DIR/impl-trait-plus-priority.rs:29:10
21    |
22 LL | type A = fn() -> A + B;
23    |          ^^^^^^^^^^^^^ perhaps you forgot parentheses?
24
25 error: ambiguous `+` in a type
26   --> $DIR/impl-trait-plus-priority.rs:32:18
27    |
28 LL | type A = Fn() -> impl A +;
29    |                  ^^^^^^^^ help: use parentheses to disambiguate: `(impl A)`
30
31 error: ambiguous `+` in a type
32   --> $DIR/impl-trait-plus-priority.rs:34:18
33    |
34 LL | type A = Fn() -> impl A + B;
35    |                  ^^^^^^^^^^ help: use parentheses to disambiguate: `(impl A + B)`
36
37 error: ambiguous `+` in a type
38   --> $DIR/impl-trait-plus-priority.rs:36:18
39    |
40 LL | type A = Fn() -> dyn A + B;
41    |                  ^^^^^^^^^ help: use parentheses to disambiguate: `(dyn A + B)`
42
43 error: ambiguous `+` in a type
44   --> $DIR/impl-trait-plus-priority.rs:40:11
45    |
46 LL | type A = &impl A +;
47    |           ^^^^^^^^ help: use parentheses to disambiguate: `(impl A)`
48
49 error: ambiguous `+` in a type
50   --> $DIR/impl-trait-plus-priority.rs:42:11
51    |
52 LL | type A = &impl A + B;
53    |           ^^^^^^^^^^ help: use parentheses to disambiguate: `(impl A + B)`
54
55 error: ambiguous `+` in a type
56   --> $DIR/impl-trait-plus-priority.rs:44:11
57    |
58 LL | type A = &dyn A + B;
59    |           ^^^^^^^^^ help: use parentheses to disambiguate: `(dyn A + B)`
60
61 error[E0178]: expected a path on the left-hand side of `+`, not `&A`
62   --> $DIR/impl-trait-plus-priority.rs:46:10
63    |
64 LL | type A = &A + B;
65    |          ^^^^^^ help: try adding parentheses: `&(A + B)`
66
67 error: aborting due to 11 previous errors
68
69 For more information about this error, try `rustc --explain E0178`.