Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2e36598
Stabilize `core::hint::cold_path`
tgross35 Jan 24, 2026
3a48b9f
Stabilize `atomic_try_update`
GrigorenkoPV Nov 6, 2025
2b0cce0
Ignore all debuginfo tests for LLDB that we do not run in CI
workingjubilee Feb 3, 2026
b29a9b6
Move `rustc_query_system::cache` to `rustc_middle::traits`.
nnethercote Feb 7, 2026
b49ab57
Rename `Cache` as `WithDepNodeCache`.
nnethercote Feb 7, 2026
d2020fb
stabilize new inclusive range type and iter
pitaj Dec 30, 2025
d837cf6
feat: Implement `int_from_ascii` for `NonZero<T>`
sorairolake Feb 7, 2026
cd50e62
Linker-plugin-based LTO: Give explanation how to use linker-plugin-lt…
foxtran Feb 1, 2026
9a114c6
Convert to inline diagnostics in `rustc_parse`
JonathanBrouwer Feb 6, 2026
cda9b8c
Split `ComparisonOrShiftInterpretedAsGenericSugg`
JonathanBrouwer Feb 6, 2026
c5587ca
Split `parse_inner_attr` errors by case
JonathanBrouwer Feb 6, 2026
0ef518c
Disable the `run-make/translation` test for now
JonathanBrouwer Feb 6, 2026
00dd7db
Allow more capitalized words
JonathanBrouwer Feb 7, 2026
6fe0999
Rollup merge of #148590 - GrigorenkoPV:atomic_try_update, r=jhpratt
JonathanBrouwer Feb 7, 2026
29079e4
Rollup merge of #150522 - pitaj:stabilize-new-rangeinclusive, r=tgross35
JonathanBrouwer Feb 7, 2026
828b9c2
Rollup merge of #152235 - JonathanBrouwer:convert_parse, r=JonathanBr…
JonathanBrouwer Feb 7, 2026
0a5d0e9
Rollup merge of #152267 - sorairolake:feature/nonzero-from-ascii, r=d…
JonathanBrouwer Feb 7, 2026
27d6b3c
Rollup merge of #151576 - tgross35:stabilize-cold-path, r=jhpratt
JonathanBrouwer Feb 7, 2026
150024e
Rollup merge of #151933 - foxtran:doc/linker-plugin-lto-full-lto, r=n…
JonathanBrouwer Feb 7, 2026
3391e4c
Rollup merge of #152010 - workingjubilee:what-does-the-scouter-say-ab…
JonathanBrouwer Feb 7, 2026
ae9d2d9
Rollup merge of #152199 - nnethercote:rm-rustc_query_system-cache, r=…
JonathanBrouwer Feb 7, 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 @@ -4381,7 +4381,6 @@ dependencies = [
"rustc_data_structures",
"rustc_errors",
"rustc_feature",
"rustc_fluent_macro",
"rustc_index",
"rustc_lexer",
"rustc_macros",
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_driver_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ pub fn default_translator() -> Translator {
pub static DEFAULT_LOCALE_RESOURCES: &[&str] = &[
// tidy-alphabetical-start
rustc_lint::DEFAULT_LOCALE_RESOURCE,
rustc_parse::DEFAULT_LOCALE_RESOURCE,
// tidy-alphabetical-end
];

Expand Down
14 changes: 6 additions & 8 deletions compiler/rustc_interface/src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ pub struct Compiler {
pub(crate) fn parse_cfg(dcx: DiagCtxtHandle<'_>, cfgs: Vec<String>) -> Cfg {
cfgs.into_iter()
.map(|s| {
let psess = ParseSess::emitter_with_note(
vec![rustc_parse::DEFAULT_LOCALE_RESOURCE],
format!("this occurred on the command line: `--cfg={s}`"),
);
let psess = ParseSess::emitter_with_note(format!(
"this occurred on the command line: `--cfg={s}`"
));
let filename = FileName::cfg_spec_source_code(&s);

macro_rules! error {
Expand Down Expand Up @@ -125,10 +124,9 @@ pub(crate) fn parse_check_cfg(dcx: DiagCtxtHandle<'_>, specs: Vec<String>) -> Ch
let mut check_cfg = CheckCfg { exhaustive_names, exhaustive_values, ..CheckCfg::default() };

for s in specs {
let psess = ParseSess::emitter_with_note(
vec![rustc_parse::DEFAULT_LOCALE_RESOURCE],
format!("this occurred on the command line: `--check-cfg={s}`"),
);
let psess = ParseSess::emitter_with_note(format!(
"this occurred on the command line: `--check-cfg={s}`"
));
let filename = FileName::cfg_spec_source_code(&s);

const VISIT: &str =
Expand Down
5 changes: 4 additions & 1 deletion compiler/rustc_macros/src/diagnostics/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use fluent_syntax::ast::{Expression, InlineExpression, Pattern, PatternElement};
use proc_macro2::{Span, TokenStream};
use quote::quote;
use syn::Path;
use syn::ext::IdentExt;
use synstructure::{Structure, VariantInfo};

use crate::diagnostics::error::span_err;
Expand Down Expand Up @@ -100,7 +101,7 @@ fn verify_fluent_message(msg_span: Span, message_str: &str, variant: Option<&Var
.bindings()
.iter()
.flat_map(|b| b.ast().ident.as_ref())
.map(|id| id.to_string())
.map(|id| id.unraw().to_string())
.collect();
for variable in variable_references(&message) {
if !fields.iter().any(|f| f == variable) {
Expand Down Expand Up @@ -155,6 +156,8 @@ const ALLOWED_CAPITALIZED_WORDS: &[&str] = &[
"MIR",
"NaNs",
"OK",
"Rust",
"Unicode",
"VS",
// tidy-alphabetical-end
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ use rustc_data_structures::sync::Lock;

use crate::dep_graph::{DepContext, DepNodeIndex};

pub struct Cache<Key, Value> {
pub struct WithDepNodeCache<Key, Value> {
hashmap: Lock<FxHashMap<Key, WithDepNode<Value>>>,
}

impl<Key: Clone, Value: Clone> Clone for Cache<Key, Value> {
impl<Key: Clone, Value: Clone> Clone for WithDepNodeCache<Key, Value> {
fn clone(&self) -> Self {
Self { hashmap: Lock::new(self.hashmap.borrow().clone()) }
}
}

impl<Key, Value> Default for Cache<Key, Value> {
impl<Key, Value> Default for WithDepNodeCache<Key, Value> {
fn default() -> Self {
Self { hashmap: Default::default() }
}
}

impl<Key: Eq + Hash, Value: Clone> Cache<Key, Value> {
impl<Key: Eq + Hash, Value: Clone> WithDepNodeCache<Key, Value> {
pub fn get<Tcx: DepContext>(&self, key: &Key, tcx: Tcx) -> Option<Value> {
Some(self.hashmap.borrow().get(key)?.get(tcx))
}
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_middle/src/traits/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//!
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/traits/resolution.html
pub mod cache;
pub mod query;
pub mod select;
pub mod solve;
Expand Down
11 changes: 7 additions & 4 deletions compiler/rustc_middle/src/traits/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@
use rustc_errors::ErrorGuaranteed;
use rustc_hir::def_id::DefId;
use rustc_macros::{HashStable, TypeVisitable};
use rustc_query_system::cache::Cache;
use rustc_type_ir::solve::AliasBoundKind;

use self::EvaluationResult::*;
use super::{SelectionError, SelectionResult};
use crate::traits::cache::WithDepNodeCache;
use crate::ty;

pub type SelectionCache<'tcx, ENV> =
Cache<(ENV, ty::TraitPredicate<'tcx>), SelectionResult<'tcx, SelectionCandidate<'tcx>>>;
pub type SelectionCache<'tcx, ENV> = WithDepNodeCache<
(ENV, ty::TraitPredicate<'tcx>),
SelectionResult<'tcx, SelectionCandidate<'tcx>>,
>;

pub type EvaluationCache<'tcx, ENV> = Cache<(ENV, ty::PolyTraitPredicate<'tcx>), EvaluationResult>;
pub type EvaluationCache<'tcx, ENV> =
WithDepNodeCache<(ENV, ty::PolyTraitPredicate<'tcx>), EvaluationResult>;

/// The selection process begins by considering all impls, where
/// clauses, and so forth that might resolve an obligation. Sometimes
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ use rustc_hir::lang_items::LangItem;
use rustc_hir::limit::Limit;
use rustc_hir::{self as hir, HirId, Node, TraitCandidate, find_attr};
use rustc_index::IndexVec;
use rustc_query_system::cache::WithDepNode;
use rustc_query_system::dep_graph::DepNodeIndex;
use rustc_query_system::ich::StableHashingContext;
use rustc_serialize::opaque::{FileEncodeResult, FileEncoder};
Expand Down Expand Up @@ -71,6 +70,7 @@ use crate::query::plumbing::QuerySystem;
use crate::query::{IntoQueryParam, LocalCrate, Providers, TyCtxtAt};
use crate::thir::Thir;
use crate::traits;
use crate::traits::cache::WithDepNode;
use crate::traits::solve::{
self, CanonicalInput, ExternalConstraints, ExternalConstraintsData, PredefinedOpaques,
QueryResult, inspect,
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_parse/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ rustc_ast_pretty = { path = "../rustc_ast_pretty" }
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_errors = { path = "../rustc_errors" }
rustc_feature = { path = "../rustc_feature" }
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
rustc_index = { path = "../rustc_index" }
rustc_lexer = { path = "../rustc_lexer" }
rustc_macros = { path = "../rustc_macros" }
Expand Down
Loading
Loading