Skip to content

Commit 0accf4e

Browse files
committed
Auto merge of rust-lang#123440 - jhpratt:rollup-yat6crk, r=jhpratt
Rollup of 4 pull requests Successful merges: - rust-lang#122356 (std::rand: fix dragonflybsd after rust-lang#121942.) - rust-lang#123093 (Add a nice header to our README.md) - rust-lang#123307 (Fix f16 and f128 feature gating on different editions) - rust-lang#123401 (Check `x86_64` size assertions on `aarch64`, too) r? `@ghost` `@rustbot` modify labels: rollup
2 parents b4acbe4 + 4332498 commit 0accf4e

File tree

44 files changed

+221
-68
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+221
-68
lines changed

README.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,36 @@
1-
# The Rust Programming Language
2-
3-
[![Rust Community](https://img.shields.io/badge/Rust_Community%20-Join_us-brightgreen?style=plastic&logo=rust)](https://www.rust-lang.org/community)
1+
<div align="center">
2+
<picture>
3+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/rust-lang/www.rust-lang.org/master/static/images/rust-social-wide-dark.svg">
4+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/rust-lang/www.rust-lang.org/master/static/images/rust-social-wide-light.svg">
5+
<img alt="The Rust Programming Language: A language empowering everyone to build reliable and efficient software"
6+
src="https://raw.githubusercontent.com/rust-lang/www.rust-lang.org/master/static/images/rust-social-wide-light.svg"
7+
width="50%">
8+
</picture>
9+
10+
[Website][Rust] | [Getting started] | [Learn] | [Documentation] | [Contributing]
11+
</div>
412

513
This is the main source code repository for [Rust]. It contains the compiler,
614
standard library, and documentation.
715

816
[Rust]: https://www.rust-lang.org/
17+
[Getting Started]: https://www.rust-lang.org/learn/get-started
18+
[Learn]: https://www.rust-lang.org/learn
19+
[Documentation]: https://www.rust-lang.org/learn#learn-use
20+
[Contributing]: CONTRIBUTING.md
21+
22+
## Why Rust?
923

10-
**Note: this README is for _users_ rather than _contributors_.**
11-
If you wish to _contribute_ to the compiler, you should read
12-
[CONTRIBUTING.md](CONTRIBUTING.md) instead.
24+
- **Performance:** Fast and memory-efficient, suitable for critical services, embedded devices, and easily integrate with other languages.
1325

14-
<details>
15-
<summary>Table of Contents</summary>
26+
- **Reliability:** Our rich type system and ownership model ensure memory and thread safety, reducing bugs at compile-time.
1627

17-
- [Quick Start](#quick-start)
18-
- [Installing from Source](#installing-from-source)
19-
- [Getting Help](#getting-help)
20-
- [Contributing](#contributing)
21-
- [License](#license)
22-
- [Trademark](#trademark)
28+
- **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]).
2329

24-
</details>
30+
[Cargo]: https://github.com/rust-lang/cargo
31+
[rustfmt]: https://github.com/rust-lang/rustfmt
32+
[Clippy]: https://github.com/rust-lang/rust-clippy
33+
[rust-analyzer]: https://github.com/rust-lang/rust-analyzer
2534

2635
## Quick Start
2736

compiler/rustc_ast/src/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3342,7 +3342,7 @@ impl TryFrom<ItemKind> for ForeignItemKind {
33423342
pub type ForeignItem = Item<ForeignItemKind>;
33433343

33443344
// Some nodes are used a lot. Make sure they don't unintentionally get bigger.
3345-
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
3345+
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_pointer_width = "64"))]
33463346
mod size_asserts {
33473347
use super::*;
33483348
use rustc_data_structures::static_assert_size;

compiler/rustc_ast/src/token.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ where
10211021
}
10221022

10231023
// Some types are used a lot. Make sure they don't unintentionally get bigger.
1024-
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
1024+
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_pointer_width = "64"))]
10251025
mod size_asserts {
10261026
use super::*;
10271027
use rustc_data_structures::static_assert_size;

compiler/rustc_ast/src/tokenstream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ impl DelimSpacing {
768768
}
769769

770770
// Some types are used a lot. Make sure they don't unintentionally get bigger.
771-
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
771+
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_pointer_width = "64"))]
772772
mod size_asserts {
773773
use super::*;
774774
use rustc_data_structures::static_assert_size;

compiler/rustc_const_eval/src/interpret/operand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
792792
}
793793

794794
// Some nodes are used a lot. Make sure they don't unintentionally get bigger.
795-
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
795+
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_pointer_width = "64"))]
796796
mod size_asserts {
797797
use super::*;
798798
use rustc_data_structures::static_assert_size;

compiler/rustc_const_eval/src/interpret/place.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ where
10581058
}
10591059

10601060
// Some nodes are used a lot. Make sure they don't unintentionally get bigger.
1061-
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
1061+
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_pointer_width = "64"))]
10621062
mod size_asserts {
10631063
use super::*;
10641064
use rustc_data_structures::static_assert_size;

compiler/rustc_errors/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ pub type PResult<'a, T> = Result<T, PErr<'a>>;
102102
rustc_fluent_macro::fluent_messages! { "../messages.ftl" }
103103

104104
// `PResult` is used a lot. Make sure it doesn't unintentionally get bigger.
105-
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
105+
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_pointer_width = "64"))]
106106
rustc_data_structures::static_assert_size!(PResult<'_, ()>, 16);
107-
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
107+
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_pointer_width = "64"))]
108108
rustc_data_structures::static_assert_size!(PResult<'_, bool>, 16);
109109

110110
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash, Encodable, Decodable)]

compiler/rustc_expand/src/mbe/macro_parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ struct MatcherPos {
266266
}
267267

268268
// This type is used a lot. Make sure it doesn't unintentionally get bigger.
269-
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
269+
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_pointer_width = "64"))]
270270
rustc_data_structures::static_assert_size!(MatcherPos, 16);
271271

272272
impl MatcherPos {

compiler/rustc_hir/src/hir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3761,7 +3761,7 @@ impl<'hir> Node<'hir> {
37613761
}
37623762

37633763
// Some nodes are used a lot. Make sure they don't unintentionally get bigger.
3764-
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
3764+
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_pointer_width = "64"))]
37653765
mod size_asserts {
37663766
use super::*;
37673767
// tidy-alphabetical-start

compiler/rustc_index/src/bit_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ enum Chunk {
400400
}
401401

402402
// This type is used a lot. Make sure it doesn't unintentionally get bigger.
403-
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
403+
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_pointer_width = "64"))]
404404
crate::static_assert_size!(Chunk, 16);
405405

406406
impl<T> ChunkedBitSet<T> {

0 commit comments

Comments
 (0)