]> git.lizzy.rs Git - rust.git/commit
Add line numbers and columns to error messages spanning multiple files
authorvarkor <github@varkor.com>
Fri, 26 Jan 2018 15:33:05 +0000 (15:33 +0000)
committervarkor <github@varkor.com>
Fri, 26 Jan 2018 15:33:05 +0000 (15:33 +0000)
commit0ac465924e6ae4380b25c38cbc14f425796fa2af
tree35390718704319a4b6e9dc7a66c5eb47ee9de0d3
parenta0dcecff90c45ad5d4eb60859e22bb3f1b03842a
Add line numbers and columns to error messages spanning multiple files

If an error message is emitted that spans several files, only the
primary file currently has line and column data attached. This is
useful information, even in files other than the one in which the error
occurs. We can often work out which line and column the error
corresponds to in other files — in this case it is helpful to add them
(in the case of ambiguity, the first relevant line/column is picked,
which is still helpful than none).
src/librustc_errors/emitter.rs
src/librustc_errors/snippet.rs
src/test/ui/cross-file-errors/main.rs [new file with mode: 0644]
src/test/ui/cross-file-errors/main.stderr [new file with mode: 0644]
src/test/ui/cross-file-errors/underscore.rs [new file with mode: 0644]
src/tools/compiletest/src/runtest.rs