Adjust 64-bit ARM data layouts for LLVM update
LLVM has updated data layouts to specify `Fn32` on 64-bit ARM to avoid C++ accidentally underaligning functions when trying to comply with member function ABIs.
This should only affect Rust in cases where we had a similar bug (I don't believe we have one), but our data layout must match to generate code.
As a compatibility adaptatation, if LLVM is not version 19 yet, `Fn32` gets voided from the data layout.
See llvm/llvm-project#90415
`@rustbot` label: +llvm-main
cc `@krasimirgg`
r? `@durin42`
Adjust dbg.value/dbg.declare checks for LLVM update
https://github.com/llvm/llvm-project/pull/89799 changes llvm.dbg.value/declare intrinsics to be in a different, out-of-instruction-line representation. For example
call void `@llvm.dbg.declare(...)`
becomes
#dbg_declare(...)
Update tests accordingly to work with both the old and new way.
https://github.com/llvm/llvm-project/pull/89799 changes llvm.dbg.value/declare intrinsics to be in a different, out-of-instruction-line representation. For example
call void @llvm.dbg.declare(...)
becomes
#dbg_declare(...)
Update tests accordingly to work with both the old and new way.
Update books
## rust-lang/book
3 commits in d207d894cc5e1d496ab99beeacd1a420e5d4d238..bebcf527e67755a989a1739b7cfaa8f0e6b30040
2024-04-30 02:06:57 UTC to 2024-04-25 21:04:25 UTC
- [ch10-03] Fix wording change about mandatory type annotation (rust-lang/book#3904)
- Introduce handling for accessible/semantic note rendering in HTML (rust-lang/book#3907)
- Backport changes from print for ch7 (rust-lang/book#3901)
## rust-embedded/book
1 commits in aa7d4b0b4653ddb47cb1de2036d090ec2ba9dab1..17842ebb050f62e40a4618edeb8e8ee86e758707
2024-05-01 13:23:40 UTC to 2024-05-01 13:23:40 UTC
- Update embedded rust debugging section of tooling.md (rust-embedded/book#369)
## rust-lang/reference
1 commits in 5854fcc286557ad3ab34d325073d11d8118096b6..51817951d0d213a0011f82b62aae02c3b3f2472e
2024-04-27 17:54:45 UTC to 2024-04-27 17:54:45 UTC
- Add docs for `#[collapse_debuginfo]` attribute (rust-lang/reference#1468)
## rust-lang/rust-by-example
3 commits in 60d34b5fd33db1346f9aabfc0c9d0bda6c8e42be..229ad13b64d919b12e548d560f06d88963b25cd3
2024-05-06 00:15:45 UTC to 2024-04-24 18:29:38 UTC
- Missing import (rust-lang/rust-by-example#1841)
- Added missing word (rust-lang/rust-by-example#1838)
- Raw string literal can contain up to 255 #s according to Rust Reference (rust-lang/rust-by-example#1839)
## rust-lang/rustc-dev-guide
5 commits in 07425fed36b00e60341c5e29e28d37d40cbd4451..2d1947ff34d50ca46dfe242ad75531a4c429bb52
2024-05-06 06:48:21 UTC to 2024-04-28 18:31:21 UTC
- Add documentation for check-cfg by-default in UI tests (rust-lang/rustc-dev-guide#1966)
- Add documentation on Apple notification group (rust-lang/rustc-dev-guide#1964)
- Update CI documentation to avoid mentioning `expand-yaml-anchors` (rust-lang/rustc-dev-guide#1971)
- Rename `-Z verbose` to `-Z verbose-internals` (rust-lang/rustc-dev-guide#1968)
- typo traige->triage (rust-lang/rustc-dev-guide#1967)
borrowck: prepopulate opaque storage more eagerly
otherwise we ICE due to ambiguity when normalizing while computing implied bounds.
r? ``@compiler-errors``
Record impl args in the proof tree in new solver
Rather than rematching them during select.
Also use `ImplSource::Param` instead of `ImplSource::Builtin` for alias-bound candidates, so we don't ICE in `Instance::resolve`.
r? lcnr
Make check-cfg docs more user-friendly
This PR improves the `--check-cfg` to make them more user-friendly by:
- explaining the purpose of the feature
- removing the "form" jargon
- making it (bit) less formal and more "friendly"
- making the doc less cluttered
- and by fixing (the width and flags) of the examples
`@rustbot` label +F-check-cfg
Rollup of 4 pull requests
Successful merges:
- #124520 (Document that `create_dir_all` calls `mkdir`/`CreateDirW` multiple times)
- #124724 (Prefer lower vtable candidates in select in new solver)
- #124771 (Don't consider candidates with no failing where clauses when refining obligation causes in new solver)
- #124808 (Use `super_fold` in `RegionsToStatic` visitor)
r? `@ghost`
`@rustbot` modify labels: rollup
LLVM has updated data layouts to specify `Fn32` on 64-bit ARM to avoid
C++ accidentally underaligning functions when trying to comply with
member function ABIs.
This should only affect Rust in cases where we had a similar bug (I
don't believe we have one), but our data layout must match to generate
code.
As a compatibility adaptatation, if LLVM is not version 19 yet, `Fn32`
gets voided from the data layout.
See llvm/llvm-project#90415
Don't consider candidates with no failing where clauses when refining obligation causes in new solver
Improves error messages when we have param-env candidates that don't deeply unify (i.e. after alias-bounds).
r? lcnr
Prefer lower vtable candidates in select in new solver
Also, adjust the select visitor to only winnow when the *parent* goal is `Certainty::Yes`. This means that we won't winnow in cases when we have any ambiguous inference guidance from two candidates.
r? lcnr
Add constants for f16 and f128
- Commit 1 adds associated constants for `f16`, excluding NaN and infinities as these are implemented using arithmetic for `f32` and `f64`.
- Commit 2 adds associated constants for `f128`, excluding NaN and infinities.
- Commit 3 adds constants in `std::f16::consts`.
- Commit 4 adds constants in `std::f128::consts`.
Migrate `run-make/rustdoc-error-lines` to new `rmake.rs`
Part of https://github.com/rust-lang/rust/issues/121876.
There was a weird naming inconsistency with `input`/`output`. A few tests write `.arg("-o").arg(path)` and the `output` method was actually the command output. So instead, I renamed the original `output` into `command_output` so that I could create the `output` method with the expected effect (and updated the tests to use it too).
EDIT: The first two commits come from https://github.com/rust-lang/rust/pull/124711. Some weird things happened recently pparently. ^^'
r? `@jieyouxu`
Improve check-cfg CLI errors with more structured diagnostics
This PR improve check-cfg CLI errors with more structured diagnostics.
In particular it now shows the statement where the error occurred, what kind lit it is, as well as pointing users to the doc for more details.
`@rustbot` label +F-check-cfg
Rollup of 3 pull requests
Successful merges:
- #124742 (Add `rustfmt` cfg to well known cfgs list)
- #124765 ([rustdoc] Fix bad color for setting cog in ayu theme)
- #124768 ([resubmission] Meta: Enable the brand new triagebot transfer command)
r? `@ghost`
`@rustbot` modify labels: rollup
Move some tests from `rustc_expand` to `rustc_parse`.
There are some test cases involving `parse` and `tokenstream` and `mut_visit` that are located in `rustc_expand`. Because it used to be the case that constructing a `ParseSess` required the involvement of `rustc_expand`. However, since #64197 merged (a long time ago) `rust_expand` no longer needs to be involved.
This commit moves the tests into `rustc_parse`. This is the optimal place for the `parse` tests. It's not ideal for the `tokenstream` and `mut_visit` tests -- they would be better in `rustc_ast` -- but they still rely on parsing, which is not available in `rustc_ast`. But `rustc_parse` is lower down in the crate graph and closer to `rustc_ast` than `rust_expand`, so it's still an improvement for them.
The exact renaming is as follows:
- rustc_expand/src/mut_visit/tests.rs -> rustc_parse/src/parser/mut_visit/tests.rs
- rustc_expand/src/tokenstream/tests.rs -> rustc_parse/src/parser/tokenstream/tests.rs
- rustc_expand/src/tests.rs + rustc_expand/src/parse/tests.rs -> compiler/rustc_parse/src/parser/tests.rs
The latter two test files are combined because there's no need for them to be separate, and having a `rustc_parse::parser::parse` module would be weird. This also means some `pub(crate)`s can be removed.
r? `@compiler-errors`
There are some test cases involving `parse` and `tokenstream` and
`mut_visit` that are located in `rustc_expand`. Because it used to be
the case that constructing a `ParseSess` required the involvement of
`rustc_expand`. However, since #64197 merged (a long time ago)
`rust_expand` no longer needs to be involved.
This commit moves the tests into `rustc_parse`. This is the optimal
place for the `parse` tests. It's not ideal for the `tokenstream` and
`mut_visit` tests -- they would be better in `rustc_ast` -- but they
still rely on parsing, which is not available in `rustc_ast`. But
`rustc_parse` is lower down in the crate graph and closer to `rustc_ast`
than `rust_expand`, so it's still an improvement for them.
The exact renaming is as follows:
- rustc_expand/src/mut_visit/tests.rs -> rustc_parse/src/parser/mut_visit/tests.rs
- rustc_expand/src/tokenstream/tests.rs -> rustc_parse/src/parser/tokenstream/tests.rs
- rustc_expand/src/tests.rs + rustc_expand/src/parse/tests.rs ->
compiler/rustc_parse/src/parser/tests.rs
The latter two test files are combined because there's no need for them
to be separate, and having a `rustc_parse::parser::parse` module would
be weird. This also means some `pub(crate)`s can be removed.
coverage: Split out MC/DC mappings from `BcbMappingKind`
These variants were added to `BcbMappingKind` as part of the [MC/DC coverage](https://en.wikipedia.org/wiki/Modified_Condition/Decision_Coverage) implementation in #123409, because that was the path-of-least-resistance for integrating them into the existing code.
However, they ultimately represent complex concepts that the enum was not intended to handle, leading to more complexity in the code that processes them. This PR therefore follows in the footsteps of #124545, and splits the MC/DC mappings out into their own dedicated vectors of structs.
After that, `BcbMappingKind` itself ends up having only one variant (`Code`), so this PR also flattens that enum into its enclosing struct, renamed to `mapping::CodeMapping`.
---
No functional changes.
This will conflict slightly with #124571, but hopefully that should be easy to resolve either way.
`@rustbot` label +A-code-coverage
Rollup of 6 pull requests
Successful merges:
- #124148 (rustdoc-search: search for references)
- #124668 (Fix bootstrap panic when build from tarball)
- #124736 (compiler: upgrade time from 0.3.34 to 0.3.36)
- #124748 (Fix unwinding on 32-bit watchOS ARM (v2))
- #124749 (Stabilize exclusive_range_pattern (v2))
- #124750 (Document That `f16` And `f128` Hardware Support is Limited (v2))
r? `@ghost`
`@rustbot` modify labels: rollup