1+ error: return type not allowed with return type notation
2+ --> $DIR/bad-inputs-and-output.rs:24:45
3+ |
4+ LL | fn bay_path<T: Trait>() where T::method(..) -> (): Send {}
5+ | ^^^^^
6+ |
7+ help: remove the return type
8+ |
9+ LL - fn bay_path<T: Trait>() where T::method(..) -> (): Send {}
10+ LL + fn bay_path<T: Trait>() where T::method(..): Send {}
11+ |
12+
113error[E0575]: expected associated type, found associated function `Trait::method`
2- --> $DIR/bad-inputs-and-output.rs:27 :36
14+ --> $DIR/bad-inputs-and-output.rs:30 :36
315 |
416LL | fn foo_qualified<T: Trait>() where <T as Trait>::method(i32): Send {}
517 | ^^^^^^^^^^^^^^^^^^^^^^^^^ not a associated type
618
719error[E0575]: expected associated type, found associated function `Trait::method`
8- --> $DIR/bad-inputs-and-output.rs:30 :36
20+ --> $DIR/bad-inputs-and-output.rs:33 :36
921 |
1022LL | fn bar_qualified<T: Trait>() where <T as Trait>::method() -> (): Send {}
1123 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a associated type
1224
1325error[E0575]: expected associated type, found associated function `Trait::method`
14- --> $DIR/bad-inputs-and-output.rs:33 :36
26+ --> $DIR/bad-inputs-and-output.rs:36 :36
1527 |
1628LL | fn baz_qualified<T: Trait>() where <T as Trait>::method(): Send {}
1729 | ^^^^^^^^^^^^^^^^^^^^^^ not a associated type
@@ -20,38 +32,72 @@ error: argument types not allowed with return type notation
2032 --> $DIR/bad-inputs-and-output.rs:9:23
2133 |
2234LL | fn foo<T: Trait<method(i32): Send>>() {}
23- | ^^^^^ help: remove the input types: `()`
35+ | ^^^^^
36+ |
37+ help: remove the input types
38+ |
39+ LL - fn foo<T: Trait<method(i32): Send>>() {}
40+ LL + fn foo<T: Trait<method(..): Send>>() {}
41+ |
2442
2543error: return type not allowed with return type notation
2644 --> $DIR/bad-inputs-and-output.rs:12:25
2745 |
2846LL | fn bar<T: Trait<method() -> (): Send>>() {}
29- | ^^^^^^ help: remove the return type
47+ | ^^^^^^
48+ |
49+ help: use the right argument notation and remove the return type
50+ |
51+ LL - fn bar<T: Trait<method() -> (): Send>>() {}
52+ LL + fn bar<T: Trait<method(..): Send>>() {}
53+ |
3054
3155error: return type notation arguments must be elided with `..`
3256 --> $DIR/bad-inputs-and-output.rs:15:23
3357 |
3458LL | fn baz<T: Trait<method(): Send>>() {}
35- | ^^ help: add `..`: `(..)`
59+ | ^^
60+ |
61+ help: use the correct syntax by adding `..` to the arguments
62+ |
63+ LL | fn baz<T: Trait<method(..): Send>>() {}
64+ | ++
3665
3766error: argument types not allowed with return type notation
3867 --> $DIR/bad-inputs-and-output.rs:18:40
3968 |
4069LL | fn foo_path<T: Trait>() where T::method(i32): Send {}
41- | ^^^^^ help: remove the input types: `()`
70+ | ^^^^^
71+ |
72+ help: remove the input types
73+ |
74+ LL - fn foo_path<T: Trait>() where T::method(i32): Send {}
75+ LL + fn foo_path<T: Trait>() where T::method(..): Send {}
76+ |
4277
4378error: return type not allowed with return type notation
4479 --> $DIR/bad-inputs-and-output.rs:21:42
4580 |
4681LL | fn bar_path<T: Trait>() where T::method() -> (): Send {}
47- | ^^^^^^ help: remove the return type
82+ | ^^^^^^
83+ |
84+ help: use the right argument notation and remove the return type
85+ |
86+ LL - fn bar_path<T: Trait>() where T::method() -> (): Send {}
87+ LL + fn bar_path<T: Trait>() where T::method(..): Send {}
88+ |
4889
4990error: return type notation arguments must be elided with `..`
50- --> $DIR/bad-inputs-and-output.rs:24 :40
91+ --> $DIR/bad-inputs-and-output.rs:27 :40
5192 |
5293LL | fn baz_path<T: Trait>() where T::method(): Send {}
53- | ^^ help: add `..`: `(..)`
94+ | ^^
95+ |
96+ help: use the correct syntax by adding `..` to the arguments
97+ |
98+ LL | fn baz_path<T: Trait>() where T::method(..): Send {}
99+ | ++
54100
55- error: aborting due to 9 previous errors
101+ error: aborting due to 10 previous errors
56102
57103For more information about this error, try `rustc --explain E0575`.
0 commit comments