resolve: Sort E0408 errors by Symbol str
This is a request for comments implementing my suggested solution to https://github.com/rust-lang/rust/issues/72913
Previously errors were sorted by Symbol index instead of the string. The indexes are not the same between architectures because Symbols for architecture extensions (e.g. x86 AVX or RISC-V d) are interned before the source file is parsed. RISC-V's naming of extensions after single letters led to it having errors sorted differently for test cases using single letter variable names. Instead sort the errors by the Symbol string so that it is stable across architectures.
While I was at it, there's also 8edb05c2 skipping some ui tests which I think are irrelevant for risc-v.
Rollup of 5 pull requests
Successful merges:
- #72260 (Spell out `Self` in async function return)
- #72996 (Remove unsused `NodeId` related APIs in hir map)
- #73010 (Update RELEASES.md)
- #73017 (Use assert_eq for liballoc test)
- #73019 (add test for #72960)
Failed merges:
r? @ghost
Add myself to mailmap
Now that I have (accidentally) made contributions using two separate email addresses, I've added the rest of the addresses I typical use.
Add more assert to Vec with_capacity docs
Show assertion on len too to show them how adding new items will affect both the
length and capacity, before and after.
Previously errors were sorted by Symbol index instead of the string. The
indexes are not the same between architectures because Symbols for
architecture extensions (e.g. x86 AVX or RISC-V d) are interned before
the source file is parsed. RISC-V's naming of extensions after single
letters led to it having errors sorted differently for test cases using
single letter variable names. Instead sort the errors by the Symbol
string so that it is stable across architectures.
save_analysis: work on HIR tree instead of AST
In order to reduce the uses of `NodeId`s in the compiler, `save_analysis` crate has been reworked to operate on the HIR tree instead of the AST.
cc #50928
Bump libc dependency to latest version (0.2.71)
Hello,
Just a quick version bump PR. The rust-psp group had some changes merged to libc recently but they haven't made it into the compiler. We're looking to remove our forked version from our Xargo.toml. Thanks.
Add Camelid per request
Email from @camelid:
> HI there,
>
> I’m a new contributor and I just looked at Rust Thanks and noticed that my contributions are listed under two different capitalizations of my name: “Camelid" and “camelid". Could you make them both “Camelid"?
>
> Thanks!
>
> Camelid
Make `SourceMap` available for early debug-printing of `Span`s
Normally, we debug-print `Spans` using the `SourceMap` retrieved from
the global `TyCtxt`. However, we fall back to printing out the `Span`'s
raw fields (instead of a file and line number) when we try to print a
`Span` before a `TyCtxt` is available. This makes debugging early phases
of the compile, such as parsing, much more difficult.
This commit stores a `SourceMap` in `rustc_span::GlOBALS` as a fallback.
When a `TyCtxt` is not available, we try to retrieve one from `GLOBALS`
- only if this is not available do we fall back to the raw field output.
I'm not sure how to write a test for this - however, this can be
verified locally by setting `RUSTC_LOG="rustc_parse=debug"`, and
verifying that the output contains filenames and line numbers.
Email from @camelid:
> HI there,
>
> I’m a new contributor and I just looked at Rust Thanks and noticed that my contributions are listed under two different capitalizations of my name: “Camelid" and “camelid". Could you make them both “Camelid"?
>
> Thanks!
>
> Camelid
Updated documentation for Control Flow Guard
Update user-facing documentation for the Control Flow Guard (CFG) exploit mitigation in the unstable book, as requested in #68793.