Closed
Description
Each time I switch from programming in (TypeScript, rust) to programming in (C, C++, C#) or vice versa, I end up inevitably writing function parameters backwards. To me, the following message is obviously more than enough:
error: expected one of `:` or `@`, found `path`
--> src/backup/mod.rs:113:36
|
113 | fn create_pipeline(&self, &str path) -> Result<Box<Write>> {
| ^^^^ expected one of `:` or `@` here
as it brings to my attention the inverted signature parameters. However, it occurs to me that this might be an easy (albeit extremely low priority) win to make the compiler emit friendlier error messages for newcomers to rust. Perhaps this can be detected an a message along the lines of "did you mean path: &str
instead?" could be emitted here.