-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)
Description
When compiling a .rc file and there is an error in one of the .rs files. The compiler will crash when trying to use the codemap to display which line the error was on.
Example:
../src/lib/test.rs:82:23:82:52: error: unknown type in conversion:
rt: d76f:main:main: upcall fail 'Assertion end <= str::byte_len(s) failed', /media/src/rust-tinderbox/srcdir-snap-stage3-x86_64-unknown-linux-gnu/src/lib/str.rs:393
This is likely because it is trying to relate numbers in the codemap to bytes in the file, but the codemap treats all files in the compilation unit as if they were one giant file. So when it goes to look up line 5 in foo.rs it may (currently) end up looking for byte 17000.
Metadata
Metadata
Assignees
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)