Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
5a8191f
Updated dates
Ko496-glitch Mar 14, 2026
72cdae7
add candidate preference reason
lcnr Mar 15, 2026
d4d17f5
Merge pull request #2797 from lcnr/main
lcnr Mar 15, 2026
0a821cd
Prepare for merging from rust-lang/rust
invalid-email-address Mar 16, 2026
c930610
Merge ref '1e2183119f0e' from rust-lang/rust
invalid-email-address Mar 16, 2026
bcfe977
Merge pull request #2798 from rust-lang/rustc-pull
tshepang Mar 16, 2026
7d82c5d
Fix invalid add of duplicated call locations for the rustdoc scraped …
GuillaumeGomez Mar 17, 2026
00ff819
Prepare for merging from rust-lang/rust
invalid-email-address Mar 18, 2026
f13e2b8
Merge ref '91021ccc7904' from rust-lang/rust
invalid-email-address Mar 18, 2026
ab8492d
Merge pull request #2799 from rust-lang/rustc-pull
tshepang Mar 18, 2026
c399464
Add regression test for #153837
GuillaumeGomez Mar 17, 2026
5ef93c1
Add missing num_internals feature gate to coretests/benches
bjorn3 Mar 20, 2026
d54cf8f
core: Implement `unchecked_funnel_{shl,shr}`
tgross35 Mar 20, 2026
fe363d0
enzyme submodule update
ZuseZ4 Mar 21, 2026
7cd70e3
updated the llvm 21 and 22 links
Ko496-glitch Mar 22, 2026
8059f91
Prepare for merging from rust-lang/rust
invalid-email-address Mar 23, 2026
7af2fef
Merge ref '562dee4820c4' from rust-lang/rust
invalid-email-address Mar 23, 2026
4e2ede2
Merge pull request #2802 from rust-lang/rustc-pull
reddevilmidzy Mar 23, 2026
f0e33ae
removed date-check
Ko496-glitch Mar 23, 2026
23bcfc1
Merge pull request #2796 from Ko496-glitch/update-date-check-march-2026
jyn514 Mar 23, 2026
ff75894
Remove an unhelpful assertion from `force_from_dep_node_inner`
Zalathar Mar 23, 2026
b29d6df
Remove a redundant query cache lookup while forcing
Zalathar Mar 23, 2026
4b52951
Combine `force_from_dep_node_inner` and `force_query`
Zalathar Mar 23, 2026
97b1c31
Also restore the wrapper closure for `promote_from_disk_fn`
Zalathar Mar 23, 2026
6772c82
Update books
rustbot Mar 23, 2026
953210c
Fix `doc_cfg` not working as expected on trait impls
GuillaumeGomez Mar 16, 2026
73fe4c5
Add regression test for #153655
GuillaumeGomez Mar 16, 2026
6fcd011
Correctly handle rustdoc `PlaceholderImplItem` in lints
GuillaumeGomez Mar 16, 2026
24e40f0
Add more comments to explain code
GuillaumeGomez Mar 17, 2026
19876d1
Simplify code and improve code comments
GuillaumeGomez Mar 23, 2026
ae3d87c
Update shebang reference names
ehuss Mar 23, 2026
90ea993
Rename various query cycle things.
nnethercote Mar 17, 2026
da645bd
sembr src/diagnostics/lintstore.md
tshepang Mar 23, 2026
0c3435c
use the more standard column length
tshepang Mar 23, 2026
b638ac4
sembr src/solve/candidate-preference.md
tshepang Mar 23, 2026
320d089
improve solve/candidate-preference.md
tshepang Mar 23, 2026
3b82679
avoid inline external links
tshepang Mar 23, 2026
d029d74
add date-check marker to recent section
tshepang Mar 23, 2026
3ac4ceb
sembr src/borrow-check/region-inference/member-constraints.md
tshepang Mar 23, 2026
c47c07e
whitespace
tshepang Mar 23, 2026
a1e853f
sembr src/early-late-parameters.md
tshepang Mar 23, 2026
85e8310
improve early-late-parameters.md
tshepang Mar 23, 2026
0ad2ede
sembr src/parallel-rustc.md
tshepang Mar 23, 2026
7a18ffb
improve parallel-rustc.md
tshepang Mar 23, 2026
d8d68ba
sembr src/tests/ci.md
tshepang Mar 23, 2026
61d960f
more area to click
tshepang Mar 23, 2026
86319b6
Merge pull request #2803 from rust-lang/tshepang/sembr
tshepang Mar 23, 2026
de15ab0
Store value/side-effect index lists inside `CacheEncoder`
Zalathar Mar 22, 2026
afffa7d
Don't store current-session side effects in `OnDiskCache`
Zalathar Mar 17, 2026
db19c0c
Inline `TyCtxt::load_side_effect` into its only caller
Zalathar Mar 23, 2026
ee15154
Remove an unhelpful assertion from `try_load_query_value`
Zalathar Mar 23, 2026
8a2bd0f
Rollup merge of #153964 - GuillaumeGomez:fix-trait-impl-doc-cfg, r=lo…
jhpratt Mar 24, 2026
1e2a7dc
Rollup merge of #153979 - nnethercote:rename-cycle-things, r=petroche…
jhpratt Mar 24, 2026
355b4f0
Rollup merge of #154132 - bjorn3:fix_missing_feature_gate, r=Mark-Sim…
jhpratt Mar 24, 2026
04f6332
Rollup merge of #154153 - tgross35:funnel-unchecked, r=Mark-Simulacrum
jhpratt Mar 24, 2026
efa7a5e
Rollup merge of #154236 - Zalathar:force-query, r=nnethercote
jhpratt Mar 24, 2026
39343f5
Rollup merge of #154252 - Zalathar:on-disk-cache, r=nnethercote
jhpratt Mar 24, 2026
429c8d4
Rollup merge of #154017 - GuillaumeGomez:duplicated-locs-scraped, r=U…
jhpratt Mar 24, 2026
f098563
Rollup merge of #154163 - ZuseZ4:update-enzyme-march-21-2026, r=oli-obk
jhpratt Mar 24, 2026
3574d57
Rollup merge of #154264 - rustbot:docs-update, r=ehuss
jhpratt Mar 24, 2026
04975e4
Rollup merge of #154282 - tshepang:rdg-sync, r=tshepang
jhpratt Mar 24, 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
1 change: 0 additions & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4573,7 +4573,6 @@ dependencies = [
"rustc_data_structures",
"rustc_errors",
"rustc_hir",
"rustc_index",
"rustc_macros",
"rustc_middle",
"rustc_serialize",
Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_incremental/src/persist/save.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use rustc_data_structures::sync::par_join;
use rustc_middle::dep_graph::{
DepGraph, SerializedDepGraph, WorkProduct, WorkProductId, WorkProductMap,
};
use rustc_middle::query::on_disk_cache;
use rustc_middle::ty::TyCtxt;
use rustc_serialize::Encodable as RustcEncodable;
use rustc_serialize::opaque::FileEncoder;
Expand Down Expand Up @@ -82,7 +83,7 @@ pub(crate) fn save_dep_graph(tcx: TyCtxt<'_>) {

file_format::save_in(sess, query_cache_path, "query cache", |encoder| {
tcx.sess.time("incr_comp_serialize_result_cache", || {
on_disk_cache.serialize(tcx, encoder)
on_disk_cache::OnDiskCache::serialize(tcx, encoder)
})
});
});
Expand Down
31 changes: 9 additions & 22 deletions compiler/rustc_middle/src/dep_graph/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ impl DepGraphData {
// side effect.
std::iter::once(DepNodeIndex::FOREVER_RED_NODE).collect(),
);
tcx.store_side_effect(dep_node_index, side_effect);
tcx.query_system.side_effects.borrow_mut().insert(dep_node_index, side_effect);
dep_node_index
}

Expand All @@ -718,7 +718,13 @@ impl DepGraphData {
#[inline]
fn force_side_effect<'tcx>(&self, tcx: TyCtxt<'tcx>, prev_index: SerializedDepNodeIndex) {
with_deps(TaskDepsRef::Ignore, || {
let side_effect = tcx.load_side_effect(prev_index).unwrap();
let side_effect = tcx
.query_system
.on_disk_cache
.as_ref()
.unwrap()
.load_side_effect(tcx, prev_index)
.unwrap();

// Use `send_and_color` as `promote_node_and_deps_to_current` expects all
// green dependencies. `send_and_color` will also prevent multiple nodes
Expand All @@ -745,7 +751,7 @@ impl DepGraphData {
}

// This will just overwrite the same value for concurrent calls.
tcx.store_side_effect(dep_node_index, side_effect);
tcx.query_system.side_effects.borrow_mut().insert(dep_node_index, side_effect);
})
}

Expand Down Expand Up @@ -1549,23 +1555,4 @@ impl<'tcx> TyCtxt<'tcx> {
fn is_eval_always(self, kind: DepKind) -> bool {
self.dep_kind_vtable(kind).is_eval_always
}

// Interactions with on_disk_cache
fn load_side_effect(
self,
prev_dep_node_index: SerializedDepNodeIndex,
) -> Option<QuerySideEffect> {
self.query_system
.on_disk_cache
.as_ref()
.and_then(|c| c.load_side_effect(self, prev_dep_node_index))
}

#[inline(never)]
#[cold]
fn store_side_effect(self, dep_node_index: DepNodeIndex, side_effect: QuerySideEffect) {
if let Some(c) = self.query_system.on_disk_cache.as_ref() {
c.store_side_effect(dep_node_index, side_effect)
}
}
}
9 changes: 9 additions & 0 deletions compiler/rustc_middle/src/dep_graph/serialized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ rustc_index::newtype_index! {
pub struct SerializedDepNodeIndex {}
}

impl SerializedDepNodeIndex {
/// Converts a current-session dep node index to a "serialized" index,
/// for the purpose of serializing data to be loaded by future sessions.
#[inline(always)]
pub fn from_curr_for_serialization(index: DepNodeIndex) -> Self {
SerializedDepNodeIndex::from_u32(index.as_u32())
}
}

const DEP_NODE_SIZE: usize = size_of::<SerializedDepNodeIndex>();
/// Amount of padding we need to add to the edge list data so that we can retrieve every
/// SerializedDepNodeIndex with a fixed-size read then mask.
Expand Down
8 changes: 3 additions & 5 deletions compiler/rustc_middle/src/hooks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use rustc_span::def_id::{CrateNum, LocalDefId};
use rustc_span::{ExpnHash, ExpnId};

use crate::mir;
use crate::query::on_disk_cache::{CacheEncoder, EncodedDepNodeIndex};
use crate::query::on_disk_cache::CacheEncoder;
use crate::ty::{Ty, TyCtxt};

macro_rules! declare_hooks {
Expand Down Expand Up @@ -111,10 +111,8 @@ declare_hooks! {
/// Creates the MIR for a given `DefId`, including unreachable code.
hook build_mir_inner_impl(def: LocalDefId) -> mir::Body<'tcx>;

hook encode_query_values(
encoder: &mut CacheEncoder<'_, 'tcx>,
query_result_index: &mut EncodedDepNodeIndex
) -> ();
/// Serializes all eligible query return values into the on-disk cache.
hook encode_query_values(encoder: &mut CacheEncoder<'_, 'tcx>) -> ();
}

#[cold]
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_middle/src/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ use crate::{mir, thir};
// `Providers` that the driver creates (using several `rustc_*` crates).
//
// The result type of each query must implement `Clone`. Additionally
// `ty::query::from_cycle_error::FromCycleError` can be implemented which produces an appropriate
// `QueryVTable::handle_cycle_error_fn` can be used to produce an appropriate
// placeholder (error) value if the query resulted in a query cycle.
// Queries without a `FromCycleError` implementation will raise a fatal error on query
// cycles instead.
// Queries without a custom `handle_cycle_error_fn` implementation will raise a
// fatal error on query cycles instead.
rustc_queries! {
/// Caches the expansion of a derive proc macro, e.g. `#[derive(Serialize)]`.
/// The key is:
Expand Down Expand Up @@ -577,7 +577,7 @@ rustc_queries! {

/// Checks whether a type is representable or infinitely sized
//
// Infinitely sized types will cause a cycle. The `value_from_cycle_error` impl will print
// Infinitely sized types will cause a cycle. The query's `handle_cycle_error_fn` will print
// a custom error about the infinite size and then abort compilation. (In the past we
// recovered and continued, but in practice that leads to confusing subsequent error
// messages about cycles that then abort.)
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_middle/src/query/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::sync::Arc;
use parking_lot::{Condvar, Mutex};
use rustc_span::Span;

use crate::query::CycleError;
use crate::query::Cycle;
use crate::ty::TyCtxt;

/// A value uniquely identifying an active query job.
Expand Down Expand Up @@ -59,7 +59,7 @@ pub struct QueryWaiter<'tcx> {
pub parent: Option<QueryJobId>,
pub condvar: Condvar,
pub span: Span,
pub cycle: Mutex<Option<CycleError<'tcx>>>,
pub cycle: Mutex<Option<Cycle<'tcx>>>,
}

#[derive(Clone, Debug)]
Expand All @@ -79,7 +79,7 @@ impl<'tcx> QueryLatch<'tcx> {
tcx: TyCtxt<'tcx>,
query: Option<QueryJobId>,
span: Span,
) -> Result<(), CycleError<'tcx>> {
) -> Result<(), Cycle<'tcx>> {
let mut waiters_guard = self.waiters.lock();
let Some(waiters) = &mut *waiters_guard else {
return Ok(()); // already complete
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_middle/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ pub use self::into_query_key::IntoQueryKey;
pub use self::job::{QueryJob, QueryJobId, QueryLatch, QueryWaiter};
pub use self::keys::{AsLocalQueryKey, LocalCrate, QueryKey};
pub use self::plumbing::{
ActiveKeyStatus, CycleError, EnsureMode, QueryMode, QueryState, QuerySystem, QueryVTable,
TyCtxtAt, TyCtxtEnsureDone, TyCtxtEnsureOk, TyCtxtEnsureResult,
ActiveKeyStatus, Cycle, EnsureMode, QueryMode, QueryState, QuerySystem, QueryVTable, TyCtxtAt,
TyCtxtEnsureDone, TyCtxtEnsureOk, TyCtxtEnsureResult,
};
pub use self::stack::QueryStackFrame;
pub use crate::queries::Providers;
Expand Down
Loading
Loading