Skip to content

Rollup of 5 pull requests #134931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Dec 30, 2024
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2637,7 +2637,7 @@ fn prepare_cargo_test(
) -> BootstrapCommand {
let mut cargo = cargo.into();

// Propegate `--bless` if it has not already been set/unset
// Propagate `--bless` if it has not already been set/unset
// Any tools that want to use this should bless if `RUSTC_BLESS` is set to
// anything other than `0`.
if builder.config.cmd.bless() && !cargo.get_envs().any(|v| v.0 == "RUSTC_BLESS") {
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1691,7 +1691,7 @@ Executed at: {executed_at}"#,
}
}
if let Ok(()) = fs::hard_link(&src, dst) {
// Attempt to "easy copy" by creating a hard link (symlinks are priviledged on windows),
// Attempt to "easy copy" by creating a hard link (symlinks are privileged on windows),
// but if that fails just fall back to a slow `copy` operation.
} else {
if let Err(e) = fs::copy(&src, dst) {
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/utils/tarball.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Facilitates the management and generation of tarballs.
//!
//! Tarballs efficiently hold Rust compiler build artifacts and
//! capture a snapshot of each boostrap stage.
//! capture a snapshot of each bootstrap stage.
//! In uplifting, a tarball from Stage N captures essential components
//! to assemble Stage N + 1 compiler.

Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
# Include cache version. Can be used to manually bust the Docker cache.
echo "2" >> $hash_key

echo "Image input"
echo "::group::Image checksum input"
cat $hash_key
echo "::endgroup::"

cksum=$(sha512sum $hash_key | \
awk '{print $1}')
Expand Down
2 changes: 1 addition & 1 deletion src/ci/scripts/install-clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ LLVM_VERSION="18.1.4"

if isMacOS; then
# FIXME: This is the latest pre-built version of LLVM that's available for
# x86_64 MacOS. We may want to consider bulding our own LLVM binaries
# x86_64 MacOS. We may want to consider building our own LLVM binaries
# instead, or set `USE_XCODE_CLANG` like AArch64 does.
LLVM_VERSION="15.0.7"

Expand Down
1 change: 1 addition & 0 deletions src/doc/rustc/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
- [csky-unknown-linux-gnuabiv2\*](platform-support/csky-unknown-linux-gnuabiv2.md)
- [hexagon-unknown-linux-musl](platform-support/hexagon-unknown-linux-musl.md)
- [hexagon-unknown-none-elf](platform-support/hexagon-unknown-none-elf.md)
- [illumos](platform-support/illumos.md)
- [loongarch\*-unknown-linux-\*](platform-support/loongarch-linux.md)
- [loongarch\*-unknown-none\*](platform-support/loongarch-none.md)
- [m68k-unknown-linux-gnu](platform-support/m68k-unknown-linux-gnu.md)
Expand Down
4 changes: 2 additions & 2 deletions src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ target | notes
[`riscv64gc-unknown-linux-musl`](platform-support/riscv64gc-unknown-linux-musl.md) | RISC-V Linux (kernel 4.20, musl 1.2.3)
[`s390x-unknown-linux-gnu`](platform-support/s390x-unknown-linux-gnu.md) | S390x Linux (kernel 3.2, glibc 2.17)
[`x86_64-unknown-freebsd`](platform-support/freebsd.md) | 64-bit amd64 FreeBSD
`x86_64-unknown-illumos` | illumos
[`x86_64-unknown-illumos`](platform-support/illumos.md) | illumos
`x86_64-unknown-linux-musl` | 64-bit Linux with musl 1.2.3
[`x86_64-unknown-netbsd`](platform-support/netbsd.md) | NetBSD/amd64

Expand Down Expand Up @@ -255,7 +255,7 @@ target | std | host | notes
[`aarch64-nintendo-switch-freestanding`](platform-support/aarch64-nintendo-switch-freestanding.md) | * | | ARM64 Nintendo Switch, Horizon
[`aarch64-unknown-freebsd`](platform-support/freebsd.md) | ✓ | ✓ | ARM64 FreeBSD
[`aarch64-unknown-hermit`](platform-support/hermit.md) | ✓ | | ARM64 Hermit
`aarch64-unknown-illumos` | ✓ | ✓ | ARM64 illumos
[`aarch64-unknown-illumos`](platform-support/illumos.md) | ✓ | ✓ | ARM64 illumos
`aarch64-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (ILP32 ABI)
[`aarch64-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | ARM64 NetBSD
[`aarch64-unknown-nto-qnx700`](platform-support/nto-qnx.md) | ? | | ARM64 QNX Neutrino 7.0 RTOS |
Expand Down
42 changes: 42 additions & 0 deletions src/doc/rustc/src/platform-support/illumos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# `aarch64-unknown-illumos` and `x86_64-unknown-illumos`

**Tier: 2/3**

[illumos](https://www.illumos.org/), is a Unix operating system which provides next-generation features for downstream distributions,
including advanced system debugging, next generation filesystem, networking, and virtualization options.

## Target maintainers

- Joshua M. Clulow ([@jclulow](https://github.com/jclulow))
- Patrick Mooney ([@pfmooney](https://github.com/pfmooney))

## Requirements

The target supports host tools.

The illumos target supports `std` and uses the standard ELF file format.

`x86_64-unknown-illumos` is a tier 2 target with host tools.
`aarch64-unknown-illumos` is a tier 3 target.

## Building the target

These targets can be built by adding `aarch64-unknown-illumos` and
`x86_64-unknown-illumos` as targets in the rustc list.

## Building Rust programs

Rust ships pre-compiled artifacts for the `x86_64-unknown-illumos` target.
Rust does not ship pre-compiled artifacts for `aarch64-unknown-illumos`,
it requires building the target either as shown above or using `-Zbuild-std`.

## Testing

Tests can be run in the same way as a regular binary.

## Cross-compilation toolchains and C code

The target supports C code.

The illumos project makes available [prebuilt sysroot artefacts](https://github.com/illumos/sysroot) which can be used for cross compilation.
The official Rust binaries are cross-compiled using these artefacts.
2 changes: 1 addition & 1 deletion src/etc/test-float-parse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
These are tests designed to test decimal to float conversions (`dec2flt`) used
by the standard library.

It consistes of a collection of test generators that each generate a set of
It consists of a collection of test generators that each generate a set of
patterns intended to test a specific property. In addition, there are exhaustive
tests (for <= `f32`) and fuzzers (for anything that can't be run exhaustively).

Expand Down
8 changes: 4 additions & 4 deletions src/etc/test-float-parse/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const DEFAULT_MAX_FAILURES: u64 = 20;
/// Register exhaustive tests only for <= 32 bits. No more because it would take years.
const MAX_BITS_FOR_EXHAUUSTIVE: u32 = 32;

/// If there are more tests than this threashold, the test will be defered until after all
/// If there are more tests than this threshold, the test will be deferred until after all
/// others run (so as to avoid thread pool starvation). They also can be excluded with
/// `--skip-huge`.
const HUGE_TEST_CUTOFF: u64 = 5_000_000;
Expand Down Expand Up @@ -109,7 +109,7 @@ pub fn run(cfg: Config, include: &[String], exclude: &[String]) -> ExitCode {
ui::finish(&tests, elapsed, &cfg)
}

/// Enumerate tests to run but don't actaully run them.
/// Enumerate tests to run but don't actually run them.
pub fn register_tests(cfg: &Config) -> Vec<TestInfo> {
let mut tests = Vec::new();

Expand All @@ -120,7 +120,7 @@ pub fn register_tests(cfg: &Config) -> Vec<TestInfo> {
tests.sort_unstable_by_key(|t| (t.float_name, t.gen_name));
for i in 0..(tests.len() - 1) {
if tests[i].gen_name == tests[i + 1].gen_name {
panic!("dupliate test name {}", tests[i].gen_name);
panic!("duplicate test name {}", tests[i].gen_name);
}
}

Expand Down Expand Up @@ -295,7 +295,7 @@ enum Update {
fail: CheckFailure,
/// String for which parsing was attempted.
input: Box<str>,
/// The parsed & decomposed `FloatRes`, aleady stringified so we don't need generics here.
/// The parsed & decomposed `FloatRes`, already stringified so we don't need generics here.
float_res: Box<str>,
},
/// Exited with an unexpected condition.
Expand Down
2 changes: 1 addition & 1 deletion src/tools/linkchecker/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//!
//! Currently uses a combination of HTML parsing to
//! extract the `href` and `id` attributes,
//! and regex search on the orignal markdown to handle intra-doc links.
//! and regex search on the original markdown to handle intra-doc links.
//!
//! These values are then translated to file URLs if possible and then the
//! destination is asserted to exist.
Expand Down
2 changes: 1 addition & 1 deletion src/tools/nix-dev-shell/envrc-flake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# If you want to use this as an .envrc file to create a shell with necessery components
# If you want to use this as an .envrc file to create a shell with necessary components
# to develop rustc, use the following command in the root of the rusr checkout:
#
# ln -s ./src/tools/nix-dev-shell/envrc-flake ./.envrc && nix flake update --flake ./src/tools/nix-dev-shell
Expand Down
2 changes: 1 addition & 1 deletion src/tools/nix-dev-shell/envrc-shell
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# If you want to use this as an .envrc file to create a shell with necessery components
# If you want to use this as an .envrc file to create a shell with necessary components
# to develop rustc, use the following command in the root of the rusr checkout:
#
# ln -s ./src/tools/nix-dev-shell/envrc-shell ./.envrc
Expand Down
2 changes: 1 addition & 1 deletion src/tools/suggest-tests/src/static_suggestions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::sync::OnceLock;

use crate::{Suggestion, sug};

// FIXME: perhaps this could use `std::lazy` when it is stablizied
// FIXME: perhaps this could use `std::lazy` when it is stabilized
macro_rules! static_suggestions {
($( [ $( $glob:expr ),* $(,)? ] => [ $( $suggestion:expr ),* $(,)? ] ),* $(,)? ) => {
pub(crate) fn static_suggestions() -> &'static [(Vec<&'static str>, Vec<Suggestion>)]
Expand Down
28 changes: 28 additions & 0 deletions tests/codegen/range_to_inclusive.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//! Test that `RangeTo` and `RangeToInclusive` generate identical
//! (and optimal) code; #63646
//@ compile-flags: -O -Zmerge-functions=disabled
#![crate_type = "lib"]

#[no_mangle]
// CHECK-LABEL: range_to(
pub fn range_to(a: i32, mut b: i32) -> i32 {
// CHECK: %1 = and i32 %0, %a
// CHECK-NEXT: ret i32 %1
for _ in 0..65 {
b &= a;
}

b
}

#[no_mangle]
// CHECK-LABEL: range_to_inclusive(
pub fn range_to_inclusive(a: i32, mut b: i32) -> i32 {
// CHECK: %1 = and i32 %0, %a
// CHECK-NEXT: ret i32 %1
for _ in 0..=64 {
b &= a;
}

b
}
2 changes: 1 addition & 1 deletion tests/ui/associated-types/associated-types-eq-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn baz<I: Tr1>(_x: &<I as Tr1<A=Bar>>::A) {}
trait Tr2<T1, T2, T3> {
}

// Test for when wrongly specifed equality constraint's ident
// Test for when wrongly specified equality constraint's ident
// matches some generic param's ident
// (Note: E0229 is emitted only for the first erroneous equality
// constraint (T2) not for any subequent ones (e.g. T3))
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/associated-types/project-defer-unification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ where Pix: Pixel<Subpixel=u8> + 'static,

let mut indices: ImageBuffer<_,Vec<_>> = loop { };
for (pixel, idx) in image.pixels().zip(indices.pixels_mut()) {
// failured occurred here ^^ because we were requiring that we
// failure occurred here ^^ because we were requiring that we
// could project Pixel or Subpixel from `T_indices` (type of
// `indices`), but the type is insufficiently constrained
// until we reach the return below.
Expand Down
Loading