Get Miri working on ARM
- Add a shim for `llvm.arm.hint`, which is required by `core::hint::spin_loop` on `arm` targets. The shim simply calls `yield_active_thread` on a YIELD hint, just like the shim for `llvm.aarch64.isb` that's already present.
- Change the signature of `miri_host_to_target_path` to use `c_char` instead of `i8`, to make it compatible with `CStr` on targets where `c_char` is unsigned. The implementation of `miri_host_to_target_path` accesses the memory as bytes and does not need to be adjusted.
- Enable ARM targets in CI. Specifically, `aarch64-unknown-linux-gnu` and `arm-unknown-linux-gnueabi` on the Linux host.
Since all tests also pass for `aarch64-unknown-linux-gnu` I took the liberty of adding that target to CI as well.
Fixes#2791
Wrap missing provider message correctly
Fixes#108429
```
error: internal compiler error: compiler/rustc_middle/src/ty/query.rs:441:1: `tcx.trigger_delay_span_bug(DefId(0:3 ~ test[78c5]::main))` is not supported for local crate;
hint: Queries can be either made to the local crate, or the external crate. This error means you tried to use it for one that's not supported.
If that's not the case, trigger_delay_span_bug was likely never assigned to a provider function.
thread 'rustc' panicked at 'Box<dyn Any>', /home/ec2-user/rust3/compiler/rustc_errors/src/lib.rs:1651:9
stack backtrace:
0: 0x7f51870926d7 - std::backtrace_rs::backtrace::libunwind::trace::hb0876bb39e7adf0d
at /home/ec2-user/rust3/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x7f51870926d7 - std::backtrace_rs::backtrace::trace_unsynchronized::h1bcab1313827007b
at /home/ec2-user/rust3/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7f5187077e07 - std::sys_common::backtrace::_print_fmt::h262d2a62279fa102
at /home/ec2-user/rust3/library/std/src/sys_common/backtrace.rs:65:5
```
support `x fmt` for sub and outside of rust directories
This PR makes `x fmt` to be succesfully work from sub or outside dir of rust.
The following cases are tested and the results were successful.
```sh
# from rust/library directory
../x fmt compiler --check
../x fmt compiler/rustc
# from outside of rust directory
../../rust/x fmt library/std library/core --check
../../rust/x fmt library/std
```
Resolves#108004
r? ``@albertlarsan68``
Update `fuchsia-test-runner.py` and docs
This updates the test runner to the latest version of the SDK and fixes debugging support for Rust source code.
r? ``@tmandry``
Move some std tests from `tests/ui-fulldeps` into `library/std`
This allows them to be tested normally along with other `./x test std` tests. Moving `rename_directory` is simple enough but `create_dir_all_bare` needed to be an std integration test.
Additionally, some tests that I couldn't move atm have instead been placed in an `std` subdirectory. These tests include ones that do fun things with processes or that intentionally abort the test process.
r? libs
Remove dead unwinds before drop elaboration
As a part of drop elaboration, we identify dead unwinds, i.e., unwind
edges on a drop terminators which are known to be unreachable, because
there is no need to drop anything.
Previously, the data flow framework was informed about the dead unwinds,
and it assumed those edges are absent from MIR. Unfortunately, the data
flow framework wasn't consistent in maintaining this assumption.
In particular, if a block was reachable only through a dead unwind edge,
its state was propagated to other blocks still. This became an issue in
the context of change removes DropAndReplace terminator, since it
introduces initialization into cleanup blocks.
To avoid this issue, remove unreachable unwind edges before the drop
elaboration, and elaborate only blocks that remain reachable.
cc `@Zeegomo`
Optimize break patterns
Use `wyrand` instead of calling `XORSHIFT` 2 times in break patterns for the 64-bit platform. The new PRNG is 2x faster than the previous one.
Bench result(via https://gist.github.com/zhangyunhao116/11ef41a150f5c23bb47d86255fbeba89):
```
old time: [1.3258 ns 1.3262 ns 1.3266 ns]
change: [+0.5901% +0.6731% +0.7791%] (p = 0.00 < 0.05)
Change within noise threshold.
Found 13 outliers among 100 measurements (13.00%)
7 (7.00%) high mild
6 (6.00%) high severe
new time: [657.65 ps 657.89 ps 658.18 ps]
change: [-1.6910% -1.6110% -1.5256%] (p = 0.00 < 0.05)
Performance has improved.
Found 6 outliers among 100 measurements (6.00%)
2 (2.00%) high mild
4 (4.00%) high severe
```
Rollup of 10 pull requests
Successful merges:
- #106541 (implement const iterator using `rustc_do_not_const_check`)
- #106918 (Rebuild BinaryHeap on unwind from retain)
- #106923 (Restore behavior when primary bundle is missing)
- #108169 (Make query keys `Copy`)
- #108287 (Add test for bad cast with deferred projection equality)
- #108370 (std: time: Avoid to use "was created" in elapsed() description)
- #108377 (Fix ICE in 'duplicate diagnostic item' diagnostic)
- #108388 (parser: provide better suggestions and errors on closures with braces missing)
- #108391 (Fix `is_terminal`'s handling of long paths on Windows.)
- #108401 (diagnostics: remove inconsistent English article "this" from E0107)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
- Add quick link to API docs
- Add marker for external links, to help offline users
- Add information about using 'cargo doc' and the playground
- Clean up some of the wording
- Update body & header style to match rustdoc defaults
RustHermit publishs a new kernel interface and supports
a common BSD socket layer. By supporting this interface,
the implementation can be harmonized to other operating systems.
To realize this socket layer, the handling of file descriptors
is also harmonized to other operating systems.
Fix test function checker in `unwrap_used`, `expect_used`
After #9686 , `unwrap` and `expect` in integration tests and raw test functions won't be allowed.
fixes#10011fixes#10238fixes#10264
---
changelog: Fix: [`expect_used`], [`unwrap_used`], [`dbg_macro`], [`print_stdout`], [`print_stderr`]: No longer lint in test functions, if the related configuration is set
[#10391](https://github.com/rust-lang/rust-clippy/pull/10391)
<!-- changelog_checked -->