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
LLVM 10 includes a009a60a917bc30940422bcef73f8270566d78db which will
print value numbers for unnamed func args.
Update these tests to be in line with the referenced clang tests.
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.
Don't count pathless --extern for unused-crate-dependencies warnings
`--extern proc_macro` is used to add the proc_macro crate to the extern
prelude for all procmacros. In general pathless `--extern` only references
sysroot/standard libraries and so should be exempt from
unused-crate-dependencies warnings.
r? @petrochenkov
split select into submodules
a0f06d11ae/src/librustc_trait_selection/traits/select.rs (L1)
I extracted two submodules:
- confirmation: apart from `pub(super) fn confirm_candidate`, everything else is private
- candidate_assembly: exports `pub(super) fn candidate_from_obligation` and `pub(super) fn assemble_candidates`
I tried to change as little as possible while doing this and hopefully split this into well reviewable commits.
Make libunwind build hermetic
We want to avoid exporting any symbols from Rust's version of libunwind,
and to do so we need to disable visibility annotations to make sure that
the -fvisibility=hidden has effect, and also hide global new/delete.
This matches the CMake build of libunwind.
WF-check all ty::Const's, not just array lengths.
fixes#68977
This PR removes the special case for array length in `wf::compute` and
checks the well formedness of all consts.
Changes `PredicateKind::WellFormed` to take a `GenericArg` and updates `wf::obligations`.