Add shortcut for Grisu3 algorithm.
While Grisu3 is way more faster for most numbers compare to Dragon4, the fall back to Dragon4 procedure for certain numbers could cause some performance regressions compare to use Dragon4 directly. Mitigating the regression caused by falling back is important for a largely used core library.
In Grisu3 algorithm implementation, there's a shortcut to jump out earlier when the fractional or integrals cannot meet the requirement of requested digits. This could significantly improve the performance of converting floating number to string as it falls back even without starting trying the algorithm.
The original idea is from the [.NET implementation](https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Number.Grisu3.cs#L602-L615) and the code was originally added in [this PR](https://github.com/dotnet/coreclr/pull/14646#issuecomment-350942050). This shortcut has been shipped long time ago and has been proved working.
Fix#110129
configure.py: add flag for riscv{64,32}gc musl-root
Add the corresponding flag for detecting `--musl-root-riscv64gc` and `--musl-root-riscv32gc` with ./configure, which is beneficial for downstream Linux distros to create the rust package with the same "recipe" from other architectures.
Update books
## rust-lang/book
1 commits in c06006157b14b3d47b5c716fc392b77f3b2e21ce..8fa6b854d515506d825390fe0d817f5ef0c89350
2023-04-13 00:05:30 UTC to 2023-04-13 00:05:30 UTC
- Update copyright in LICENSE-APACHE (rust-lang/book#3611)
## rust-embedded/book
1 commits in 701d1551429da4cb609082c0ac99df569e336710..897fcf566f16bf87bf37199bdddec1801fd00532
2023-04-20 13:24:51 UTC to 2023-04-20 13:24:51 UTC
- typos (rust-embedded/book#347)
## rust-lang/rustc-dev-guide
5 commits in 6337ed17fb8dcd918d78b7d97d213e923530337c..2a5eb92197e9cf8fe91164dcbf4f9b88c0d7e73d
2023-04-22 11:50:11 UTC to 2023-04-16 11:30:24 UTC
- Add docs for compare-output-lines-by-subset flag (rust-lang/rustc-dev-guide#1677)
- fix typo (rust-lang/rustc-dev-guide#1674)
- Fix links in how-to-build-and-run.md (rust-lang/rustc-dev-guide#1679)
- docs: document new `suggest-tests` tool (rust-lang/rustc-dev-guide#1660)
- Fix extra slash (rust-lang/rustc-dev-guide#1673)
[LLVM17] Adapt to `ExplicitEmulatedTLS` removal.
0d333bf0e3 removed the `ExplicitEmulatedTLS` field from `TargetOptions`.
Before that commit, `TargetMachine::useEmulatedTLS()` fell back to `TheTriple.hasDefaultEmulatedTLS()` if `ExplicitEmulatedTLS` was `false`/unset.
After that commit, `TargetMachine::useEmulatedTLS()` directly returns `Options.EmulatedTLS`, and the fallback to `TheTriple.hasDefaultEmulatedTLS()` was moved to `InitTargetOptionsFromCodeGenFlags`.
Since `rustc` does not use `InitTargetOptionsFromCodeGenFlags` (AFAICT) and instead manually builds `TargetOptions`, this PR initializes `EmulatedTLS` to `TheTriple.hasDefaultEmulatedTLS()`.
(I'm not really familiar with the details of what this option does, or if there are any tests that depend on `hasDefaultEmulatedTLS` being used correctly, so this PR is mostly untested (it does compile against LLVM17, though)).
`@rustbot` label: +llvm-main
Break up long function in trait selection error reporting + clean up nearby code
- Move blocks of code into their own functions
- Replace a few function argument types with their type aliases
- Create "AppendConstMessage" enum to replace a nested `Option`.
Check requested digit length and the fractional or integral parts of the number. Falls back earlier without trying the Grisu algorithm if the specific condition meets.
Fix#110129
Allow older LLVM versions to have missing components
This check was introduced by #77280 to ensure that all tests that are filtered by LLVM component are actually tested in CI. However this causes issues for new targets (e.g. #101069) where support is only available on the latest LLVM version.
This PR restricts the tests to only CI jobs that use the latest LLVM version.
Add size asserts for MIR `SourceScopeData` & `VarDebugInfo`
There's vectors of both of these in `mir::Body`, so might as well track them.
(I was pondering adding something to one or the other, so wanted this to see the memory impact.)
bootstrap: update paths cargo-credential crate
This should be done in #110653 but forgot.
Fixes#110742
## How to verify this patch
Run `./x.py build cargo`. Previously it would fail with
```console
error: manifest path `/projects/rust/src/tools/cargo/crates/credential/cargo-credential-1password/Cargo.toml` does not exist
```