1
Fork 0
Empowering everyone to build reliable and efficient software. Gabriel's commits. https://www.rust-lang.org/
Find a file
Guillaume Gomez 80e0448947
Rollup merge of #133736 - jieyouxu:needs-target-has-atomic, r=compiler-errors
Add `needs-target-has-atomic` directive

Before this PR, the test writer has to specify platforms and architectures by hand for targets that have differing atomic width support. `#[cfg(target_has_atomic="...")]` is not quite the same because (1) you may have to specify additional matchers manually which has to be maintained individually, and (2) the `#[cfg]` blocks does not communicate to compiletest that a test would be ignored for a given target.

This PR implements a `//@ needs-target-has-atomic` directive which admits a comma-separated list of required atomic widths that the target must satisfy in order for the test to run.

```
//@ needs-target-has-atomic: 8, 16, ptr
```

See <https://github.com/rust-lang/rust/issues/87377>.

This PR supersedes #133095 and is co-authored by `@kei519,` because it was somewhat subtle, and it turned out easier to implement than to review.

rustc-dev-guide docs PR: https://github.com/rust-lang/rustc-dev-guide/pull/2154
2024-12-02 17:36:07 +01:00
.github Rollup merge of #132605 - Kobzol:ci-increase-timeout, r=Mark-Simulacrum 2024-11-26 20:35:37 -05:00
compiler Rollup merge of #133603 - dtolnay:precedence, r=lcnr 2024-12-02 17:36:03 +01:00
library Auto merge of #133728 - jhpratt:rollup-k1i60pg, r=jhpratt 2024-12-02 12:17:12 +00:00
LICENSES Synchronize Unicode license text from unicode.org 2024-11-20 00:54:12 -08:00
src Rollup merge of #133736 - jieyouxu:needs-target-has-atomic, r=compiler-errors 2024-12-02 17:36:07 +01:00
tests Rollup merge of #133730 - dtolnay:parentest, r=compiler-errors 2024-12-02 17:36:06 +01:00
.clang-format
.editorconfig
.git-blame-ignore-revs
.gitattributes
.gitignore ignore /build instead of build/ in gitignore 2024-11-28 21:52:23 +01:00
.gitmodules
.ignore
.mailmap Update mailmap 2024-12-01 22:07:51 -05:00
Cargo.lock Rollup merge of #133569 - paolobarbolini:ruzstd-0.7.3, r=Mark-Simulacrum 2024-11-30 12:56:52 +08:00
Cargo.toml Bump Clippy version -> 0.1.85 2024-11-28 18:57:52 +01:00
CODE_OF_CONDUCT.md
config.example.toml Rollup merge of #132502 - Voultapher:document-core-features-in-config-toml-example, r=Mark-Simulacrum 2024-11-25 07:01:38 +01:00
configure
CONTRIBUTING.md
COPYRIGHT Synchronize Unicode license text from unicode.org 2024-11-20 00:54:12 -08:00
INSTALL.md add clarity for custom path installation 2024-10-06 07:37:00 -05:00
LICENSE-APACHE
license-metadata.json collect-license-metadata: move JSON to root, and add a 'check' mode 2024-11-25 14:14:57 +00:00
LICENSE-MIT
README.md Add new lint doc_include_without_cfg 2024-11-21 22:43:55 +01:00
RELEASES.md fix typo in RELEASES.md 2024-11-28 23:06:15 +08:00
REUSE.toml collect-license-metadata: move JSON to root, and add a 'check' mode 2024-11-25 14:14:57 +00:00
rust-bors.toml
rustfmt.toml chore(style): sync submodule exclusion list between tidy and rustfmt 2024-11-02 16:43:10 +03:00
triagebot.toml remove "onur-ozkan" from users_on_vacation 2024-11-25 16:19:21 +03:00
x fix(x): fix a regex used to find python executable 2024-11-06 16:40:02 +03:00
x.ps1
x.py

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 integrate 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 media guide.

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