Error reporting order on riscv64gc-unknown-linux-gnu #72913
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-reproducibility
Area: Reproducible / deterministic builds
C-bug
Category: This is a bug.
O-riscv
Target: RISC-V architecture
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried running
ui
tests forriscv64gc-unknown-linux-gnu
, in particular ui/or-patterns/missing-bindings.rs. Reproduce with./x.py test --target risv64gc-unknown-linux-gnu src/test/ui/or-patterns/missing-bindings.rs
The test checks that the expected errors are encountered when compiling
missing-bindings.rs
. Onriscv64gc-unknown-linux-gnu
the correct errors are reported but in the wrong order (see below).I looked into the first of these out of order errors and found the errors are sorted (src/librustc_resolve/late.rs:1326) by their
Symbol
, which sorts by the index of that interned string. I think the problem comes because some of the variable names (a
,b
,c
) inmissing-bindings.rs
are interned before the source is parsed only forriscv64gc-unknown-linux-gnu
here.One fix would be to sort the error order by the
Symbol
string instead of the index, but that would effect all target architectures. Edit: this can be found here.Meta
rustc built from 10c2316
Test output
The text was updated successfully, but these errors were encountered: