rust/src
Stuart Cook ea1a31b150
Rollup merge of #139469 - jieyouxu:compiletest-supports-crate-type, r=onur-ozkan
Introduce a `//@ needs-crate-type` compiletest directive

The `//@ needs-crate-type: $crate_types...` directive takes a comma-separated list of crate types that the target platform must support in order for the test to be run. This allows the test writer to semantically convey that the ignore condition is based on target crate type needs, instead of using a general purpose `//@ ignore-$target` directive (often without comment).

Fixes #132309.

### Example

```rs
//@ needs-crate-type: dylib (ignored on e.g. wasm32-unknown-unknown)
//@ compile-flags: --crate-type=dylib

fn foo() {}
```

### Review advice

- Best reviewed commit-by-commit.
- The impl is not very clean, I briefly attempted to clean up the directive handling but found that more invasive changes are needed, so I'd like to not block on the cleanup for now.

try-job: test-various
try-job: armhf-gnu
2025-04-11 13:31:47 +10:00
..
bootstrap Update boostrap 2025-04-09 12:33:09 +01:00
build_helper Add CI metadata to bootstrap metrics 2025-03-27 17:03:08 +01:00
ci Rollup merge of #139481 - Kobzol:post-merge-links, r=marcoieni 2025-04-09 14:52:39 +02:00
doc Rollup merge of #139469 - jieyouxu:compiletest-supports-crate-type, r=onur-ozkan 2025-04-11 13:31:47 +10:00
etc Rollup merge of #139214 - bjorn3:edition_2024_rustfmt, r=compiler-errors 2025-04-02 13:10:42 +11:00
gcc@13cc824322 Update GCC submodule 2025-03-19 15:35:47 +01:00
librustdoc Rollup merge of #138682 - Alexendoo:extra-symbols, r=fee1-dead 2025-04-11 13:31:44 +10:00
llvm-project@a9865ceca0 Update to LLVM 20.1.2 2025-04-02 20:19:43 +08:00
rustc-std-workspace update rustc-std-workspace crates 2024-11-04 07:45:15 +01:00
rustdoc-json-types rustdoc: Use own logic to print #[repr(..)] attributes in JSON output. 2025-03-22 18:47:12 +00:00
tools Rollup merge of #139469 - jieyouxu:compiletest-supports-crate-type, r=onur-ozkan 2025-04-11 13:31:47 +10:00
README.md
stage0 bump stage0 2025-04-09 12:29:59 +01:00
version Bump to 1.88.0 2025-03-28 16:53:17 +00:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.