Interesting that this came up; I was reading https://arxiv.org/abs/2301.02308, on Rust's usability, earlier today. One of the interesting conclusions from that paper was that while Rust's error messages are generally high-quality, they can sometimes be too local, especially for helping get new Rust programmers used to the ownership model. Key quote:
"rustc error messages not only describe the error in the code, but for
certain error patterns, suggest edits that may fix the problem. However, these edits are always local and don’t provide any high-level design feedback which may be helpful in making the mindshift."
I think Rust needs to show me a decision tree for why something on the lefthand side of a function call ends up being whatever vscode + lsp shows me. Because the compiler and rust-analyzer are going through various traits and auto-traits to ultimately land on one decision but if I want to understand how Rust works I need to know how it arrives at these conclusions. I don't want to have to jump deep down into language constructs and read the docs just to find out several levels deep that a trait was implemented by some other trait that then had an auto trait impl and that's why it ends up requiring me to write &. Rust being complex is fine but only if they go far beyond what has been standard tooling.
"rustc error messages not only describe the error in the code, but for certain error patterns, suggest edits that may fix the problem. However, these edits are always local and don’t provide any high-level design feedback which may be helpful in making the mindshift."