1 error: ambiguous `+` in a type
2 --> $DIR/impl-trait-plus-priority.rs:23:18
4 LL | type A = fn() -> impl A +;
5 | ^^^^^^^^ help: use parentheses to disambiguate: `(impl A)`
7 error: ambiguous `+` in a type
8 --> $DIR/impl-trait-plus-priority.rs:25:18
10 LL | type A = fn() -> impl A + B;
11 | ^^^^^^^^^^ help: use parentheses to disambiguate: `(impl A + B)`
13 error: ambiguous `+` in a type
14 --> $DIR/impl-trait-plus-priority.rs:27:18
16 LL | type A = fn() -> dyn A + B;
17 | ^^^^^^^^^ help: use parentheses to disambiguate: `(dyn A + B)`
19 error[E0178]: expected a path on the left-hand side of `+`, not `fn() -> A`
20 --> $DIR/impl-trait-plus-priority.rs:29:10
22 LL | type A = fn() -> A + B;
23 | ^^^^^^^^^^^^^ perhaps you forgot parentheses?
25 error: ambiguous `+` in a type
26 --> $DIR/impl-trait-plus-priority.rs:32:18
28 LL | type A = Fn() -> impl A +;
29 | ^^^^^^^^ help: use parentheses to disambiguate: `(impl A)`
31 error: ambiguous `+` in a type
32 --> $DIR/impl-trait-plus-priority.rs:34:18
34 LL | type A = Fn() -> impl A + B;
35 | ^^^^^^^^^^ help: use parentheses to disambiguate: `(impl A + B)`
37 error: ambiguous `+` in a type
38 --> $DIR/impl-trait-plus-priority.rs:36:18
40 LL | type A = Fn() -> dyn A + B;
41 | ^^^^^^^^^ help: use parentheses to disambiguate: `(dyn A + B)`
43 error: ambiguous `+` in a type
44 --> $DIR/impl-trait-plus-priority.rs:40:11
46 LL | type A = &impl A +;
47 | ^^^^^^^^ help: use parentheses to disambiguate: `(impl A)`
49 error: ambiguous `+` in a type
50 --> $DIR/impl-trait-plus-priority.rs:42:11
52 LL | type A = &impl A + B;
53 | ^^^^^^^^^^ help: use parentheses to disambiguate: `(impl A + B)`
55 error: ambiguous `+` in a type
56 --> $DIR/impl-trait-plus-priority.rs:44:11
58 LL | type A = &dyn A + B;
59 | ^^^^^^^^^ help: use parentheses to disambiguate: `(dyn A + B)`
61 error[E0178]: expected a path on the left-hand side of `+`, not `&A`
62 --> $DIR/impl-trait-plus-priority.rs:46:10
65 | ^^^^^^ help: try adding parentheses: `&(A + B)`
67 error: aborting due to 11 previous errors
69 For more information about this error, try `rustc --explain E0178`.