3 ms·
I really like how Rust does this. "Expected a colon here, found a <" (ascii-art pointer to the place) "did you forget to close a bracket here?" (ascii-art poin
by berkes 6y ago
I really like how Rust does this.
"Expected a colon here, found a <" (ascii-art pointer to the place) "did you forget to close a bracket here?" (ascii-art pointer to 12 lines above that, where, indeed you forgot to close a bracket.
It does this for semi-colons (they are not always required), closing brackets (maybe you are nesting something horrendously deep?) etceteras.
The idea, basically is "I see this is wrong. But I'm not the one to decide how to fix it for you, but here's a suggestion".
I love Rust for this.
- fludlight 6y agoPerl also did this in the late 90s. "Possible runaway quote on line 123"
- shoo 6y agoI remember being baffled for an hour or two after accidentally putting a trailing opening { in a c++ file and then getting thousands of compilation errors all through the standard library headers my application included.