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.
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.
Rollup of 21 pull requests
Successful merges:
- #73566 (Don't run `everybody_loops` for rustdoc; instead ignore resolution errors)
- #73771 (Don't pollute docs/suggestions with libstd deps)
- #73794 (Small cleanup for E0705 explanation)
- #73807 (rustdoc: glue tokens before highlighting)
- #73835 (Clean up E0710 explanation)
- #73926 (Ignoring test case: [codegen] repr-transparent-aggregates-1.rs for aarch64)
- #73981 (Remove some `ignore-stage1` annotations.)
- #73998 (add regression test for #61216)
- #74140 (Make hir ProjectionKind more precise)
- #74148 (Move #[doc(alias)] check in rustc)
- #74159 (forbid generic params in the type of const params)
- #74171 (Fix 44056 test with debug on macos.)
- #74221 (Don't panic if the lhs of a div by zero is not statically known)
- #74325 (Focus on the current file in the source file sidebar)
- #74359 (rustdoc: Rename internal API fns to `into_string`)
- #74370 (Reintroduce spotlight / "important traits" feature)
- #74390 (Fix typo in std::mem::transmute documentation)
- #74391 (BtreeMap: superficially refactor root access)
- #74392 (const generics triage)
- #74397 (Fix typo in the latest release note)
- #74406 (Set shell for github actions CI)
Failed merges:
r? @ghost
const generics triage
I went through all const generics issues and closed all issues which are already fixed.
Some issues already have a regression test but were not closed. Also doing this as part of this PR.
uff r? @eddyb @varkor
closes#61936closes#62878closes#63695closes#67144closes#68596closes#69816closes#70217closes#70507closes#70586closes#71348closes#71805closes#73120closes#73508closes#73730closes#74255
Fix typo in std::mem::transmute documentation
`u32::from_ge_bytes` function does not exist; replace with `u32::from_be_bytes`.
It is clear that `u32::from_le_bytes` is not meant from the context; the latter is used correctly while `from_be_bytes` is misspelled.