This splits out a rustc-dev component with the compiler crates, and
keeps the status quo of default installed files on nightly. The default
changing to not install compiler libraries by default is left for a
future pull request.
However, on stable and beta, this does remove the compiler libraries
from the set of libraries installed by default, as they are never needed
there (per our stability story, they "cannot" be used).
refactor session::config::build_session_options_and_crate_config
I'm not exactly sure what happened in https://github.com/rust-lang/rust/pull/65361#issuecomment-541420179 so in an effort to bisect the error I'm extracting out the first commit so it can hopefully land (I suspect the error is in the 2nd-3rd commits.)
r? @petrochenkov
(I'll r=you when the PR builder is happy)
Remove implicit dependencies on syntax::pprust
Part of https://github.com/rust-lang/rust/pull/65324.
The main goal here is to facilitate the eventual move of pprust out from libsyntax and because an AST definition typically should not depend on its pretty printer.
r? @estebank
self-profiling: Add events for metadata loading (plus a small dep-tracking optimization)
This PR
- adds self-profiling events related to loading things from crate metadata
- makes the compiler cache the `DepNodeIndex` of upstream crates, so that they don't have to be looked up over and over.
The commits are best reviewed in isolation.
Self-profiling tracking issue: https://github.com/rust-lang/rust/issues/58967
r? @Mark-Simulacrum
cc @wesleywiser
Rollup of 10 pull requests
Successful merges:
- #65214 (Split non-CAS atomic support off into target_has_atomic_load_store)
- #65246 (vxWorks: implement get_path() and get_mode() for File fmt::Debug)
- #65312 (improve performance of signed saturating_mul)
- #65336 (Fix typo in task::Waker)
- #65346 (nounwind tests and cleanup)
- #65347 (Fix #[unwind(abort)] with Rust ABI)
- #65366 (Implement Error::source on IntoStringError + Remove superfluous cause impls)
- #65369 (Don't discard value names when using address or memory sanitizer)
- #65370 (Add `dyn` to `Any` documentation)
- #65373 (Fix typo in docs for `Rc`)
Failed merges:
r? @ghost
Add `dyn` to `Any` documentation
I noticed that in documentation to `Any` trait the old trait object syntax is used, which could be confusing for newcomers, since we generally recommend using `dyn Trait` instead of just `Trait`. This PR changes the documentation comment, so that it uses `&dyn Any`, `&mut dyn Any` and `Box<dyn Any>`, correspondingly.
Don't discard value names when using address or memory sanitizer
The value names are used when reporting issues found by address
sanitizer or memory sanitizer. Avoid discarding names when those
sanitizers are enabled, unless explicitly requested to do otherwise.
Implement Error::source on IntoStringError + Remove superfluous cause impls
IntoStringError only implemented `Error::cause`, which is deprecated. This implemements `Error::source` instead.
`Error::cause` will still work as before, thanks to the default implementation.
I think this was the only/last `Error` impl in the standard library to have a cause, but not a source.
nounwind tests and cleanup
This is a follow-up to @pnkfelix' https://github.com/rust-lang/rust/pull/65020. In particular it adds some tests as @nagisa asked. It also does a cleanup that the original PR omitted to reduce backporting risks.
I hope I finally managed to write an uncontroversial PR in this area. ;) This should not change any behavior, just test it better.
Split non-CAS atomic support off into target_has_atomic_load_store
This PR implements my proposed changes in https://github.com/rust-lang/rust/issues/32976#issuecomment-518542029 by removing `target_has_atomic = "cas"` and splitting `target_has_atomic` into two separate `cfg`s:
* `target_has_atomic = 8/16/32/64/128`: This indicates the largest width that the target can atomically CAS (which implies support for all atomic operations).
* ` target_has_atomic_load_store = 8/16/32/64/128`: This indicates the largest width that the target can support loading or storing atomically (but may not support CAS).
cc #32976
r? @alexcrichton
I noticed that in documentation to `Any` trait the old trait object syntax is used, which could be confusing for newcomers, since we generally recommend using `dyn Trait` instead of just `Trait`. This PR changes the documentation comment, so that it uses `&dyn Any`, `&mut dyn Any` and `Box<dyn Any>`, correspondingly.
resolve: fix error title regarding private constructors
One reason is that constructors can be private while their types can be
public.
Idea credit to @petrochenkov, discussed at #65153
Improve docs on some char boolean methods
simple revival of #61794
(also rustfmt on rest of file :)
Documentation for `is_xid_start()` and `is_xid_continue()` couldn't be improved since both methods got remove from this repository
r? @dtolnay
cc @JohnCSimon
Implement Clone::clone_from for VecDeque
See #28481. For simple data types with the target much longer than the source, this implementation can be significantly slower than the default (probably due to the use of truncate). However, it should be substantially faster when cloning from nested data structures with similar shapes or when cloning from VecDeques with similar lengths, hopefully more common use cases for clone_from.