Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b7df3de
rustdoc: Set tracing max_level_info when debug-logging is false
camelid Jul 21, 2026
85adfcf
run intrinsic-test by default on x86_64-gnu
xonx4l Jul 26, 2026
7f8e276
add regression test for stale closure recovery state
TaKO8Ki Jul 27, 2026
da2697d
reset closure recovery state before parsing a statement
TaKO8Ki Jul 27, 2026
7696641
Add regression test for fn-ptr coercion normalization ICE
zakrad Jul 27, 2026
4ab575d
Update `browser-ui-test` version to `0.25.0`
GuillaumeGomez Jul 27, 2026
ff161b1
Many "predicate"-to-"clause" renamings
nnethercote May 28, 2026
51a9794
Improve consistency of proc macro attribute error messages
nnethercote Jul 28, 2026
c9be59d
Improve consistency of `rustc_abi` attribute error messages
nnethercote Jul 28, 2026
02df958
Improve consistency of `rustc_const_stable` attribute error messages
nnethercote Jul 28, 2026
909079f
Improve consistency of `diagnostic::on_const` attribute error messages
nnethercote Jul 28, 2026
6c97237
Improve consistency of `test`/`bench` attribute error messages
nnethercote Jul 28, 2026
8704b63
Improve consistency of unsafe attribute error messages
nnethercote Jul 28, 2026
8bfa429
Add regression test for generic associated function suggestions
chenyukang Jul 28, 2026
c9dbe2b
Use value syntax for associated function suggestions
chenyukang Jul 28, 2026
1d32220
Add missing `"clipboard-read"` permission
GuillaumeGomez Jul 28, 2026
23e9a09
add build.sde to bootstrap.example.toml
xonx4l Jul 28, 2026
e945118
Distinguish the dep-graph index space from the live node count
xmakro Jul 28, 2026
32246e5
Update Rust crate tracing-subscriber to v0.3.23 [SECURITY]
renovate-bot Jul 28, 2026
c35d330
sanitize_standard_fds: clarify macos comment
RalfJung Jul 28, 2026
0d16cb1
use unstable features when updating dependencies
marcoieni Jul 28, 2026
7b8f260
Replace most `Ty::new_fn_def` calls with `type_of` queries directly
Jul 21, 2026
f98529c
fix 404 url in src/doc/rustdoc.md
cuishuang Jul 28, 2026
97b34e9
Rollup merge of #159990 - nnethercote:predicate-to-clause, r=oli-obk
JonathanBrouwer Jul 28, 2026
16fc8be
Rollup merge of #159665 - addiesh:turbofish-fear-me, r=oli-obk
JonathanBrouwer Jul 28, 2026
4786f6e
Rollup merge of #159687 - camelid:rustdoc-max_level_info, r=Mark-Simu…
JonathanBrouwer Jul 28, 2026
f54583e
Rollup merge of #160065 - xmakro:cleanup/dep-graph-index-space-len, r…
JonathanBrouwer Jul 28, 2026
58b44eb
Rollup merge of #159978 - xonx4l:x86-intrinsic-test-default, r=Kobzol
JonathanBrouwer Jul 28, 2026
be9c034
Rollup merge of #160008 - TaKO8Ki:fix-stale-closure-recovery, r=mati865
JonathanBrouwer Jul 28, 2026
ad4c49a
Rollup merge of #160027 - zakrad:regr-test-132767, r=chenyukang
JonathanBrouwer Jul 28, 2026
ee25f18
Rollup merge of #160030 - GuillaumeGomez:update-browser-ui-test, r=Gu…
JonathanBrouwer Jul 28, 2026
6a36ecd
Rollup merge of #160046 - nnethercote:attr-errors-2, r=estebank
JonathanBrouwer Jul 28, 2026
7e1bf01
Rollup merge of #160056 - chenyukang:yukang-fix-159813-assoc-fn-turbo…
JonathanBrouwer Jul 28, 2026
c56150b
Rollup merge of #160069 - renovate-bot:renovate/crate-tracing-subscri…
JonathanBrouwer Jul 28, 2026
9a08af4
Rollup merge of #160071 - RalfJung:sanitize_standard_fds, r=clarfonthey
JonathanBrouwer Jul 28, 2026
ed2a296
Rollup merge of #160076 - marcoieni:renovate-lockfile-update-fix, r=K…
JonathanBrouwer Jul 28, 2026
9723edf
Rollup merge of #160088 - cuishuang:fix_404_url, r=GuillaumeGomez
JonathanBrouwer Jul 28, 2026
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
27 changes: 27 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@
// (still gated by dashboard approval for now)
":maintainLockFilesMonthly",
],
// Cargo manifests in this repository use unstable features.
"env": {
"RUSTC_BOOTSTRAP": "1"
},
// The compiler and rustbook workspaces have path dependencies in these
// submodules.
"cloneSubmodules": true,
"cloneSubmodulesFilter": [
"src/doc/book",
"src/doc/reference"
],
// Require manual approval from the Dependency Dashboard before opening PRs
"dependencyDashboardApproval": true,
// Renovate shouldn't update a PR if it is in the bors merge queue.
Expand All @@ -18,6 +29,22 @@
// No dashboard approval necessary for GitHub Actions updates
"matchManagers": ["github-actions"],
"dependencyDashboardApproval": false
},
{
// Only maintain the Cargo lockfiles managed by update-lockfile.sh.
"matchManagers": ["cargo"],
"matchUpdateTypes": ["lockFileMaintenance"],
"enabled": false
},
{
"matchManagers": ["cargo"],
"matchUpdateTypes": ["lockFileMaintenance"],
"matchFileNames": [
"Cargo.toml",
"library/Cargo.toml",
"src/tools/rustbook/Cargo.toml"
],
"enabled": true
}
],
// Don't manage dependencies inside subtrees. They are updated upstream and
Expand Down
22 changes: 11 additions & 11 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ version = "3.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand Down Expand Up @@ -1261,7 +1261,7 @@ dependencies = [
"libc",
"option-ext",
"redox_users",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand Down Expand Up @@ -1388,7 +1388,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand Down Expand Up @@ -2166,7 +2166,7 @@ dependencies = [
"portable-atomic",
"portable-atomic-util",
"serde_core",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand Down Expand Up @@ -2653,7 +2653,7 @@ version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand Down Expand Up @@ -5084,7 +5084,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand Down Expand Up @@ -5516,7 +5516,7 @@ dependencies = [
"getrandom 0.3.3",
"once_cell",
"rustix",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand All @@ -5535,7 +5535,7 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8c27177b12a6399ffc08b98f76f7c9a1f4fe9fc967c784c5a071fa8d93cf7e1"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand Down Expand Up @@ -5905,9 +5905,9 @@ dependencies = [

[[package]]
name = "tracing-subscriber"
version = "0.3.22"
version = "0.3.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e"
checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319"
dependencies = [
"matchers",
"nu-ansi-term",
Expand Down Expand Up @@ -6513,7 +6513,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand Down
4 changes: 4 additions & 0 deletions bootstrap.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,10 @@
# Set this to "discover" to automatically discover LLDB from the environment.
#build.lldb = "lldb"

# The path to (or name of) the Intel SDE executable, used to run the
# intrinsic-test suite for x86 target features the host CPU may not support.
#build.sde = "sde64"

# The node.js executable to use. Note that this is only used for the emscripten
# target when running tests, otherwise this can be omitted.
#build.nodejs = "node"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::attributes::diagnostic::*;
use crate::attributes::prelude::*;
#[derive(Default)]
pub(crate) struct OnConstParser {
span: Option<Span>,
path_span: Option<Span>,
directive: Option<(Span, Directive)>,
}

Expand All @@ -21,8 +21,8 @@ impl AttributeParser for OnConstParser {
return;
}

let span = cx.attr_span;
this.span = Some(span);
let path_span = cx.attr_path.span;
this.path_span = Some(path_span);

let mode = Mode::DiagnosticOnConst;

Expand All @@ -31,7 +31,7 @@ impl AttributeParser for OnConstParser {
let Some(directive) = parse_directive_items(cx, mode, items.mixed(), true) else {
return;
};
merge_directives(cx, &mut this.directive, (span, directive));
merge_directives(cx, &mut this.directive, (path_span, directive));
},
)];

Expand All @@ -44,8 +44,11 @@ impl AttributeParser for OnConstParser {
]);

fn finalize(self, _cx: &FinalizeContext<'_, '_>) -> Option<AttributeKind> {
if let Some(span) = self.span {
Some(AttributeKind::OnConst { span, directive: self.directive.map(|d| Box::new(d.1)) })
if let Some(path_span) = self.path_span {
Some(AttributeKind::OnConst {
span: path_span,
directive: self.directive.map(|d| Box::new(d.1)),
})
} else {
None
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ impl AttributeParser for ConstStabilityParser {
{
this.stability = Some((
PartialConstStability { level, feature, promotable: false },
cx.attr_span,
cx.attr_path.span,
));
}
},
Expand All @@ -225,7 +225,7 @@ impl AttributeParser for ConstStabilityParser {
{
this.stability = Some((
PartialConstStability { level, feature, promotable: false },
cx.attr_span,
cx.attr_path.span,
));
}
},
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ pub(crate) enum InvalidOnClause {
pub(crate) struct DupesNotAllowed;

#[derive(Diagnostic)]
#[diag("usage of the unsafe `#[{$attr_path}]` attribute")]
#[diag("usage of the unsafe `{$attr_path}` attribute")]
#[note("{$note}")]
pub(crate) struct UnsafeAttribute {
pub attr_path: AttrPath,
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ impl<'diag, 'tcx> MirBorrowckCtxt<'_, 'diag, 'tcx> {
) -> Option<ty::Mutability> {
let tcx = self.infcx.tcx;
let sig = tcx.fn_sig(callee_did).instantiate_identity().skip_binder();
let clauses = tcx.predicates_of(callee_did);
let clauses = tcx.clauses_of(callee_did);

let generic_args = match call_expr.kind {
// For method calls, generic arguments are attached to the call node.
Expand All @@ -688,7 +688,7 @@ impl<'diag, 'tcx> MirBorrowckCtxt<'_, 'diag, 'tcx> {

// First, is there at least one method on one of `param`'s trait bounds?
// This keeps us from suggesting borrowing the argument to `mem::drop`, e.g.
if !clauses.instantiate_identity(tcx).predicates.iter().any(|clause| {
if !clauses.instantiate_identity(tcx).clauses.iter().any(|clause| {
clause.as_trait_clause().is_some_and(|tc| {
tc.self_ty().skip_binder().is_param(param.index)
&& tc.polarity() == ty::PredicatePolarity::Positive
Expand Down Expand Up @@ -738,8 +738,8 @@ impl<'diag, 'tcx> MirBorrowckCtxt<'_, 'diag, 'tcx> {
return false;
}

// Test the callee's predicates, substituting in `ref_ty` for the moved argument type.
clauses.instantiate(tcx, new_args).predicates.iter().all(|clause| {
// Test the callee's clauses, substituting in `ref_ty` for the moved argument type.
clauses.instantiate(tcx, new_args).clauses.iter().all(|clause| {
// Normalize before testing to see through type aliases and projections.
let normalized = tcx
.try_normalize_erasing_regions(
Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_borrowck/src/diagnostics/move_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -643,26 +643,26 @@ impl<'diag, 'tcx> MirBorrowckCtxt<'_, 'diag, 'tcx> {
let closure_hir_id = tcx.local_def_id_to_hir_id(def_id.expect_local());
let hir::Node::Expr(parent) = tcx.parent_hir_node(closure_hir_id) else { return None };

let predicates = match parent.kind {
let gen_clauses = match parent.kind {
hir::ExprKind::Call(callee, _) => {
let ty = typeck_result.node_type_opt(callee.hir_id)?;
let ty::FnDef(fn_def_id, args) = *ty.kind() else { return None };
tcx.predicates_of(fn_def_id).instantiate(tcx, args.no_bound_vars().unwrap())
tcx.clauses_of(fn_def_id).instantiate(tcx, args.no_bound_vars().unwrap())
}
hir::ExprKind::MethodCall(..) => {
let (_, method) = typeck_result.type_dependent_def(parent.hir_id)?;
let args = typeck_result.node_args(parent.hir_id);
tcx.predicates_of(method).instantiate(tcx, args)
tcx.clauses_of(method).instantiate(tcx, args)
}
_ => return None,
};

// Check whether one of the where-bounds requires the closure to impl `Fn[Mut]`
// or `AsyncFn[Mut]`.
for (pred, span) in predicates.predicates.iter().zip(predicates.spans.iter()) {
let pred = pred.skip_norm_wip();
for (clause, span) in gen_clauses.clauses.iter().zip(gen_clauses.spans.iter()) {
let clause = clause.skip_norm_wip();
let dominated_by_fn_trait = self
.closure_clause_kind(pred, def_id, asyncness)
.closure_clause_kind(clause, def_id, asyncness)
.is_some_and(|kind| matches!(kind, ty::ClosureKind::Fn | ty::ClosureKind::FnMut));
if dominated_by_fn_trait {
// Found `<TyOfCapturingClosure as FnMut>` or
Expand Down
12 changes: 5 additions & 7 deletions compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1210,19 +1210,17 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
return false;
};

tcx.predicates_of(callee_def_id)
.instantiate(tcx, generic_args)
.predicates
.iter()
.any(|predicate| {
predicate.as_trait_clause().is_some_and(|trait_pred| {
tcx.clauses_of(callee_def_id).instantiate(tcx, generic_args).clauses.iter().any(
|clause| {
clause.as_trait_clause().is_some_and(|trait_pred| {
trait_pred.polarity() == ty::PredicatePolarity::Positive
&& tcx.fn_trait_kind_from_def_id(trait_pred.def_id())
== Some(ty::ClosureKind::Fn)
&& trait_pred.self_ty().skip_binder().peel_refs()
== input_ty.peel_refs()
})
})
},
)
};

// If the HIR node is a function or method call, get the DefId
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_borrowck/src/diagnostics/region_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1167,17 +1167,17 @@ impl<'diag, 'tcx> MirBorrowckCtxt<'_, 'diag, 'tcx> {
}
});

let preds = tcx.predicates_of(method_def_id).instantiate(tcx, args);
let clauses = tcx.clauses_of(method_def_id).instantiate(tcx, args);

let ocx = ObligationCtxt::new(&self.infcx);
ocx.register_obligations(preds.iter().map(|(pred, span)| {
trace!(?pred);
ocx.register_obligations(clauses.iter().map(|(clause, span)| {
trace!(?clause);
Obligation::misc(
tcx,
span,
self.mir_def_id(),
self.infcx.param_env,
pred.skip_norm_wip(),
clause.skip_norm_wip(),
)
}));

Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_borrowck/src/diagnostics/region_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1065,12 +1065,12 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
return None;
};

let predicates: Vec<_> = self
let clauses: Vec<_> = self
.infcx
.tcx
.predicates_of(self.body.source.def_id())
.clauses_of(self.body.source.def_id())
.instantiate_identity(self.infcx.tcx)
.predicates
.clauses
.into_iter()
.map(Unnormalized::skip_norm_wip)
.collect();
Expand All @@ -1081,7 +1081,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
.defining_ty
.upvar_tys()
.iter()
.position(|ty| self.any_param_predicate_mentions(&predicates, ty, region))
.position(|ty| self.any_param_clause_mentions(&clauses, ty, region))
{
let (upvar_name, upvar_span) = self.regioncx.get_upvar_name_and_span_for_region(
self.infcx.tcx,
Expand All @@ -1099,7 +1099,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
.universal_regions()
.unnormalized_input_tys
.iter()
.position(|ty| self.any_param_predicate_mentions(&predicates, *ty, region))
.position(|ty| self.any_param_clause_mentions(&clauses, *ty, region))
{
let (arg_name, arg_span) = self.regioncx.get_argument_name_and_span_for_region(
self.body,
Expand All @@ -1119,7 +1119,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
}
}

fn any_param_predicate_mentions(
fn any_param_clause_mentions(
&self,
clauses: &[ty::Clause<'tcx>],
ty: Ty<'tcx>,
Expand Down
10 changes: 5 additions & 5 deletions compiler/rustc_borrowck/src/type_check/canonical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,18 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
}

#[instrument(level = "debug", skip(self))]
pub(super) fn normalize_and_prove_instantiated_predicates(
pub(super) fn normalize_and_prove_instantiated_clauses(
&mut self,
// Keep this parameter for now, in case we start using
// it in `ConstraintCategory` at some point.
_def_id: DefId,
instantiated_predicates: ty::InstantiatedPredicates<'tcx>,
instantiated_clauses: ty::InstantiatedClauses<'tcx>,
locations: Locations,
) {
for (predicate, span) in instantiated_predicates {
debug!(?span, ?predicate);
for (clause, span) in instantiated_clauses {
debug!(?span, ?clause);
let category = ConstraintCategory::Predicate(span);
let clause = self.normalize_with_category(predicate, locations, category);
let clause = self.normalize_with_category(clause, locations, category);
self.prove_clause(clause, locations, category);
}
}
Expand Down
Loading
Loading