Open
Description
The same repro as #130470 can be used here: https://github.com/fasterthanlime/readme-md-error-reporting
When running cargo +stage1 t
, the output is:
---- src/../README.md - (line 5) stdout ----
error: expected `;`, found `}`
--> src/../README.md:7:16
|
3 | let x = 234 // no semicolon here! oh no!
| ^ help: add `;` here
4 | }
| - unexpected token
But I would argue it should be this:
---- README.md - (line 5) stdout ----
error: expected `;`, found `}`
--> README.md:7:16
|
3 | let x = 234 // no semicolon here! oh no!
| ^ help: add `;` here
4 | }
| - unexpected token
I would caution against using canonicalize — which resolves symbolic links etc. and requires the path to exist on disk right now, and rather advise that y'all simply have a state machine working on a stack of path elements, going through:
- []
- ["src"]
- [] // just popped due to ".."
- ["README.md"]