Skip to content

Rollup of 17 pull requests #145598

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

Closed
wants to merge 64 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
c6ac515
fmt of non-decimals is always non-negative due to the two's-complemen…
pascaldekloe Jun 26, 2025
7704a39
fmt benchmarks for binary, octal and hex
pascaldekloe Jun 29, 2025
ad61b31
Correct some grammar in integer documentation
tgross35 Aug 1, 2025
4ad8606
fmt with table lookup for binary, octal and hex
pascaldekloe Jul 8, 2025
d85a645
Require approval from t-infra instead of t-release on tier bumps
Kobzol Aug 4, 2025
0246245
rustc_target: Add the `32s` target feature for LoongArch
heiher Aug 8, 2025
fb04c5e
dec2flt: Provide more valid inputs examples
jstasiak Aug 11, 2025
2f796d9
Make a James Bond reference
jstasiak Aug 11, 2025
3339fa5
check args in new_coroutine_witness
lcnr Aug 12, 2025
f979bf0
`fn new_coroutine_witness_for_coroutine` woops
lcnr Aug 12, 2025
4d84149
add test
lcnr Aug 12, 2025
0c8485f
suggest using `pub(crate)` for E0364
makai410 Aug 13, 2025
c855a2f
Hide docs for core::unicode
clarfonthey Aug 13, 2025
ab3717b
rough solution
karolzwolak Apr 28, 2025
9e387a1
simplify the note message
karolzwolak Apr 28, 2025
8bd3a48
bless the tests
karolzwolak Apr 28, 2025
c036255
manually fix rest of the tests
karolzwolak Apr 29, 2025
4e96b2a
add test
karolzwolak Apr 29, 2025
c812af9
don't show the group name for external lints
karolzwolak May 7, 2025
f229895
bless clippy tests
karolzwolak May 7, 2025
d72a98f
add comments and LintGroup struct for more clarity
karolzwolak May 7, 2025
bdff809
fix typo in test
karolzwolak May 9, 2025
002ac81
link rustc_lint module in a comment
karolzwolak May 9, 2025
f39cd04
closure instead of nested fn, remove allow_external arg, and use .find()
karolzwolak May 30, 2025
fe5cec7
add additional example in the error to showcase the behavior
karolzwolak May 30, 2025
4a381ff
rename LintStoreMarker trait to DynLintStore
karolzwolak Jun 1, 2025
c054b48
Revert "link rustc_lint module in a comment"
karolzwolak Jun 1, 2025
4d62bf1
All weak lang items have an explicit link name and vice versa
bjorn3 Aug 15, 2025
f3ef465
Combining no_mangle and rustc_std_internal_symbol is not allowed
bjorn3 Aug 15, 2025
460519a
Merge link_name and export_name
bjorn3 Aug 15, 2025
f94a0d0
Remove unused feature gate
bjorn3 Aug 15, 2025
c3c2c23
Extend `QueryStability` to handle `IntoIterator` implementations
smoelius Apr 4, 2025
e31fed0
run spellcheck as a tidy extra check in ci
lolbinarycat Aug 6, 2025
1f77424
fmt::DisplayInt abstraction obsolete with better macro
pascaldekloe Jul 10, 2025
1cb4fd7
tidy now installs typos-cli as-needed via cargo
lolbinarycat Aug 8, 2025
6a51eef
tidy: run typos check in src root, not current dir
lolbinarycat Aug 9, 2025
d73e6b4
tidy: add better error reporting for if typos can't be run
lolbinarycat Aug 8, 2025
0d797d2
typos: allow moreso
lolbinarycat Aug 16, 2025
2050a3b
std: fix more typos
lolbinarycat Aug 16, 2025
3b0ff9c
Add `//@ ignore-stage1` to query_stability.rs test
smoelius Aug 17, 2025
1cd7080
Add -Zindirect-branch-cs-prefix (from draft PR)
Darksonn May 7, 2025
1a29d9c
Add `-Zindirect-branch-cs-prefix` option
ojeda May 7, 2025
f5e43d5
nll-relate: improve hr opaque types support
lcnr Jun 5, 2025
aa3008d
implement std::fs::set_permissions_nofollow on unix
lolbinarycat Jun 24, 2025
ece1397
interpret: fix in-place return place semantics when the return place …
RalfJung Aug 18, 2025
dc72692
Add tracing to various miscellaneous functions
Stypox Aug 12, 2025
7dfbc0a
miri: detect passing the same local twice as an in-place argument
RalfJung Aug 18, 2025
8a86982
Rollup merge of #139345 - smoelius:into-iter-stability, r=lcnr
jieyouxu Aug 19, 2025
87c176e
Rollup merge of #140740 - ojeda:indirect-branch-cs-prefix, r=davidtwco
jieyouxu Aug 19, 2025
dc37fdf
Rollup merge of #140794 - karolzwolak:allow-unused-doc-65464, r=david…
jieyouxu Aug 19, 2025
0394334
Rollup merge of #142079 - lcnr:opaque-types-universes, r=BoxyUwU
jieyouxu Aug 19, 2025
773efb0
Rollup merge of #142938 - lolbinarycat:std-set_permissions_nofollow, …
jieyouxu Aug 19, 2025
59afcaf
Rollup merge of #143730 - pascaldekloe:fmt-radix-trim, r=tgross35
jieyouxu Aug 19, 2025
0d59cdf
Rollup merge of #144767 - tgross35:doc-grammar, r=ibraheemdev
jieyouxu Aug 19, 2025
43631cc
Rollup merge of #144906 - Kobzol:infra-team-tier-bump, r=davidtwco
jieyouxu Aug 19, 2025
6e46147
Rollup merge of #145025 - lolbinarycat:ci-tidy-spellcheck, r=Kobzol
jieyouxu Aug 19, 2025
16695db
Rollup merge of #145099 - heiher:loong-32s, r=folkertdev
jieyouxu Aug 19, 2025
bb1b595
Rollup merge of #145166 - makai410:teach-pub-crate, r=lcnr
jieyouxu Aug 19, 2025
bb18cd5
Rollup merge of #145255 - lune-climate:dec2flt-doc, r=ibraheemdev
jieyouxu Aug 19, 2025
f8ec501
Rollup merge of #145306 - Stypox:tracing-misc, r=RalfJung
jieyouxu Aug 19, 2025
d5ecb47
Rollup merge of #145336 - clarfonthey:hidden-unicode, r=ibraheemdev
jieyouxu Aug 19, 2025
92009dd
Rollup merge of #145338 - lcnr:coroutine-witness-yikes, r=compiler-er…
jieyouxu Aug 19, 2025
c00f21f
Rollup merge of #145429 - bjorn3:codegen_fn_attrs_improvements, r=jdo…
jieyouxu Aug 19, 2025
72ce0e2
Rollup merge of #145585 - RalfJung:miri-inplace-arg-checks, r=compile…
jieyouxu Aug 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 7 additions & 2 deletions compiler/rustc_borrowck/src/type_check/relate_tys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,13 @@ impl<'a, 'b, 'tcx> NllTypeRelating<'a, 'b, 'tcx> {
// by using `ty_vid rel B` and then finally and end by equating `ty_vid` to
// the opaque.
let mut enable_subtyping = |ty, opaque_is_expected| {
let ty_vid = infcx.next_ty_var_id_in_universe(self.span(), ty::UniverseIndex::ROOT);

// We create the fresh inference variable in the highest universe.
// In theory we could limit it to the highest universe in the args of
// the opaque but that isn't really worth the effort.
//
// We'll make sure that the opaque type can actually name everything
// in its hidden type later on.
let ty_vid = infcx.next_ty_vid(self.span());
let variance = if opaque_is_expected {
self.ambient_variance
} else {
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_builtin_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(assert_matches)]
#![feature(autodiff)]
#![feature(box_patterns)]
#![feature(decl_macro)]
#![feature(if_let_guard)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ pub(crate) fn llfn_attrs_from_instance<'ll, 'tcx>(
to_add.push(llvm::CreateAttrStringValue(cx.llcx, "wasm-import-module", module));

let name =
codegen_fn_attrs.link_name.unwrap_or_else(|| cx.tcx.item_name(instance.def_id()));
codegen_fn_attrs.symbol_name.unwrap_or_else(|| cx.tcx.item_name(instance.def_id()));
let name = name.as_str();
to_add.push(llvm::CreateAttrStringValue(cx.llcx, "wasm-import-name", name));
}
Expand Down
9 changes: 9 additions & 0 deletions compiler/rustc_codegen_llvm/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,15 @@ pub(crate) unsafe fn create_module<'ll>(
}
}

if sess.opts.unstable_opts.indirect_branch_cs_prefix {
llvm::add_module_flag_u32(
llmod,
llvm::ModuleFlagMergeBehavior::Override,
"indirect_branch_cs_prefix",
1,
);
}

match (sess.opts.unstable_opts.small_data_threshold, sess.target.small_data_threshold_support())
{
// Set up the small-data optimization limit for architectures that use
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_codegen_llvm/src/llvm_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
{
None
}
("loongarch32" | "loongarch64", "32s") if get_version().0 < 21 => None,
// Filter out features that are not supported by the current LLVM version
("riscv32" | "riscv64", "zacas") if get_version().0 < 20 => None,
(
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_ssa/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ pub fn is_call_from_compiler_builtins_to_upstream_monomorphization<'tcx>(
instance: Instance<'tcx>,
) -> bool {
fn is_llvm_intrinsic(tcx: TyCtxt<'_>, def_id: DefId) -> bool {
if let Some(name) = tcx.codegen_fn_attrs(def_id).link_name {
if let Some(name) = tcx.codegen_fn_attrs(def_id).symbol_name {
name.as_str().starts_with("llvm.")
} else {
false
Expand Down
28 changes: 15 additions & 13 deletions compiler/rustc_codegen_ssa/src/codegen_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use rustc_ast::{LitKind, MetaItem, MetaItemInner, attr};
use rustc_hir::attrs::{AttributeKind, InlineAttr, InstructionSetAttr, UsedBy};
use rustc_hir::def::DefKind;
use rustc_hir::def_id::{DefId, LOCAL_CRATE, LocalDefId};
use rustc_hir::weak_lang_items::WEAK_LANG_ITEMS;
use rustc_hir::{self as hir, Attribute, LangItem, find_attr, lang_items};
use rustc_middle::middle::codegen_fn_attrs::{
CodegenFnAttrFlags, CodegenFnAttrs, PatchableFunctionEntry,
Expand Down Expand Up @@ -156,15 +155,21 @@ fn process_builtin_attrs(
match p {
AttributeKind::Cold(_) => codegen_fn_attrs.flags |= CodegenFnAttrFlags::COLD,
AttributeKind::ExportName { name, .. } => {
codegen_fn_attrs.export_name = Some(*name)
codegen_fn_attrs.symbol_name = Some(*name)
}
AttributeKind::Inline(inline, span) => {
codegen_fn_attrs.inline = *inline;
interesting_spans.inline = Some(*span);
}
AttributeKind::Naked(_) => codegen_fn_attrs.flags |= CodegenFnAttrFlags::NAKED,
AttributeKind::Align { align, .. } => codegen_fn_attrs.alignment = Some(*align),
AttributeKind::LinkName { name, .. } => codegen_fn_attrs.link_name = Some(*name),
AttributeKind::LinkName { name, .. } => {
// FIXME Remove check for foreign functions once #[link_name] on non-foreign
// functions is a hard error
if tcx.is_foreign_item(did) {
codegen_fn_attrs.symbol_name = Some(*name);
}
}
AttributeKind::LinkOrdinal { ordinal, span } => {
codegen_fn_attrs.link_ordinal = Some(*ordinal);
interesting_spans.link_ordinal = Some(*span);
Expand Down Expand Up @@ -382,7 +387,7 @@ fn apply_overrides(tcx: TyCtxt<'_>, did: LocalDefId, codegen_fn_attrs: &mut Code
// * `#[rustc_std_internal_symbol]` mangles the symbol name in a special way
// both for exports and imports through foreign items. This is handled further,
// during symbol mangling logic.
} else if codegen_fn_attrs.link_name.is_some() {
} else if codegen_fn_attrs.symbol_name.is_some() {
// * This can be overridden with the `#[link_name]` attribute
} else {
// NOTE: there's one more exception that we cannot apply here. On wasm,
Expand Down Expand Up @@ -437,7 +442,7 @@ fn check_result(
}

// error when specifying link_name together with link_ordinal
if let Some(_) = codegen_fn_attrs.link_name
if let Some(_) = codegen_fn_attrs.symbol_name
&& let Some(_) = codegen_fn_attrs.link_ordinal
{
let msg = "cannot use `#[link_name]` with `#[link_ordinal]`";
Expand Down Expand Up @@ -484,14 +489,11 @@ fn handle_lang_items(
// strippable by the linker.
//
// Additionally weak lang items have predetermined symbol names.
if let Some(lang_item) = lang_item {
if WEAK_LANG_ITEMS.contains(&lang_item) {
codegen_fn_attrs.flags |= CodegenFnAttrFlags::RUSTC_STD_INTERNAL_SYMBOL;
}
if let Some(link_name) = lang_item.link_name() {
codegen_fn_attrs.export_name = Some(link_name);
codegen_fn_attrs.link_name = Some(link_name);
}
if let Some(lang_item) = lang_item
&& let Some(link_name) = lang_item.link_name()
{
codegen_fn_attrs.flags |= CodegenFnAttrFlags::RUSTC_STD_INTERNAL_SYMBOL;
codegen_fn_attrs.symbol_name = Some(link_name);
}

// error when using no_mangle on a lang item item
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_codegen_ssa/src/target_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ fn parse_rust_feature_flag<'a>(
while let Some(new_feature) = new_features.pop() {
if features.insert(new_feature) {
if let Some(implied_features) = inverse_implied_features.get(&new_feature) {
#[allow(rustc::potential_query_instability)]
new_features.extend(implied_features)
}
}
Expand Down
12 changes: 9 additions & 3 deletions compiler/rustc_const_eval/src/interpret/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ use crate::{enter_trace_span, fluent_generated as fluent};
pub enum FnArg<'tcx, Prov: Provenance = CtfeProvenance> {
/// Pass a copy of the given operand.
Copy(OpTy<'tcx, Prov>),
/// Allow for the argument to be passed in-place: destroy the value originally stored at that place and
/// make the place inaccessible for the duration of the function call.
/// Allow for the argument to be passed in-place: destroy the value originally stored at that
/// place and make the place inaccessible for the duration of the function call. This *must* be
/// an in-memory place so that we can do the proper alias checks.
InPlace(MPlaceTy<'tcx, Prov>),
}

Expand Down Expand Up @@ -379,6 +380,11 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
}
}

// *Before* pushing the new frame, determine whether the return destination is in memory.
// Need to use `place_to_op` to be *sure* we get the mplace if there is one.
let destination_mplace = self.place_to_op(destination)?.as_mplace_or_imm().left();

// Push the "raw" frame -- this leaves locals uninitialized.
self.push_stack_frame_raw(instance, body, destination, cont)?;

// If an error is raised here, pop the frame again to get an accurate backtrace.
Expand Down Expand Up @@ -496,7 +502,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {

// Protect return place for in-place return value passing.
// We only need to protect anything if this is actually an in-memory place.
if let Left(mplace) = destination.as_mplace_or_local() {
if let Some(mplace) = destination_mplace {
M::protect_in_place_function_argument(self, &mplace)?;
}

Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_const_eval/src/interpret/eval_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
let _trace = enter_trace_span!(
M,
"instantiate_from_frame_and_normalize_erasing_regions",
"{}",
frame.instance
%frame.instance
);
frame
.instance
Expand Down Expand Up @@ -583,6 +582,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
span: Span,
layout: Option<TyAndLayout<'tcx>>,
) -> InterpResult<'tcx, OpTy<'tcx, M::Provenance>> {
let _trace = enter_trace_span!(M, const_eval::eval_mir_constant, ?val);
let const_val = val.eval(*self.tcx, self.typing_env, span).map_err(|err| {
if M::ALL_CONSTS_ARE_PRECHECKED {
match err {
Expand Down
6 changes: 6 additions & 0 deletions compiler/rustc_const_eval/src/interpret/place.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,12 @@ impl<'tcx, Prov: Provenance> PlaceTy<'tcx, Prov> {
}

/// A place is either an mplace or some local.
///
/// Note that the return value can be different even for logically identical places!
/// Specifically, if a local is stored in-memory, this may return `Local` or `MPlaceTy`
/// depending on how the place was constructed. In other words, seeing `Local` here does *not*
/// imply that this place does not point to memory. Every caller must therefore always handle
/// both cases.
#[inline(always)]
pub fn as_mplace_or_local(
&self,
Expand Down
5 changes: 4 additions & 1 deletion compiler/rustc_const_eval/src/interpret/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use super::{
MemoryKind, Operand, PlaceTy, Pointer, Provenance, ReturnAction, Scalar, from_known_layout,
interp_ok, throw_ub, throw_unsup,
};
use crate::errors;
use crate::{enter_trace_span, errors};

// The Phantomdata exists to prevent this type from being `Send`. If it were sent across a thread
// boundary and dropped in the other thread, it would exit the span in the other thread.
Expand Down Expand Up @@ -386,6 +386,9 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {

// Make sure all the constants required by this frame evaluate successfully (post-monomorphization check).
for &const_ in body.required_consts() {
// We can't use `eval_mir_constant` here as that assumes that all required consts have
// already been checked, so we need a separate tracing call.
let _trace = enter_trace_span!(M, const_eval::required_consts, ?const_.const_);
let c =
self.instantiate_from_current_frame_and_normalize_erasing_regions(const_.const_)?;
c.eval(*self.tcx, self.typing_env, const_.span).map_err(|err| {
Expand Down
65 changes: 45 additions & 20 deletions compiler/rustc_const_eval/src/interpret/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use either::Either;
use rustc_abi::{FIRST_VARIANT, FieldIdx};
use rustc_data_structures::fx::FxHashSet;
use rustc_index::IndexSlice;
use rustc_middle::ty::{self, Instance, Ty};
use rustc_middle::{bug, mir, span_bug};
Expand Down Expand Up @@ -389,8 +390,9 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {

/// Evaluate the arguments of a function call
fn eval_fn_call_argument(
&self,
&mut self,
op: &mir::Operand<'tcx>,
move_definitely_disjoint: bool,
) -> InterpResult<'tcx, FnArg<'tcx, M::Provenance>> {
interp_ok(match op {
mir::Operand::Copy(_) | mir::Operand::Constant(_) => {
Expand All @@ -399,24 +401,19 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
FnArg::Copy(op)
}
mir::Operand::Move(place) => {
// If this place lives in memory, preserve its location.
// We call `place_to_op` which will be an `MPlaceTy` whenever there exists
// an mplace for this place. (This is in contrast to `PlaceTy::as_mplace_or_local`
// which can return a local even if that has an mplace.)
let place = self.eval_place(*place)?;
let op = self.place_to_op(&place)?;

match op.as_mplace_or_imm() {
Either::Left(mplace) => FnArg::InPlace(mplace),
Either::Right(_imm) => {
// This argument doesn't live in memory, so there's no place
// to make inaccessible during the call.
// We rely on there not being any stray `PlaceTy` that would let the
// caller directly access this local!
// This is also crucial for tail calls, where we want the `FnArg` to
// stay valid when the old stack frame gets popped.
FnArg::Copy(op)
if move_definitely_disjoint {
// We still have to ensure that no *other* pointers are used to access this place,
// so *if* it is in memory then we have to treat it as `InPlace`.
// Use `place_to_op` to guarantee that we notice it being in memory.
let op = self.place_to_op(&place)?;
match op.as_mplace_or_imm() {
Either::Left(mplace) => FnArg::InPlace(mplace),
Either::Right(_imm) => FnArg::Copy(op),
}
} else {
// We have to force this into memory to detect aliasing among `Move` arguments.
FnArg::InPlace(self.force_allocation(&place)?)
}
}
})
Expand All @@ -425,18 +422,46 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
/// Shared part of `Call` and `TailCall` implementation — finding and evaluating all the
/// necessary information about callee and arguments to make a call.
fn eval_callee_and_args(
&self,
&mut self,
terminator: &mir::Terminator<'tcx>,
func: &mir::Operand<'tcx>,
args: &[Spanned<mir::Operand<'tcx>>],
) -> InterpResult<'tcx, EvaluatedCalleeAndArgs<'tcx, M>> {
let func = self.eval_operand(func, None)?;

// Evaluating function call arguments. The tricky part here is dealing with `Move`
// arguments: we have to ensure no two such arguments alias. This would be most easily done
// by just forcing them all into memory and then doing the usual in-place argument
// protection, but then we'd force *a lot* of arguments into memory. So we do some syntactic
// pre-processing here where if all `move` arguments are syntactically distinct local
// variables (and none is indirect), we can skip the in-memory forcing.
let move_definitely_disjoint = 'move_definitely_disjoint: {
let mut previous_locals = FxHashSet::<mir::Local>::default();
for arg in args {
let mir::Operand::Move(place) = arg.node else {
continue; // we can skip non-`Move` arguments.
};
if place.is_indirect_first_projection() {
// An indirect `Move` argument could alias with anything else...
break 'move_definitely_disjoint false;
}
if !previous_locals.insert(place.local) {
// This local is the base for two arguments! They might overlap.
break 'move_definitely_disjoint false;
}
}
// We found no violation so they are all definitely disjoint.
true
};
let args = args
.iter()
.map(|arg| self.eval_fn_call_argument(&arg.node))
.map(|arg| self.eval_fn_call_argument(&arg.node, move_definitely_disjoint))
.collect::<InterpResult<'tcx, Vec<_>>>()?;

let fn_sig_binder = func.layout.ty.fn_sig(*self.tcx);
let fn_sig_binder = {
let _trace = enter_trace_span!(M, "fn_sig", ty = ?func.layout.ty.kind());
func.layout.ty.fn_sig(*self.tcx)
};
let fn_sig = self.tcx.normalize_erasing_late_bound_regions(self.typing_env, fn_sig_binder);
let extra_args = &args[fn_sig.inputs().len()..];
let extra_args =
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_const_eval/src/interpret/validity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,9 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
let _trace = enter_trace_span!(
M,
"validate_operand",
"recursive={recursive}, reset_provenance_and_padding={reset_provenance_and_padding}, val={val:?}"
recursive,
reset_provenance_and_padding,
?val,
);

// Note that we *could* actually be in CTFE here with `-Zextra-const-ub-checks`, but it's
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_errors/src/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use std::path::Path;
use std::sync::Arc;

use derive_setters::Setters;
use rustc_data_structures::fx::{FxHashMap, FxIndexMap, FxIndexSet};
use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
use rustc_data_structures::sync::{DynSend, IntoDynSyncSend};
use rustc_error_messages::{FluentArgs, SpanLabel};
use rustc_lexer;
Expand Down Expand Up @@ -1853,7 +1853,7 @@ impl HumanEmitter {
&& line_idx + 1 == annotated_file.lines.len(),
);

let mut to_add = FxHashMap::default();
let mut to_add = FxIndexMap::default();

for (depth, style) in depths {
// FIXME(#120456) - is `swap_remove` correct?
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_expand/src/mbe/macro_rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@ pub(super) fn try_match_macro_attr<'matcher, T: Tracker<'matcher>>(
match result {
Success(body_named_matches) => {
psess.gated_spans.merge(gated_spans_snapshot);
#[allow(rustc::potential_query_instability)]
named_matches.extend(body_named_matches);
return Ok((i, rule, named_matches));
}
Expand Down
Loading
Loading