Bump version to 1.47
This also bumps to a more recent rustfmt version, just to keep us relatively up to date (though almost nothing has changed in rustfmt we use beyond bumps to the parser infra). No formatting changes as a result of this.
r? @pietroalbini
Rollup of 8 pull requests
Successful merges:
- #73101 (Resolve items for cross-crate imports relative to the original module)
- #73269 (Enable some timeouts in SGX platform)
- #74033 (Add build support for Cargo's build-std feature.)
- #74351 (Do not render unstable items for rustc doc)
- #74357 (Some `Symbol` related improvements)
- #74371 (Improve ayu rustdoc theme)
- #74386 (Add RISC-V GNU/Linux to src/tools/build-manifest as a host platform)
- #74398 (Clean up E0723 explanation)
Failed merges:
r? @ghost
Add build support for Cargo's build-std feature.
This makes some changes to the standard library to make it easier to use with Cargo's build-std feature. The primary goal is to make it so that Cargo and its users do not need to know which crates to build and which features to use for every platform.
Conditional cfgs are adjusted so that there is usually a fall-through for unsupported platforms. Additionally, there is a "restricted-std" feature to mark `std` as unstable when used with build-std on no_std platforms. There is no intent to stabilize this feature for the foreseeable future.
This borrows some of the implementation for wasm which already does what this needs. More code sharing can be done with some other platforms (there is a lot of duplication with cloudabi, hermit, and sgx), but I figure that can be done in a future PR.
There are some small changes to stable behavior in this PR:
- `std::env::consts::ARCH` on asmjs now reports "wasm32", to match its actual architecture.
- Some of the wasm error messages for unsupported features report a slightly different error message so that the code can be reused.
There should otherwise not be any changes to how std is built for distribution via bootstrap.
This does not yet support all platforms when used with build-std.
- It doesn't work with 16-bit targets (hashbrown does not support that).
- It does not work with JSON spec targets.
- In particular, all target triple snooping will need to be replaced with appropriate target option checking.
- Switching to gimli (#73441) will make cross-building *much* easier.
- There are still a ton of issues on the Cargo side to resolve. A big one is panic strategy support.
Future PRs are intended to address some of these issues.
A follow-up to #74406, this commit merely removes the `shell: bash`
lines where they are explicitly added in favor of setting defaults for
*all* "run" steps.
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
Needed to support https://github.com/rust-lang/project-rfc-2229/issues/7
Currently rustc_typeck depends on rustc_middle for definition TypeckTables, etc.
For supporting project-rfc-2229#7, rustc_middle would've to depend on
rustc_typeck for Place -- introducing a circular dependcy.
This resembles the MIR equivalent of `Place` located in `lbrustc_middle/mir`.
Co-authored-by: Aman Arora <me@aman-arora.com>
Co-authored-by: Jennifer Wills <wills.jenniferg@gmail.com>
Co-authored-by: Logan Mosier <logmosier@gmail.com>
This replaces the need for the `description` and `details` symbols in
`UnsafetyViolation`, which are static. As a result some
`Symbol::as_str()` calls are no longer necessary, which is nice.
It's equivalent to `Ident::from_str_and_span`. The commit also
introduces some more static symbols so that `Ident::new` can be used in
various places instead of `Ident::from_str_and_span`.
The commit also changes `Path::path` from a `&str` to a `Symbol`, which
then allows the lifetime annotation to be removed from `Ty`. Also, the
use of `Symbol` in `Bounds` removes the need for its lifetime
annotation.