Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ fn main() {
println!("cargo::rerun-if-env-changed=RUSTUP_OVERRIDE_BUILD_TRIPLE");
println!("cargo::rerun-if-env-changed=TARGET");
match from_build() {
Ok(triple) => eprintln!("Computed build based on target triple: {triple:#?}"),
Ok(triple) => eprintln!("Computed build based on target tuple: {triple:#?}"),
Err(s) => {
eprintln!("Unable to parse target '{s}' as a known target triple");
eprintln!("Unable to parse target '{s}' as a known target tuple");
eprintln!(
"If you are attempting to bootstrap a new target, you might need to update `platforms` to a newer version"
);
Expand Down
4 changes: 2 additions & 2 deletions doc/user-guide/src/concepts/toolchains.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ Standard release channel toolchain names have the following form:
can be optionally appended with an archive date, as in `nightly-2014-12-18`, in
which case the toolchain is downloaded from the archive for that date.

Finally, the host may be specified as a target triple. This is most useful for
Finally, the host may be specified as a target tuple. This is most useful for
installing a 32-bit compiler on a 64-bit platform, or for installing the
[MSVC-based toolchain][msvc-toolchain] on Windows. For example:

```console
$ rustup toolchain install stable-x86_64-pc-windows-msvc
```

For convenience, elements of the target triple that are omitted will be
For convenience, elements of the target tuple that are omitted will be
inferred, so the above could be written:

```console
Expand Down
4 changes: 2 additions & 2 deletions doc/user-guide/src/installation/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ When targeting the GNU ABI, no additional software is strictly required for basi
However, many library crates will not be able to compile until the full [MSYS2] with MinGW has been installed.

By default `rustup` on Windows configures Rust to target the MSVC ABI, that is
a target triple of either `i686-pc-windows-msvc`, `x86_64-pc-windows-msvc`, or `aarch64-pc-windows-msvc`
a target tuple of either `i686-pc-windows-msvc`, `x86_64-pc-windows-msvc`, or `aarch64-pc-windows-msvc`
depending on the CPU architecture of the host Windows OS. The toolchains that
`rustup` chooses to install, unless told otherwise through the [toolchain
specification], will be compiled to run on that target triple host and will
specification], will be compiled to run on that target tuple host and will
target that triple by default.

You can change this behavior with `rustup set default-host` or during
Expand Down
2 changes: 1 addition & 1 deletion src/cli/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ pub(crate) fn ignorable_error(
}

/// Returns an error for a toolchain if both conditions are met:
/// - The toolchain has an incompatible target triple,
/// - The toolchain has an incompatible target tuple,
/// i.e. it might not be able to run on the host system.
/// - The `force_non_host` flag is set to `false`.
pub(crate) fn check_non_host_toolchain(
Expand Down
4 changes: 2 additions & 2 deletions src/cli/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ pub(crate) fn toolchain_help() -> String {
archive date, as in `nightly-2014-12-18`, in which case the
toolchain is downloaded from the archive for that date.

The host may be specified as a target triple. This is most useful
The host may be specified as a target tuple. This is most useful
for installing a 32-bit compiler on a 64-bit platform, or for
installing the [MSVC-based toolchain] on Windows. For example:

{LITERAL}$ rustup toolchain install stable-x86_64-pc-windows-msvc{LITERAL:#}

For convenience, omitted elements of the target triple will be
For convenience, omitted elements of the target tuple will be
inferred, so the above could be written:

{LITERAL}$ rustup toolchain install stable-msvc{LITERAL:#}
Expand Down
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ impl<'a> Cfg<'a> {
// the base name in the error to help users)
let resolved_name = &ToolchainName::try_from(toolchain_name_str)?;
if !self.list_toolchains()?.iter().any(|s| s == resolved_name) {
return Err(anyhow!(format!("target triple in channel name '{name}'")));
return Err(anyhow!(format!("target tuple in channel name '{name}'")));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/dist/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ impl Manifest {
config: &Config,
) -> Result<Vec<ComponentStatus>> {
// Return all optional components of the "rust" package for the
// toolchain's target triple.
// toolchain's target tuple.
let mut res = Vec::new();

let rust_pkg = self
Expand Down
4 changes: 2 additions & 2 deletions src/dist/manifestation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ impl Manifestation {
// For historical reasons, the rust-installer component
// names are not the same as the dist manifest component
// names. Some are just the component name some are the
// component name plus the target triple.
// component name plus the target tuple.
let name = component.name_in_manifest();
let short_name = component.short_name_in_manifest();
if let Some(c) = self.installation.find(&name)? {
Expand Down Expand Up @@ -800,7 +800,7 @@ impl ComponentInstall {
// For historical reasons, the rust-installer component
// names are not the same as the dist manifest component
// names. Some are just the component name some are the
// component name plus the target triple.
// component name plus the target tuple.
let pkg_name = self.component.name_in_manifest();
let short_pkg_name = self.component.short_name_in_manifest();
let reader = self.status.unpack(utils::buffered(&self.installer)?);
Expand Down
10 changes: 5 additions & 5 deletions src/dist/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ struct ParsedToolchainDesc {
}

/// A toolchain descriptor from rustup's perspective. These contain
/// 'partial target triples', which allow toolchain names like
/// 'stable-msvc' to work. Partial target triples though are parsed
/// from a hardcoded set of known triples, whereas target triples
/// 'partial target tuples', which allow toolchain names like
/// 'stable-msvc' to work. Partial target tuples though are parsed
/// from a hardcoded set of known triples, whereas target tuples
/// are nearly-arbitrary strings.
#[derive(Debug, Clone, Eq, PartialEq, PartialOrd, Ord)]
pub struct PartialToolchainDesc {
Expand Down Expand Up @@ -569,9 +569,9 @@ impl TargetTriple {
}
// Otherwise we need to parse things
let partial_self = PartialTargetTriple::new(&self.0)
.ok_or_else(|| anyhow!(format!("Unable to parse target triple: {}", self.0)))?;
.ok_or_else(|| anyhow!(format!("Unable to parse target tuple: {}", self.0)))?;
let partial_other = PartialTargetTriple::new(&other.0)
.ok_or_else(|| anyhow!(format!("Unable to parse target triple: {}", other.0)))?;
.ok_or_else(|| anyhow!(format!("Unable to parse target tuple: {}", other.0)))?;
// First obvious check is OS, if that doesn't match there's no chance
let ret = if partial_self.os != partial_other.os {
false
Expand Down
2 changes: 1 addition & 1 deletion src/dist/triple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ mod test {
let partial_target_triple = PartialTargetTriple::new(input);
assert!(
partial_target_triple.is_some(),
"expected `{input}` to create some partial target triple; got None"
"expected `{input}` to create some partial target tuple; got None"
);

let expected = PartialTargetTriple {
Expand Down
2 changes: 1 addition & 1 deletion src/test/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ pub(crate) struct MockPackage {

#[derive(Debug, Hash, Eq, PartialEq, Clone)]
pub(crate) struct MockTargetedPackage {
// Target triple
// Target tuple
pub target: String,
// Whether the file actually exists (could be due to build failure)
pub available: bool,
Expand Down
2 changes: 1 addition & 1 deletion tests/suite/cli_rustup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3419,7 +3419,7 @@ async fn file_override_with_target_info() {
.remove_redactions(["[HOST_TRIPLE]"])
.with_stderr(snapbox::str![[r#"
...
error: target triple in channel name 'nightly-x86_64-unknown-linux-gnu'
error: target tuple in channel name 'nightly-x86_64-unknown-linux-gnu'
...
"#]])
.is_err();
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions tests/suite/known_triples.rs → tests/suite/known_tuples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{collections::BTreeSet, io::Write};
use platforms::Platform;

#[test]
fn gen_known_triples() {
fn gen_known_tuples() {
let out_path = "src/dist/triple/known.rs";
let existing = std::fs::read_to_string(out_path).unwrap();

Expand Down Expand Up @@ -54,7 +54,7 @@ fn gen_known_triples() {
///
/// # Discussion
///
/// The current model of target triples in Rustup requires some non-code knowledge to correctly generate the list.
/// The current model of target tuples in Rustup requires some non-code knowledge to correctly generate the list.
/// For example, the parsing results of two 2-dash triples can be different:
///
/// ```jsonc
Expand Down Expand Up @@ -90,7 +90,7 @@ fn parse_triple(triple: &str) -> (&str, &str, &str) {
env,
),
_ => panic!(
"Internal error while parsing target triple `{triple}`, please file an issue at https://github.com/rust-lang/rustup/issues"
"Internal error while parsing target tuple `{triple}`, please file an issue at https://github.com/rust-lang/rustup/issues"
),
}
}
2 changes: 1 addition & 1 deletion tests/suite/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ mod cli_self_upd;
mod cli_v1;
mod cli_v2;
mod dist_install;
mod known_triples;
mod known_tuples;
mod static_roots;