Closed
Description
Code
trait Service {
type Output;
type Error;
}
fn takes_service<S: Service>(s: S) where S::Error: Debug -> S::Output { loop {} }
Current output
Compiling playground v0.0.1 (/playground)
error: expected one of `(`, `+`, `,`, `::`, `<`, or `{`, found `->`
--> src/main.rs:31:58
|
31 | fn takes_service<S: Service>(s: S) where S::Error: Debug -> S::Output {
| ------^^ expected one of `(`, `+`, `,`, `::`, `<`, or `{`
| | |
| | help: try adding parentheses
| `Fn` bounds require arguments in parentheses
error: could not compile `playground` (bin "playground") due to 1 previous error
Desired output
Something about misplaced where clause, directing me to place it _after_ the return type
Rationale and extra context
No response
Other cases
No response
Rust Version
Build using the Nightly version: 1.81.0-nightly
(2024-06-11 d0227c6a19c2d6e8dceb)
Anything else?
No response