about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-12-30 21:06:28 +0000
committerbors <bors@rust-lang.org>2024-12-30 21:06:28 +0000
commit7f75bfa1ad4e9a9d33a179a90603001515e91991 (patch)
treeb1dc3ea38b2da189aa95118952253059d6c7dca1
parent2061630860906083681a32ed748e53bee4a03fb6 (diff)
parent05c0cd31e769840f286e2c3b10e3652f67aee258 (diff)
downloadrust-7f75bfa1ad4e9a9d33a179a90603001515e91991.tar.gz
rust-7f75bfa1ad4e9a9d33a179a90603001515e91991.zip
Auto merge of #134931 - matthiaskrgr:rollup-b47ly73, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #132477 (Add illumos target documentation)
 - #134871 (Add codegen test for issue 63646)
 - #134911 (chore: fix typos)
 - #134922 (Fix typos)
 - #134924 (ci: Cleanup docker build logs in CI)

r? `@ghost`
`@rustbot` modify labels: rollup
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs2
-rw-r--r--src/bootstrap/src/lib.rs2
-rw-r--r--src/bootstrap/src/utils/tarball.rs2
-rwxr-xr-xsrc/ci/docker/run.sh3
-rwxr-xr-xsrc/ci/scripts/install-clang.sh2
-rw-r--r--src/doc/rustc/src/SUMMARY.md1
-rw-r--r--src/doc/rustc/src/platform-support.md4
-rw-r--r--src/doc/rustc/src/platform-support/illumos.md42
-rw-r--r--src/etc/test-float-parse/README.md2
-rw-r--r--src/etc/test-float-parse/src/lib.rs8
-rw-r--r--src/tools/linkchecker/main.rs2
-rw-r--r--src/tools/nix-dev-shell/envrc-flake2
-rw-r--r--src/tools/nix-dev-shell/envrc-shell2
-rw-r--r--src/tools/suggest-tests/src/static_suggestions.rs2
-rw-r--r--tests/codegen/range_to_inclusive.rs28
-rw-r--r--tests/ui/associated-types/associated-types-eq-2.rs2
-rw-r--r--tests/ui/associated-types/project-defer-unification.rs2
17 files changed, 90 insertions, 18 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index fe2dd9cc5f3..6aa6e4e277d 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -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") {
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
index eff259212c5..4cc812829f9 100644
--- a/src/bootstrap/src/lib.rs
+++ b/src/bootstrap/src/lib.rs
@@ -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) {
diff --git a/src/bootstrap/src/utils/tarball.rs b/src/bootstrap/src/utils/tarball.rs
index 3c6c7a7fa18..843ea65e838 100644
--- a/src/bootstrap/src/utils/tarball.rs
+++ b/src/bootstrap/src/utils/tarball.rs
@@ -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.
 
diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh
index a0adf60b6b2..d1bc0519bc1 100755
--- a/src/ci/docker/run.sh
+++ b/src/ci/docker/run.sh
@@ -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}')
diff --git a/src/ci/scripts/install-clang.sh b/src/ci/scripts/install-clang.sh
index 6103aa61248..5522095e304 100755
--- a/src/ci/scripts/install-clang.sh
+++ b/src/ci/scripts/install-clang.sh
@@ -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"
 
diff --git a/src/doc/rustc/src/SUMMARY.md b/src/doc/rustc/src/SUMMARY.md
index 9743b3ba442..f0c3720eae1 100644
--- a/src/doc/rustc/src/SUMMARY.md
+++ b/src/doc/rustc/src/SUMMARY.md
@@ -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)
diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md
index f3bd1489a7d..24e9a3c8121 100644
--- a/src/doc/rustc/src/platform-support.md
+++ b/src/doc/rustc/src/platform-support.md
@@ -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
 
@@ -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 |
diff --git a/src/doc/rustc/src/platform-support/illumos.md b/src/doc/rustc/src/platform-support/illumos.md
new file mode 100644
index 00000000000..dd2ae90f674
--- /dev/null
+++ b/src/doc/rustc/src/platform-support/illumos.md
@@ -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.
diff --git a/src/etc/test-float-parse/README.md b/src/etc/test-float-parse/README.md
index 21b20d0a072..5e2c43d1cad 100644
--- a/src/etc/test-float-parse/README.md
+++ b/src/etc/test-float-parse/README.md
@@ -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).
 
diff --git a/src/etc/test-float-parse/src/lib.rs b/src/etc/test-float-parse/src/lib.rs
index 71b1aa06671..3c71b0dc32e 100644
--- a/src/etc/test-float-parse/src/lib.rs
+++ b/src/etc/test-float-parse/src/lib.rs
@@ -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;
@@ -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();
 
@@ -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);
         }
     }
 
@@ -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.
diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs
index 833e41df537..570b2c374c0 100644
--- a/src/tools/linkchecker/main.rs
+++ b/src/tools/linkchecker/main.rs
@@ -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.
diff --git a/src/tools/nix-dev-shell/envrc-flake b/src/tools/nix-dev-shell/envrc-flake
index 849ed1f4fc5..f3e5442b86b 100644
--- a/src/tools/nix-dev-shell/envrc-flake
+++ b/src/tools/nix-dev-shell/envrc-flake
@@ -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
diff --git a/src/tools/nix-dev-shell/envrc-shell b/src/tools/nix-dev-shell/envrc-shell
index d8f900fe86a..4080d7d5384 100644
--- a/src/tools/nix-dev-shell/envrc-shell
+++ b/src/tools/nix-dev-shell/envrc-shell
@@ -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
diff --git a/src/tools/suggest-tests/src/static_suggestions.rs b/src/tools/suggest-tests/src/static_suggestions.rs
index b216138cf9a..d363d583b54 100644
--- a/src/tools/suggest-tests/src/static_suggestions.rs
+++ b/src/tools/suggest-tests/src/static_suggestions.rs
@@ -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>)]
diff --git a/tests/codegen/range_to_inclusive.rs b/tests/codegen/range_to_inclusive.rs
new file mode 100644
index 00000000000..f3001897f88
--- /dev/null
+++ b/tests/codegen/range_to_inclusive.rs
@@ -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
+}
diff --git a/tests/ui/associated-types/associated-types-eq-2.rs b/tests/ui/associated-types/associated-types-eq-2.rs
index 88eb2981061..9d2860d1b30 100644
--- a/tests/ui/associated-types/associated-types-eq-2.rs
+++ b/tests/ui/associated-types/associated-types-eq-2.rs
@@ -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))
diff --git a/tests/ui/associated-types/project-defer-unification.rs b/tests/ui/associated-types/project-defer-unification.rs
index cec088496fd..b51228ef411 100644
--- a/tests/ui/associated-types/project-defer-unification.rs
+++ b/tests/ui/associated-types/project-defer-unification.rs
@@ -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.