Skip to content

Rollup of 8 pull requests #136918

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 62 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
00cb12a
chore: discard padding white space
chiichen Jan 30, 2025
fd911ea
feat: modify developing with nix section
chiichen Jan 30, 2025
7306e2b
Distinguish between "nothing to pull" and "pull error" in josh-sync
Kobzol Jan 30, 2025
a7d35e1
Rewrite section on executing Docker tests
Kobzol Jan 30, 2025
40713cb
Run rustc-pull CI every day, don't notify when there is nothing to up…
Kobzol Jan 30, 2025
f2e5b5a
Merge pull request #2234 from Kobzol/rustc-pull-error-code
Kobzol Jan 30, 2025
179a2f8
Pass `GITHUB_TOKEN` to Zulip CI step
Kobzol Jan 31, 2025
be412df
Merge pull request #2237 from Kobzol/ci-fix
Kobzol Jan 31, 2025
97edb7a
Checkout repository sources in rustc-pull CI action
Kobzol Feb 1, 2025
50fadea
Merge pull request #2239 from Kobzol/ci-fix-2
Kobzol Feb 1, 2025
48c7202
Reword submodule handling
Kobzol Feb 1, 2025
f09de67
Preparing for merge from rustc
invalid-email-address Feb 2, 2025
9566530
Merge from rustc
invalid-email-address Feb 2, 2025
8d06d79
Merge pull request #2235 from Kobzol/docker-tests-rewrite
onur-ozkan Feb 2, 2025
e406ada
Merge pull request #2233 from chiichen/nix-shell-dev
Noratrieb Feb 2, 2025
3827ff0
Apply suggestions from code review
JohnTitor Feb 2, 2025
ac1c40a
Merge pull request #2236 from rust-lang/rustc-pull
JohnTitor Feb 2, 2025
d47b46d
Preparing for merge from rustc
invalid-email-address Feb 3, 2025
5cf7dd0
Merge from rustc
invalid-email-address Feb 3, 2025
d5796f5
Merge pull request #2240 from rust-lang/rustc-pull
JohnTitor Feb 3, 2025
56a5b59
Remove "Port run-make tests from Make to Rust" tracking issue from Re…
DuskyElf Feb 3, 2025
99d2b3a
overlong line
tshepang Feb 3, 2025
ca06fbc
Merge pull request #2241 from rust-lang/tshepang-patch-1
jieyouxu Feb 3, 2025
15f48e7
Merge pull request #2242 from DuskyElf/master
jieyouxu Feb 3, 2025
3e5b413
Make the rustc-pull workflow run less often
Kobzol Feb 3, 2025
3145dd3
Merge pull request #2243 from Kobzol/pull-cron
jieyouxu Feb 4, 2025
299b78e
Replace link with a https based one
marxin Feb 6, 2025
cf19ac5
Merge pull request #2245 from marxin/fix-link-2
jieyouxu Feb 6, 2025
941e82a
improve CI cache docs
marcoieni Feb 6, 2025
9f0a172
Merge pull request #2247 from marcoieni/ci-cache
marcoieni Feb 6, 2025
11f64f1
Update links to type schemas
notriddle Feb 6, 2025
99b9c4f
Merge pull request #2248 from notriddle/notriddle/typescrpt2
fmease Feb 6, 2025
515bd9f
Remove reference to enum.Reveal
marxin Feb 7, 2025
cf15b33
Merge pull request #2249 from marxin/workaround-borked-link
lcnr Feb 7, 2025
ea54b5e
Replace i686-unknown-redox target with i586-unknown-redox
jackpot51 Feb 7, 2025
c2ff52a
Preparing for merge from rustc
invalid-email-address Feb 10, 2025
81f21f0
Merge from rustc
invalid-email-address Feb 10, 2025
67ba6a6
Merge pull request #2244 from rust-lang/rustc-pull
JohnTitor Feb 10, 2025
b8e135a
Change CPU target back to pentiumpro
jackpot51 Feb 10, 2025
54c15eb
Update platform-support.md
jackpot51 Feb 10, 2025
0395fc2
Move line numbers into the `<code>` directly
GuillaumeGomez Feb 7, 2025
673fd23
Update rustdoc tests
GuillaumeGomez Feb 7, 2025
9e0c8b6
Add regression test for source line numbers
GuillaumeGomez Feb 10, 2025
9222b05
Correctly handle `user-select: none`
GuillaumeGomez Feb 11, 2025
909d43b
add `Builder::is_host_target`
onur-ozkan Feb 9, 2025
61ba728
add coverage for `Builder::is_host_target`
onur-ozkan Feb 9, 2025
b594b9f
Remove quotes around href in code line numbers
GuillaumeGomez Feb 11, 2025
acc7ddf
rename `is_host_target` to `is_builder_target`
onur-ozkan Feb 10, 2025
1b98d0e
Explain that in paths generics can't be set on both the enum and the …
estebank Dec 31, 2024
23daa8c
Remove some the spans pointing at the enum in the path and its generi…
estebank Feb 11, 2025
32fd1a7
compiler: replace ExternAbi::name calls with formatters
workingjubilee Feb 12, 2025
2e2afff
Put kobzol back to review rotation
Kobzol Feb 12, 2025
0ca8353
`f16` is half-precision
eyelash Feb 12, 2025
4f37b45
`f128` is quadruple-precision
eyelash Feb 12, 2025
262079b
Rollup merge of #134981 - estebank:issue-93993, r=BoxyUwU
GuillaumeGomez Feb 12, 2025
c43a59f
Rollup merge of #136698 - jackpot51:i586-redox, r=RalfJung
GuillaumeGomez Feb 12, 2025
1073aea
Rollup merge of #136767 - onur-ozkan:is-host-target, r=albertlarsan68…
GuillaumeGomez Feb 12, 2025
ba32d8b
Rollup merge of #136829 - GuillaumeGomez:move-line-numbers-into-code,…
GuillaumeGomez Feb 12, 2025
9fa2557
Rollup merge of #136875 - BoxyUwU:rdg-push, r=jieyouxu
GuillaumeGomez Feb 12, 2025
30bd1b5
Rollup merge of #136900 - workingjubilee:format-externabi-directly, r…
GuillaumeGomez Feb 12, 2025
29c61d3
Rollup merge of #136913 - Kobzol:kobzol-rotation, r=Kobzol
GuillaumeGomez Feb 12, 2025
40f0499
Rollup merge of #136915 - eyelash:float-precision, r=workingjubilee
GuillaumeGomez Feb 12, 2025
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: 1 addition & 3 deletions compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,7 @@ fn push_debuginfo_type_name<'tcx>(
output.push_str(sig.safety.prefix_str());

if sig.abi != rustc_abi::ExternAbi::Rust {
output.push_str("extern \"");
output.push_str(sig.abi.name());
output.push_str("\" ");
let _ = write!(output, "extern {} ", sig.abi);
}

output.push_str("fn(");
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_errors/src/diagnostic_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ into_diag_arg_using_display!(
SplitDebuginfo,
ExitStatus,
ErrCode,
rustc_abi::ExternAbi,
);

impl<I: rustc_type_ir::Interner> IntoDiagArg for rustc_type_ir::TraitRef<I> {
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_hir_analysis/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@ hir_analysis_cmse_entry_generic =
functions with the `"C-cmse-nonsecure-entry"` ABI cannot contain generics in their type

hir_analysis_cmse_inputs_stack_spill =
arguments for `"{$abi_name}"` function too large to pass via registers
arguments for `{$abi}` function too large to pass via registers
.label = {$plural ->
[false] this argument doesn't
*[true] these arguments don't
} fit in the available registers
.note = functions with the `"{$abi_name}"` ABI must pass all their arguments via the 4 32-bit available argument registers
.note = functions with the `{$abi}` ABI must pass all their arguments via the 4 32-bit available argument registers

hir_analysis_cmse_output_stack_spill =
return value of `"{$abi_name}"` function too large to pass via registers
return value of `{$abi}` function too large to pass via registers
.label = this type doesn't fit in the available registers
.note1 = functions with the `"{$abi_name}"` ABI must pass their result via the available return registers
.note1 = functions with the `{$abi}` ABI must pass their result via the available return registers
.note2 = the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size

hir_analysis_coerce_pointee_no_field = `CoercePointee` can only be derived on `struct`s with at least one field
Expand Down
7 changes: 4 additions & 3 deletions compiler/rustc_hir_analysis/src/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,9 +614,10 @@ impl<'tcx> HirTyLowerer<'tcx> for ItemCtxt<'tcx> {
if !infer_replacements.is_empty() {
diag.multipart_suggestion(
format!(
"try replacing `_` with the type{} in the corresponding trait method signature",
rustc_errors::pluralize!(infer_replacements.len()),
),
"try replacing `_` with the type{} in the corresponding trait method \
signature",
rustc_errors::pluralize!(infer_replacements.len()),
),
infer_replacements,
Applicability::MachineApplicable,
);
Expand Down
5 changes: 3 additions & 2 deletions compiler/rustc_hir_analysis/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Errors emitted by `rustc_hir_analysis`.

use rustc_abi::ExternAbi;
use rustc_errors::codes::*;
use rustc_errors::{
Applicability, Diag, DiagCtxtHandle, Diagnostic, EmissionGuarantee, Level, MultiSpan,
Expand Down Expand Up @@ -1689,7 +1690,7 @@ pub(crate) struct CmseInputsStackSpill {
#[label]
pub span: Span,
pub plural: bool,
pub abi_name: &'static str,
pub abi: ExternAbi,
}

#[derive(Diagnostic)]
Expand All @@ -1700,7 +1701,7 @@ pub(crate) struct CmseOutputStackSpill {
#[primary_span]
#[label]
pub span: Span,
pub abi_name: &'static str,
pub abi: ExternAbi,
}

#[derive(Diagnostic)]
Expand Down
10 changes: 4 additions & 6 deletions compiler/rustc_hir_analysis/src/hir_ty_lowering/cmse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ pub(crate) fn validate_cmse_abi<'tcx>(
abi: ExternAbi,
fn_sig: ty::PolyFnSig<'tcx>,
) {
let abi_name = abi.name();

match abi {
ExternAbi::CCmseNonSecureCall => {
let hir_node = tcx.hir_node(hir_id);
Expand Down Expand Up @@ -56,7 +54,7 @@ pub(crate) fn validate_cmse_abi<'tcx>(
.to(bare_fn_ty.decl.inputs[index].span)
.to(bare_fn_ty.decl.inputs.last().unwrap().span);
let plural = bare_fn_ty.param_names.len() - index != 1;
dcx.emit_err(errors::CmseInputsStackSpill { span, plural, abi_name });
dcx.emit_err(errors::CmseInputsStackSpill { span, plural, abi });
}
Err(layout_err) => {
if should_emit_generic_error(abi, layout_err) {
Expand All @@ -69,7 +67,7 @@ pub(crate) fn validate_cmse_abi<'tcx>(
Ok(true) => {}
Ok(false) => {
let span = bare_fn_ty.decl.output.span();
dcx.emit_err(errors::CmseOutputStackSpill { span, abi_name });
dcx.emit_err(errors::CmseOutputStackSpill { span, abi });
}
Err(layout_err) => {
if should_emit_generic_error(abi, layout_err) {
Expand All @@ -92,7 +90,7 @@ pub(crate) fn validate_cmse_abi<'tcx>(
// ^^^^^^
let span = decl.inputs[index].span.to(decl.inputs.last().unwrap().span);
let plural = decl.inputs.len() - index != 1;
dcx.emit_err(errors::CmseInputsStackSpill { span, plural, abi_name });
dcx.emit_err(errors::CmseInputsStackSpill { span, plural, abi });
}
Err(layout_err) => {
if should_emit_generic_error(abi, layout_err) {
Expand All @@ -105,7 +103,7 @@ pub(crate) fn validate_cmse_abi<'tcx>(
Ok(true) => {}
Ok(false) => {
let span = decl.output.span();
dcx.emit_err(errors::CmseOutputStackSpill { span, abi_name });
dcx.emit_err(errors::CmseOutputStackSpill { span, abi });
}
Err(layout_err) => {
if should_emit_generic_error(abi, layout_err) {
Expand Down
55 changes: 38 additions & 17 deletions compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use rustc_errors::{
Applicability, Diag, ErrorGuaranteed, MultiSpan, listify, pluralize, struct_span_code_err,
};
use rustc_hir as hir;
use rustc_hir::def::{DefKind, Res};
use rustc_hir::def::{CtorOf, DefKind, Res};
use rustc_hir::def_id::DefId;
use rustc_middle::bug;
use rustc_middle::ty::fast_reject::{TreatParams, simplify_type};
Expand Down Expand Up @@ -1027,7 +1027,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
&self,
segments: impl Iterator<Item = &'a hir::PathSegment<'a>> + Clone,
args_visitors: impl Iterator<Item = &'a hir::GenericArg<'a>> + Clone,
err_extend: GenericsArgsErrExtend<'_>,
err_extend: GenericsArgsErrExtend<'a>,
) -> ErrorGuaranteed {
#[derive(PartialEq, Eq, Hash)]
enum ProhibitGenericsArg {
Expand All @@ -1047,23 +1047,24 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
};
});

let segments: Vec<_> = segments.collect();
let types_and_spans: Vec<_> = segments
.clone()
.iter()
.flat_map(|segment| {
if segment.args().args.is_empty() {
None
} else {
Some((
match segment.res {
hir::def::Res::PrimTy(ty) => {
Res::PrimTy(ty) => {
format!("{} `{}`", segment.res.descr(), ty.name())
}
hir::def::Res::Def(_, def_id)
Res::Def(_, def_id)
if let Some(name) = self.tcx().opt_item_name(def_id) =>
{
format!("{} `{name}`", segment.res.descr())
}
hir::def::Res::Err => "this type".to_string(),
Res::Err => "this type".to_string(),
_ => segment.res.descr().to_string(),
},
segment.ident.span,
Expand All @@ -1074,11 +1075,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
let this_type = listify(&types_and_spans, |(t, _)| t.to_string())
.expect("expected one segment to deny");

let arg_spans: Vec<Span> = segments
.clone()
.flat_map(|segment| segment.args().args)
.map(|arg| arg.span())
.collect();
let arg_spans: Vec<Span> =
segments.iter().flat_map(|segment| segment.args().args).map(|arg| arg.span()).collect();

let mut kinds = Vec::with_capacity(4);
prohibit_args.iter().for_each(|arg| match arg {
Expand All @@ -1103,7 +1101,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
for (what, span) in types_and_spans {
err.span_label(span, format!("not allowed on {what}"));
}
generics_args_err_extend(self.tcx(), segments, &mut err, err_extend);
generics_args_err_extend(self.tcx(), segments.into_iter(), &mut err, err_extend);
err.emit()
}

Expand Down Expand Up @@ -1400,15 +1398,15 @@ pub enum GenericsArgsErrExtend<'tcx> {
},
SelfTyParam(Span),
Param(DefId),
DefVariant,
DefVariant(&'tcx [hir::PathSegment<'tcx>]),
None,
}

fn generics_args_err_extend<'a>(
tcx: TyCtxt<'_>,
segments: impl Iterator<Item = &'a hir::PathSegment<'a>> + Clone,
err: &mut Diag<'_>,
err_extend: GenericsArgsErrExtend<'_>,
err_extend: GenericsArgsErrExtend<'a>,
) {
match err_extend {
GenericsArgsErrExtend::EnumVariant { qself, assoc_segment, adt_def } => {
Expand Down Expand Up @@ -1496,6 +1494,32 @@ fn generics_args_err_extend<'a>(
];
err.multipart_suggestion_verbose(msg, suggestion, Applicability::MaybeIncorrect);
}
GenericsArgsErrExtend::DefVariant(segments) => {
let args: Vec<Span> = segments
.iter()
.filter_map(|segment| match segment.res {
Res::Def(
DefKind::Ctor(CtorOf::Variant, _) | DefKind::Variant | DefKind::Enum,
_,
) => segment.args().span_ext().map(|s| s.with_lo(segment.ident.span.hi())),
_ => None,
})
.collect();
if args.len() > 1
&& let Some(span) = args.into_iter().last()
{
err.note(
"generic arguments are not allowed on both an enum and its variant's path \
segments simultaneously; they are only valid in one place or the other",
);
err.span_suggestion_verbose(
span,
"remove the generics arguments from one of the path segments",
String::new(),
Applicability::MaybeIncorrect,
);
}
}
GenericsArgsErrExtend::PrimTy(prim_ty) => {
let name = prim_ty.name_str();
for segment in segments {
Expand All @@ -1512,9 +1536,6 @@ fn generics_args_err_extend<'a>(
GenericsArgsErrExtend::OpaqueTy => {
err.note("`impl Trait` types can't have type parameters");
}
GenericsArgsErrExtend::DefVariant => {
err.note("enum variants can't have type parameters");
}
GenericsArgsErrExtend::Param(def_id) => {
let span = tcx.def_ident_span(def_id).unwrap();
let kind = tcx.def_descr(def_id);
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
pub fn prohibit_generic_args<'a>(
&self,
segments: impl Iterator<Item = &'a hir::PathSegment<'a>> + Clone,
err_extend: GenericsArgsErrExtend<'_>,
err_extend: GenericsArgsErrExtend<'a>,
) -> Result<(), ErrorGuaranteed> {
let args_visitors = segments.clone().flat_map(|segment| segment.args().args);
let mut result = Ok(());
Expand Down Expand Up @@ -1911,7 +1911,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
path.segments.iter().enumerate().filter_map(|(index, seg)| {
if !indices.contains(&index) { Some(seg) } else { None }
}),
GenericsArgsErrExtend::DefVariant,
GenericsArgsErrExtend::DefVariant(&path.segments),
);

let GenericPathSegment(def_id, index) = generic_segments.last().unwrap();
Expand Down
7 changes: 6 additions & 1 deletion compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1043,12 +1043,17 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {

let mut user_self_ty = None;
let mut is_alias_variant_ctor = false;
let mut err_extend = GenericsArgsErrExtend::None;
match res {
Res::Def(DefKind::Ctor(CtorOf::Variant, _), _) if let Some(self_ty) = self_ty => {
let adt_def = self_ty.normalized.ty_adt_def().unwrap();
user_self_ty =
Some(UserSelfTy { impl_def_id: adt_def.did(), self_ty: self_ty.raw });
is_alias_variant_ctor = true;
err_extend = GenericsArgsErrExtend::DefVariant(segments);
}
Res::Def(DefKind::Ctor(CtorOf::Variant, _), _) => {
err_extend = GenericsArgsErrExtend::DefVariant(segments);
}
Res::Def(DefKind::AssocFn | DefKind::AssocConst, def_id) => {
let assoc_item = tcx.associated_item(def_id);
Expand Down Expand Up @@ -1095,7 +1100,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
segments.iter().enumerate().filter_map(|(index, seg)| {
if !indices.contains(&index) || is_alias_variant_ctor { Some(seg) } else { None }
}),
GenericsArgsErrExtend::None,
err_extend,
);

if let Res::Local(hid) = res {
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_lint/src/early/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ pub(super) fn decorate_lint(
.decorate_lint(diag);
}
BuiltinLintDiag::MissingAbi(label_span, default_abi) => {
lints::MissingAbi { span: label_span, default_abi: default_abi.name() }
.decorate_lint(diag);
lints::MissingAbi { span: label_span, default_abi }.decorate_lint(diag);
}
BuiltinLintDiag::LegacyDeriveHelpers(label_span) => {
lints::LegacyDeriveHelpers { span: label_span }.decorate_lint(diag);
Expand Down
5 changes: 3 additions & 2 deletions compiler/rustc_lint/src/lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#![allow(rustc::untranslatable_diagnostic)]
use std::num::NonZero;

use rustc_abi::ExternAbi;
use rustc_errors::codes::*;
use rustc_errors::{
Applicability, Diag, DiagArgValue, DiagMessage, DiagStyledString, ElidedLifetimeInPathSubdiag,
Expand Down Expand Up @@ -2833,9 +2834,9 @@ pub(crate) struct PatternsInFnsWithoutBodySub {
#[derive(LintDiagnostic)]
#[diag(lint_extern_without_abi)]
pub(crate) struct MissingAbi {
#[suggestion(code = "extern \"{default_abi}\"", applicability = "machine-applicable")]
#[suggestion(code = "extern {default_abi}", applicability = "machine-applicable")]
pub span: Span,
pub default_abi: &'static str,
pub default_abi: ExternAbi,
}

#[derive(LintDiagnostic)]
Expand Down
7 changes: 1 addition & 6 deletions compiler/rustc_mir_transform/src/function_item_references.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,7 @@ impl<'tcx> FunctionItemRefChecker<'_, 'tcx> {
let unsafety = fn_sig.safety().prefix_str();
let abi = match fn_sig.abi() {
ExternAbi::Rust => String::from(""),
other_abi => {
let mut s = String::from("extern \"");
s.push_str(other_abi.name());
s.push_str("\" ");
s
}
other_abi => format!("extern {other_abi} "),
};
let ident = self.tcx.item_ident(fn_id);
let ty_params = fn_args.types().map(|ty| format!("{ty}"));
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1790,7 +1790,7 @@ supported_targets! {
("x86_64-unknown-l4re-uclibc", x86_64_unknown_l4re_uclibc),

("aarch64-unknown-redox", aarch64_unknown_redox),
("i686-unknown-redox", i686_unknown_redox),
("i586-unknown-redox", i586_unknown_redox),
("x86_64-unknown-redox", x86_64_unknown_redox),

("i386-apple-ios", i386_apple_ios),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub(crate) fn target() -> Target {
base.stack_probes = StackProbeType::Call;

Target {
llvm_target: "i686-unknown-redox".into(),
llvm_target: "i586-unknown-redox".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/f128.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Constants for the `f128` double-precision floating point type.
//! Constants for the `f128` quadruple-precision floating point type.
//!
//! *[See also the `f128` primitive type](primitive@f128).*
//!
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/f16.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Constants for the `f16` double-precision floating point type.
//! Constants for the `f16` half-precision floating point type.
//!
//! *[See also the `f16` primitive type](primitive@f16).*
//!
Expand Down
5 changes: 3 additions & 2 deletions src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl Step for Std {
// The LLD wrappers and `rust-lld` are self-contained linking components that can be
// necessary to link the stdlib on some targets. We'll also need to copy these binaries to
// the `stage0-sysroot` to ensure the linker is found when bootstrapping on such a target.
if compiler.stage == 0 && compiler.host == builder.config.build {
if compiler.stage == 0 && builder.is_builder_target(&compiler.host) {
// We want to copy the host `bin` folder within the `rustlib` folder in the sysroot.
let src_sysroot_bin = builder
.rustc_snapshot_sysroot()
Expand Down Expand Up @@ -2310,7 +2310,8 @@ pub fn strip_debug(builder: &Builder<'_>, target: TargetSelection, path: &Path)
// FIXME: to make things simpler for now, limit this to the host and target where we know
// `strip -g` is both available and will fix the issue, i.e. on a x64 linux host that is not
// cross-compiling. Expand this to other appropriate targets in the future.
if target != "x86_64-unknown-linux-gnu" || target != builder.config.build || !path.exists() {
if target != "x86_64-unknown-linux-gnu" || !builder.is_builder_target(&target) || !path.exists()
{
return;
}

Expand Down
Loading
Loading