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
+
1
13
error[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
3
15
|
4
16
LL | fn foo_qualified<T: Trait>() where <T as Trait>::method(i32): Send {}
5
17
| ^^^^^^^^^^^^^^^^^^^^^^^^^ not a associated type
6
18
7
19
error[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
9
21
|
10
22
LL | fn bar_qualified<T: Trait>() where <T as Trait>::method() -> (): Send {}
11
23
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a associated type
12
24
13
25
error[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
15
27
|
16
28
LL | fn baz_qualified<T: Trait>() where <T as Trait>::method(): Send {}
17
29
| ^^^^^^^^^^^^^^^^^^^^^^ not a associated type
@@ -20,38 +32,72 @@ error: argument types not allowed with return type notation
20
32
--> $DIR/bad-inputs-and-output.rs:9:23
21
33
|
22
34
LL | 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
+ |
24
42
25
43
error: return type not allowed with return type notation
26
44
--> $DIR/bad-inputs-and-output.rs:12:25
27
45
|
28
46
LL | 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
+ |
30
54
31
55
error: return type notation arguments must be elided with `..`
32
56
--> $DIR/bad-inputs-and-output.rs:15:23
33
57
|
34
58
LL | 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
+ | ++
36
65
37
66
error: argument types not allowed with return type notation
38
67
--> $DIR/bad-inputs-and-output.rs:18:40
39
68
|
40
69
LL | 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
+ |
42
77
43
78
error: return type not allowed with return type notation
44
79
--> $DIR/bad-inputs-and-output.rs:21:42
45
80
|
46
81
LL | 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
+ |
48
89
49
90
error: 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
51
92
|
52
93
LL | 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
+ | ++
54
100
55
- error: aborting due to 9 previous errors
101
+ error: aborting due to 10 previous errors
56
102
57
103
For more information about this error, try `rustc --explain E0575`.
0 commit comments