bootstrap: Use a `CompiletestMode` enum instead of bare strings
This gives better static checking when dealing with compiletest modes in bootstrap, especially for those modes that overlap with the name of a test suite directory.
r? jieyouxu (or bootstrap)
Retire `opt_str2` from compiletest cli parsing
We have `Option<..>`, we don't need to invent "(none)" as option-at-home.
- More specifically, when some test suite expect certain values to be present, they should `.expect(..)` the value, and not potentially receive some "(none)" in some cases.
r? Zalathar
Move the libgccjit.so file in a target directory
Since GCC is not multi-target, we need multiple libgccjit.so. Our solution to have a directory per target so that we can have multiple libgccjit.so.
r? `@Kobzol`
Subtree sync for rustc_codegen_cranelift
The main highlights this time are a Cranelift update and adding actual support for `-Cdebuginfo=line-tables-only` rather than treating it the same as `-Cdebuginfo=full`.
r? `@ghost`
`@rustbot` label +A-codegen +A-cranelift +T-compiler
This derive was an artifact of test-only method `Cache::all` wanting to
automatically sort its output to hide HashMap iteration order.
We can achieve an equivalent result by requiring the caller to provide a
projection function that returns results that _are_ sortable.
Move ambient gdb discovery from compiletest to bootstrap
- Follow-up to https://github.com/rust-lang/rust/pull/148099
---
This code takes the compiletest code for discovering an “ambient” `gdb` in the user's path, and moves it to bootstrap.
One of the eventual goals is to allow compiletest to assume that if it has been asked to run the debuginfo-gdb suite, then it *must* have been passed an explicit `--gdb`, though we aren't quite there yet.
r? jieyouxu
Tidying up tests/ui/issues tests [3/N]
> [!NOTE]
> Intermediate commits are intended to help review, but will be squashed add comment commit prior to merge.
part of rust-lang/rust#133895
r? Kivooeo
Fix off-by-one staging output when testing the library
It seems generally useful to store the `Mode` in `Cargo`, I remember thinking a few times that it would be useful in other places.
Fixes: https://github.com/rust-lang/rust/issues/149558
r? `@jieyouxu`
Add warn-by-default lint for visibility on `const _` declarations
Add a warn-by-default `unused_visibilities` lint for visibility qualifiers on `const _` declarations—e.g. `pub const _: () = ();`. Such qualifiers have no effect.
A [Sourcegraph search](https://sourcegraph.com/search?q=context:global+lang:Rust+pub%5Cs*%28%5C%28.*%5C%29%29%3F%5Cs*const%5Cs%2B_%5Cs*:&patternType=regexp&case=yes&sm=0) suggests that this pattern is relatively rare, and mostly found in tests (with only 3 exceptions). So perhaps this could become an FCW/hard error in the future.
`@rustbot` label T-lang A-lints A-visibility -T-clippy
While some of this information is needed by debugger discovery, it is also
needed by non-debuginfo tests, so the code doesn't belong in the `debuggers`
module.
Add a warn-by-default `unused_visibility` lint for visibility qualifiers
on `const _` declarations - e.g. `pub const _: () = ();`.
These have no effect.
rustdoc: fix bugs with search aliases and merging
These bugs cause a crash and a perf problem with aliases, caused by loading the search index when it's not expected.
cc `@weihanglo`
r? `@GuillaumeGomez`