What is wrong with this code?
fn launch_thread<T>(_transform: T)
where
T: fn(&String) -> String,
{
}
When I introduce the where
clause, it stops working:
error: expected one of `!`, `(`, `,`, `?`, `for`, `{`, lifetime, or path, found keyword `fn`
--> src/lib.rs:3:8
|
3 | T: fn(&String) -> String,
| ^^ expected one of 8 possible tokens