Skip to content

Rollup of 33 pull requests #145588

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 79 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
ad61b31
Correct some grammar in integer documentation
tgross35 Aug 1, 2025
d85a645
Require approval from t-infra instead of t-release on tier bumps
Kobzol Aug 4, 2025
fb04c5e
dec2flt: Provide more valid inputs examples
jstasiak Aug 11, 2025
2f796d9
Make a James Bond reference
jstasiak Aug 11, 2025
0c8485f
suggest using `pub(crate)` for E0364
makai410 Aug 13, 2025
c855a2f
Hide docs for core::unicode
clarfonthey Aug 13, 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
ef3bb6f
Do not strip binaries in bootstrap everytime if they are unchanged
Kobzol Aug 15, 2025
c3c2c23
Extend `QueryStability` to handle `IntoIterator` implementations
smoelius Apr 4, 2025
b79ab44
stabilize const pathbuf osstring new
Kivooeo Aug 15, 2025
eb3e0d4
Properly recover from parenthesized use-bounds (precise capturing)
fmease Aug 15, 2025
e906a59
Fix `unicode_data.rs` mention message
Urgau Aug 16, 2025
3450975
remove `should_render` in `PrintAttribute` derive
fee1-dead Aug 16, 2025
f8f7c27
Clean up parsers related to generic bounds
fmease Aug 15, 2025
e31fed0
run spellcheck as a tidy extra check in ci
lolbinarycat Aug 6, 2025
6c15339
Simplify decode_span.
cjgillot Aug 16, 2025
a843730
Simplify span_data_to_lines_and_cols.
cjgillot Aug 16, 2025
f35d001
Visit and print async_fut local for async drop.
cjgillot Aug 13, 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
8792010
Rust build fails on OpenBSD after using file_lock feature
semarie Aug 16, 2025
3b0ff9c
Add `//@ ignore-stage1` to query_stability.rs test
smoelius Aug 17, 2025
9878616
resolve: debug for block module
bvanjoi 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
cbfa17a
Reorder `lto` options from most to least optimizing
smoelius Aug 17, 2025
75e0263
Rehome tests/ui/issues/ tests [5/?]
Oneirical Jul 13, 2025
c7cd1b3
Do not consider a `T: !Sized` candidate to satisfy a `T: !MetaSized` …
zachs18 Aug 10, 2025
ab19755
bufreader::Buffer::backshift: don't move the uninit bytes
lolbinarycat Aug 17, 2025
479e31e
Don't warn no-mentions on subtree updates
blyxyas Aug 17, 2025
8074d4f
Update rust maintainers in openharmony.md
huaihuaidelulu Aug 18, 2025
dda17c5
Avoid using `()` in `derive(From)` output.
nnethercote Aug 18, 2025
abcfa43
remove myself from some adhoc-groups and pings
davidtwco Aug 18, 2025
f5e43d5
nll-relate: improve hr opaque types support
lcnr Jun 5, 2025
d417503
Allow stability attributes on extern crates
JonathanBrouwer Aug 18, 2025
e31aea8
Remove unused `PartialOrd`/`Ord` from bootstrap
Kobzol Aug 18, 2025
c335d57
ignore frontmatters in `TokenStream::new`
fee1-dead Aug 18, 2025
d2e1264
Add change tracker entry for `--timings`
jieyouxu Aug 18, 2025
aa3008d
implement std::fs::set_permissions_nofollow on unix
lolbinarycat Jun 24, 2025
dc72692
Add tracing to various miscellaneous functions
Stypox Aug 12, 2025
3dfa803
Rollup merge of #139345 - smoelius:into-iter-stability, r=lcnr
jhpratt Aug 18, 2025
06a79ba
Rollup merge of #140740 - ojeda:indirect-branch-cs-prefix, r=davidtwco
jhpratt Aug 18, 2025
7eddf06
Rollup merge of #142079 - lcnr:opaque-types-universes, r=BoxyUwU
jhpratt Aug 18, 2025
9ce28a7
Rollup merge of #142938 - lolbinarycat:std-set_permissions_nofollow, …
jhpratt Aug 18, 2025
742d0f6
Rollup merge of #144767 - tgross35:doc-grammar, r=ibraheemdev
jhpratt Aug 18, 2025
01ba164
Rollup merge of #144906 - Kobzol:infra-team-tier-bump, r=davidtwco
jhpratt Aug 18, 2025
4d3ed92
Rollup merge of #144983 - Oneirical:uncountable-integer, r=jieyouxu
jhpratt Aug 18, 2025
70172f7
Rollup merge of #145025 - lolbinarycat:ci-tidy-spellcheck, r=Kobzol
jhpratt Aug 18, 2025
ec69df2
Rollup merge of #145166 - makai410:teach-pub-crate, r=lcnr
jhpratt Aug 18, 2025
be481d3
Rollup merge of #145255 - lune-climate:dec2flt-doc, r=ibraheemdev
jhpratt Aug 18, 2025
e26872c
Rollup merge of #145306 - Stypox:tracing-misc, r=RalfJung
jhpratt Aug 18, 2025
6f9f1f4
Rollup merge of #145336 - clarfonthey:hidden-unicode, r=ibraheemdev
jhpratt Aug 18, 2025
3d93ac1
Rollup merge of #145429 - bjorn3:codegen_fn_attrs_improvements, r=jdo…
jhpratt Aug 18, 2025
1a22086
Rollup merge of #145452 - Kobzol:bootstrap-strip, r=jieyouxu
jhpratt Aug 18, 2025
4b5d96e
Rollup merge of #145464 - Kivooeo:stabilize-const_pathbuf_osstring_ne…
jhpratt Aug 18, 2025
beddf06
Rollup merge of #145474 - fmease:paren-use-bounds-fix, r=fee1-dead
jhpratt Aug 18, 2025
32c45a4
Rollup merge of #145486 - Urgau:unicode-mention, r=lqd
jhpratt Aug 18, 2025
c2d7066
Rollup merge of #145493 - fee1-dead-contrib:push-rsqlqymxyyqp, r=jdon…
jhpratt Aug 18, 2025
b9c967c
Rollup merge of #145505 - cjgillot:tweak-span-cache, r=petrochenkov
jhpratt Aug 18, 2025
f69f408
Rollup merge of #145510 - cjgillot:visit-async-drop, r=davidtwco
jhpratt Aug 18, 2025
87909b3
Rollup merge of #145511 - semarie:push-rnytptsoxrxn, r=joshtriplett
jhpratt Aug 18, 2025
da3929e
Rollup merge of #145532 - bvanjoi:debug-resolve-module, r=petrochenkov
jhpratt Aug 18, 2025
3c9d158
Rollup merge of #145533 - smoelius:patch-2, r=lqd
jhpratt Aug 18, 2025
c27490f
Rollup merge of #145537 - zachs18:metasized-negative-bound-fix, r=dav…
jhpratt Aug 18, 2025
08c7279
Rollup merge of #145538 - lolbinarycat:std-bufreader-buffer-backshift…
jhpratt Aug 18, 2025
7ef6c44
Rollup merge of #145542 - blyxyas:no-mentions-subtree, r=Urgau
jhpratt Aug 18, 2025
aa0291c
Rollup merge of #145549 - huaihuaidelulu:patch-2, r=Amanieu,jieyouxu
jhpratt Aug 18, 2025
c305fc7
Rollup merge of #145550 - nnethercote:derive_from-no-unit, r=Kobzol
jhpratt Aug 18, 2025
31f84d3
Rollup merge of #145556 - JonathanBrouwer:extern-crate-stable, r=jdon…
jhpratt Aug 18, 2025
2686886
Rollup merge of #145560 - Kobzol:bootstrap-remove-ord, r=jieyouxu
jhpratt Aug 18, 2025
76df6ef
Rollup merge of #145568 - fee1-dead-contrib:push-uvsonuzxmkus, r=fmease
jhpratt Aug 18, 2025
112d4a2
Rollup merge of #145571 - davidtwco:davidtwco-remove-from-groups, r=lqd
jhpratt Aug 18, 2025
271430e
Rollup merge of #145576 - jieyouxu:bootstrap-timings, r=Kobzol
jhpratt Aug 18, 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
1 change: 1 addition & 0 deletions compiler/rustc_attr_parsing/src/attributes/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Static),
Allow(Target::ForeignFn),
Allow(Target::ForeignStatic),
Allow(Target::ExternCrate),
]);

#[derive(Default)]
Expand Down
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
71 changes: 36 additions & 35 deletions compiler/rustc_builtin_macros/src/deriving/from.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,39 @@ pub(crate) fn expand_deriving_from(
cx.dcx().bug("derive(From) used on something else than an item");
};

// #[derive(From)] is currently usable only on structs with exactly one field.
let field = if let ItemKind::Struct(_, _, data) = &item.kind
&& let [field] = data.fields()
{
Some(field.clone())
} else {
None
let err_span = || {
let item_span = item.kind.ident().map(|ident| ident.span).unwrap_or(item.span);
MultiSpan::from_spans(vec![span, item_span])
};

let from_type = match &field {
Some(field) => Ty::AstTy(field.ty.clone()),
// We don't have a type to put into From<...> if we don't have a single field, so just put
// unit there.
None => Ty::Unit,
// `#[derive(From)]` is currently usable only on structs with exactly one field.
let field = match &item.kind {
ItemKind::Struct(_, _, data) => {
if let [field] = data.fields() {
Ok(field.clone())
} else {
let guar = cx.dcx().emit_err(errors::DeriveFromWrongFieldCount {
span: err_span(),
multiple_fields: data.fields().len() > 1,
});
Err(guar)
}
}
ItemKind::Enum(_, _, _) | ItemKind::Union(_, _, _) => {
let guar = cx.dcx().emit_err(errors::DeriveFromWrongTarget {
span: err_span(),
kind: &format!("{} {}", item.kind.article(), item.kind.descr()),
});
Err(guar)
}
_ => cx.dcx().bug("Invalid derive(From) ADT input"),
};

let from_type = Ty::AstTy(match field {
Ok(ref field) => field.ty.clone(),
Err(guar) => cx.ty(span, ast::TyKind::Err(guar)),
});

let path =
Path::new_(pathvec_std!(convert::From), vec![Box::new(from_type.clone())], PathKind::Std);

Expand Down Expand Up @@ -71,34 +89,17 @@ pub(crate) fn expand_deriving_from(
attributes: thin_vec![cx.attr_word(sym::inline, span)],
fieldless_variants_strategy: FieldlessVariantsStrategy::Default,
combine_substructure: combine_substructure(Box::new(|cx, span, substructure| {
let Some(field) = &field else {
let item_span = item.kind.ident().map(|ident| ident.span).unwrap_or(item.span);
let err_span = MultiSpan::from_spans(vec![span, item_span]);
let error = match &item.kind {
ItemKind::Struct(_, _, data) => {
cx.dcx().emit_err(errors::DeriveFromWrongFieldCount {
span: err_span,
multiple_fields: data.fields().len() > 1,
})
}
ItemKind::Enum(_, _, _) | ItemKind::Union(_, _, _) => {
cx.dcx().emit_err(errors::DeriveFromWrongTarget {
span: err_span,
kind: &format!("{} {}", item.kind.article(), item.kind.descr()),
})
}
_ => cx.dcx().bug("Invalid derive(From) ADT input"),
};

return BlockOrExpr::new_expr(DummyResult::raw_expr(span, Some(error)));
let field = match field {
Ok(ref field) => field,
Err(guar) => {
return BlockOrExpr::new_expr(DummyResult::raw_expr(span, Some(guar)));
}
};

let self_kw = Ident::new(kw::SelfUpper, span);
let expr: Box<ast::Expr> = match substructure.fields {
SubstructureFields::StaticStruct(variant, _) => match variant {
// Self {
// field: value
// }
// Self { field: value }
VariantData::Struct { .. } => cx.expr_struct_ident(
span,
self_kw,
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
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 @@ -182,15 +181,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 @@ -410,7 +415,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 @@ -465,7 +470,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 @@ -512,14 +517,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
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
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
5 changes: 4 additions & 1 deletion compiler/rustc_const_eval/src/interpret/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,10 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
.map(|arg| self.eval_fn_call_argument(&arg.node))
.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
22 changes: 15 additions & 7 deletions compiler/rustc_infer/src/infer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,22 +782,30 @@ impl<'tcx> InferCtxt<'tcx> {
self.inner.borrow_mut().type_variables().num_vars()
}

pub fn next_ty_var(&self, span: Span) -> Ty<'tcx> {
self.next_ty_var_with_origin(TypeVariableOrigin { span, param_def_id: None })
pub fn next_ty_vid(&self, span: Span) -> TyVid {
self.next_ty_vid_with_origin(TypeVariableOrigin { span, param_def_id: None })
}

pub fn next_ty_var_with_origin(&self, origin: TypeVariableOrigin) -> Ty<'tcx> {
let vid = self.inner.borrow_mut().type_variables().new_var(self.universe(), origin);
Ty::new_var(self.tcx, vid)
pub fn next_ty_vid_with_origin(&self, origin: TypeVariableOrigin) -> TyVid {
self.inner.borrow_mut().type_variables().new_var(self.universe(), origin)
}

pub fn next_ty_var_id_in_universe(&self, span: Span, universe: ty::UniverseIndex) -> TyVid {
pub fn next_ty_vid_in_universe(&self, span: Span, universe: ty::UniverseIndex) -> TyVid {
let origin = TypeVariableOrigin { span, param_def_id: None };
self.inner.borrow_mut().type_variables().new_var(universe, origin)
}

pub fn next_ty_var(&self, span: Span) -> Ty<'tcx> {
self.next_ty_var_with_origin(TypeVariableOrigin { span, param_def_id: None })
}

pub fn next_ty_var_with_origin(&self, origin: TypeVariableOrigin) -> Ty<'tcx> {
let vid = self.next_ty_vid_with_origin(origin);
Ty::new_var(self.tcx, vid)
}

pub fn next_ty_var_in_universe(&self, span: Span, universe: ty::UniverseIndex) -> Ty<'tcx> {
let vid = self.next_ty_var_id_in_universe(span, universe);
let vid = self.next_ty_vid_in_universe(span, universe);
Ty::new_var(self.tcx, vid)
}

Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_interface/src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ pub(crate) fn parse_check_cfg(dcx: DiagCtxtHandle<'_>, specs: Vec<String>) -> Ch
.expecteds
.entry(name.name)
.and_modify(|v| match v {
ExpectedValues::Some(v) if !values_any_specified => {
ExpectedValues::Some(v) if !values_any_specified =>
{
#[allow(rustc::potential_query_instability)]
v.extend(values.clone())
}
ExpectedValues::Some(_) => *v = ExpectedValues::Any,
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_interface/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,7 @@ fn test_unstable_options_tracking_hash() {
tracked!(hint_mostly_unused, true);
tracked!(human_readable_cgu_names, true);
tracked!(incremental_ignore_spans, true);
tracked!(indirect_branch_cs_prefix, true);
tracked!(inline_mir, Some(true));
tracked!(inline_mir_hint_threshold, Some(123));
tracked!(inline_mir_threshold, Some(123));
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_lint/src/foreign_modules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ impl ClashingExternDeclarations {
/// symbol's name.
fn name_of_extern_decl(tcx: TyCtxt<'_>, fi: hir::OwnerId) -> SymbolName {
if let Some((overridden_link_name, overridden_link_name_span)) =
tcx.codegen_fn_attrs(fi).link_name.map(|overridden_link_name| {
tcx.codegen_fn_attrs(fi).symbol_name.map(|overridden_link_name| {
// FIXME: Instead of searching through the attributes again to get span
// information, we could have codegen_fn_attrs also give span information back for
// where the attribute was defined. However, until this is found to be a
Expand Down
Loading
Loading