Improve default target options for x86_64-unknown-linux-none
Without a standard library, we cannot unwind, so it should be panic=abort by default.
Additionally, it does not have std because while it is Linux, it cannot use libc, which std uses today for Linux.
Using PIE by default may be surprising to users, as shown in #134763, so I've documented it explicitly. I'm not sure if we want to count that as fixing the issue or not.
cc `@morr0ne,` as you added the target (and are the maintainer), and `@Noratrieb,` who reviewed that PR (:D).
- add a FIXME when looking for the region variance of unexpected regions
- drive-by: fix a doc comment link
- drive-by: simplify the variance match using exported variants instead
This context struct will hold data to help creating localized
constraints:
- the live regions, with the shape matching a CFG walk, indexed per
point
- the variance of these live regions, represented as the direction we'll
add the appropriate
We also add this structure to the mir typeck to record liveness data,
and make it responsible for localized constraint creation.
bootstrap: Fix `./x check bootstrap` by moving `shared_helpers::tests`
Running `./x check bootstrap` currently doesn't work, because it builds the bootstrap shim binaries with `cfg(test)`, and those binaries can't find a `tests` submodule when they include `shared_helpers.rs` via `#[path]`.
This PR fixes that by taking the tests module and moving it to `super::tests::shared_helpers_tests` instead.
(The extra `tests` submodule prevents tidy from complaining about unit tests that aren't in a dedicated tests module.)
---
It would be nice to also run `./x check bootstrap compiletest` in CI, so that this and #134848 don't regress, but I didn't want to bundle that change with this fix.
bootstrap: Consolidate the macros for declaring compiletest test suites
Instead of using a dizzying assortment of different macros to declare these test suite steps, we can mostly just use one `test!` macro with a few optional named arguments.
I'm pretty sure that this doesn't change any behaviour, but please do double-check each of the individual declarations.
Avoid ICE in borrowck
Provide a fallback in `best_blame_constraint` when `find_constraint_paths_between_regions` doesn't have a result. This code is due a rework to avoid the letf-over `unwrap()`, but avoids the ICE caused by the repro.
Fix#133252.
This makes this step take ~25ms on my machine (M3 Max 64GB) for Zed repo instead of ~150ms. Additionally it takes down the time needed for a clean cargo build of ripgrep from ~6.1s to 5.9s.
This change is mostly relevant for crates with multiple large CGUs.
compiletest: Slightly simplify the handling of debugger directive prefixes
The `cdbg-` prefix is not used by any tests in `tests/debuginfo`, and perhaps there never were any tests that used it.
Getting rid of it also lets us get rid of the code for parsing multiple prefixes at the same time, since every debugger now has exactly one prefix.
- librustdoc::clean::clean_lifetime doesn't need a mut doc context
- librustdoc::clean::normalize doesn't need a mut doc context
- move Some() wrapping up into `clean_predicate()`
- simplify nested if in librustdoc::clean::record_extern_fqn()
bootstrap: Allow `./x check compiletest`
Did you know that bootstrap didn't support `./x check compiletest`? Well, now it does!
Manually add `"compiletest"` to your `rust-analyzer.check.overrideCommand` check command to get error/warning integration when modifying compiletest.
bootstrap: drop warning for top-level test suite path check due to false positives
The current top-level test suite directory does not exist warning logic doesn't quite handle the more exotic path suffix matches that test filters seem to accept (e.g. `library/test` can be matched with `--exclude test`), so avoid warning on non-existent top-level test suites for now. To avoid false positives, we probably need to query test `Step`s for their `should_run(exclude_filter)` logic.
This retains the fix for the Windows path handling (unlike #134843).
r? `@onur-ozkan`