Matthias Krüger 0a14ae0fad
Rollup merge of #146501 - Enselic:x-test-filter, r=Mark-Simulacrum
compiletest: Fix `--exact` test filtering

This fix only changes the behavior when using `--exact` test filtering, which
was quite broken. Before this fix, the following runs 0 tests:

    $ ./x test tests/run-make/crate-loading -- --exact
    running 0 tests
    test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 431 filtered out; finished in 24.95µs

With the fix the desired test is run:

    $ ./x test tests/run-make/crate-loading -- --exact
    running 1 tests
    test [run-make] tests/run-make/crate-loading ... ok

Without `--exact` the set of run tests is unchanged. This still runs "too many" (cc rust-lang/rust#134341) tests

    $ ./x test tests/run-make/crate-loading
    running 3 tests
    test [run-make] tests/run-make/crate-loading-crate-depends-on-itself ... ok
    test [run-make] tests/run-make/crate-loading-multiple-candidates ... ok
    test [run-make] tests/run-make/crate-loading ... ok

This still runs the one and only right test

    $ ./x test tests/ui/lint/unused/unused-allocation.rs
    running 1 tests
    test [ui] tests/ui/lint/unused/unused-allocation.rs ... ok

### Notes

- I have not verified this on Windows which treats paths differently (but I see no reason why it should not work since my code should be platform agnostic).
2025-09-15 06:03:48 +02:00
2025-09-12 20:53:28 +02:00
x

This is the main source code repository for Rust. It contains the compiler, standard library, and documentation.

Why Rust?

  • Performance: Fast and memory-efficient, suitable for critical services, embedded devices, and easily integrated with other languages.

  • Reliability: Our rich type system and ownership model ensure memory and thread safety, reducing bugs at compile-time.

  • Productivity: Comprehensive documentation, a compiler committed to providing great diagnostics, and advanced tooling including package manager and build tool (Cargo), auto-formatter (rustfmt), linter (Clippy) and editor support (rust-analyzer).

Quick Start

Read "Installation" from The Book.

Installing from Source

If you really want to install from source (though this is not recommended), see INSTALL.md.

Getting Help

See https://www.rust-lang.org/community for a list of chat platforms and forums.

Contributing

See CONTRIBUTING.md.

License

Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.

See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.

Trademark

The Rust Foundation owns and protects the Rust and Cargo trademarks and logos (the "Rust Trademarks").

If you want to use these names or brands, please read the Rust language trademark policy.

Third-party logos may be subject to third-party copyrights and trademarks. See Licenses for details.

Description
Empowering everyone to build reliable and efficient software.
Readme 1.4 GiB
Languages
Rust 96%
Shell 0.9%
JavaScript 0.7%
C 0.4%
Python 0.4%
Other 1.5%