Esteban Küber
adb5ecabdb
Tweak invalid RTN errors
Make suggestions verbose.
When encountering `method(type)` bound, suggest `method(..)` instead of `method()`.
```
error: argument types not allowed with return type notation
--> $DIR/bad-inputs-and-output.rs:9:23
|
LL | fn foo<T: Trait<method(i32): Send>>() {}
| ^^^^^
|
help: remove the input types
|
LL - fn foo<T: Trait<method(i32): Send>>() {}
LL + fn foo<T: Trait<method(..): Send>>() {}
|
```
When encountering both return type and arg list that isn't `..`, suggest replacing both.
```
error: return type not allowed with return type notation
--> $DIR/bad-inputs-and-output.rs:12:25
|
LL | fn bar<T: Trait<method() -> (): Send>>() {}
| ^^^^^^
|
help: use the right argument notation and remove the return type
|
LL - fn bar<T: Trait<method() -> (): Send>>() {}
LL + fn bar<T: Trait<method(..): Send>>() {}
|
```
When encountering a return type, suggest removing it including the leading whitespace.
```
error: return type not allowed with return type notation
--> $DIR/bad-inputs-and-output.rs:24:45
|
LL | fn bay_path<T: Trait>() where T::method(..) -> (): Send {}
| ^^^^^
|
help: remove the return type
|
LL - fn bay_path<T: Trait>() where T::method(..) -> (): Send {}
LL + fn bay_path<T: Trait>() where T::method(..): Send {}
|
```
2025-02-28 21:18:53 +00:00
..
2024-12-18 13:38:53 +11:00
2025-01-08 21:26:39 +01:00
2025-02-08 22:12:13 +00:00
2024-12-19 16:05:41 +11:00
2025-02-19 17:26:13 +00:00
2025-02-22 18:30:14 +00:00
2025-02-10 19:51:26 +00:00
2025-02-15 07:44:20 +08:00
2025-02-22 22:24:52 +00:00
2025-02-21 16:48:01 +11:00
2025-02-03 14:04:57 +00:00
2025-02-28 21:18:53 +00:00
2025-02-08 22:12:13 +00:00
2025-02-06 17:30:10 +00:00
2025-02-03 13:55:15 -08:00
2025-02-21 16:48:01 +11:00