Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
ddd8f92
moved 8 tests to organized locations
Delta17920 Feb 4, 2026
1584104
renamed few tests
Delta17920 Feb 4, 2026
d72eac8
add must_use for FileTimes
chenyukang Feb 6, 2026
c89a89b
Fix multi-cgu+debug builds using autodiff by delaying autodiff till lto
ZuseZ4 Feb 11, 2026
576901f
Don't use `DepContext` in `rustc_middle::traits::cache`
Zalathar Feb 12, 2026
caf7cdf
Improve code suggestion for incorrect macro_rules! usage
chenyukang Jan 31, 2026
c6f57be
remove redundant backchain attribute in codegen
fneddy Feb 11, 2026
8c5ce26
Replace parallel! macro with `par_fns` function and rename `join` to …
Zoxc Feb 8, 2026
8cc4b93
Change query proc macro to be more rust-analyzer friendly
Zoxc Feb 9, 2026
d8ed639
sparc64: enable abi compatibility test
folkertdev Feb 12, 2026
506ed6d
Remove SelfProfilerRef from CodegenContext
bjorn3 Feb 12, 2026
2c44bb1
Support serializing CodegenContext
bjorn3 Feb 11, 2026
b9b28ba
Collect active query jobs into struct `QueryJobMap`
Zalathar Feb 11, 2026
891acbd
`-Znext-solver` Prevent committing unfulfilled unsized coercion
ShoyuVanilla Feb 10, 2026
60f802f
reject inline const patterns pre-expansion
dianne Feb 12, 2026
8526aa5
Port #[prelude_import] to the attribute parser
Ozzy1423 Feb 12, 2026
dd8a98a
Fix pretty print tests with #[prelude_import]
Ozzy1423 Feb 12, 2026
0941151
introduce lazy traversal for the polonius constraint graph
lqd Dec 29, 2025
279d55c
remove eager constraint conversion
lqd Dec 29, 2025
6dcf65a
optimization: no need to convert liveness data shape anymore
lqd Dec 30, 2025
5d15108
optimization: do nothing if there are no loans
lqd Dec 30, 2025
f4abd15
remove unneeded liveness context
lqd Dec 30, 2025
7de450a
introduce graph traversal abstraction and visitor
lqd Dec 30, 2025
1b63325
adapt polonius MIR dump to lazy graph traversal
lqd Dec 31, 2025
880d733
merge remaining contexts
lqd Dec 31, 2025
285e1be
reduce duplication when finding a successor
lqd Feb 12, 2026
eb1e411
Add 2048-bit HvxVectorPair support to Hexagon SIMD ABI checks
androm3da Feb 12, 2026
01e3fad
Update libc to v0.2.181
thesummer Jan 7, 2026
6afebcc
Fix feature gating for new `try bikeshed` expressions
scottmcm Feb 12, 2026
f8f01d6
Rollup merge of #150551 - lqd:lazy-polonius, r=jackh726
Zalathar Feb 13, 2026
e76a0a2
Rollup merge of #150752 - thesummer:update-libc-0.2.179, r=tgross35
Zalathar Feb 13, 2026
eed6d86
Rollup merge of #150988 - chenyukang:yukang-fix-150899-macro-rules, r…
Zalathar Feb 13, 2026
1d16935
Rollup merge of #152422 - Zoxc:query-macro-tweaks, r=Zalathar
Zalathar Feb 13, 2026
0c21068
Rollup merge of #152496 - ZuseZ4:fix-autodiff-dbg-build, r=bjorn3
Zalathar Feb 13, 2026
2f9a3f9
Rollup merge of #152514 - Zalathar:job-map, r=nnethercote
Zalathar Feb 13, 2026
e68a017
Rollup merge of #152520 - Zalathar:traits-cache, r=dingxiangfei2009
Zalathar Feb 13, 2026
03498af
Rollup merge of #152528 - bjorn3:lto_refactors11, r=petrochenkov
Zalathar Feb 13, 2026
360a9d1
Rollup merge of #152082 - Delta17920:move-tests, r=chenyukang,Kivooeo
Zalathar Feb 13, 2026
4e4e43c
Rollup merge of #152232 - chenyukang:add-must-use-for-filetimes, r=Ma…
Zalathar Feb 13, 2026
a7385a9
Rollup merge of #152329 - Zoxc:simple-parallel-macro, r=nnethercote
Zalathar Feb 13, 2026
db03071
Rollup merge of #152444 - ShoyuVanilla:unsized-recursion-limit, r=lcnr
Zalathar Feb 13, 2026
9bde620
Rollup merge of #152486 - fneddy:s390x_simplify_backchain, r=dingxian…
Zalathar Feb 13, 2026
a0c9e99
Rollup merge of #152519 - scottmcm:fix-152501, r=fmease
Zalathar Feb 13, 2026
0cd418c
Rollup merge of #152529 - folkertdev:sparc64-enable-abi-compat-test, …
Zalathar Feb 13, 2026
6fd7884
Rollup merge of #152548 - dianne:reject-const-block-pat-pre-expansion…
Zalathar Feb 13, 2026
c42a36c
Rollup merge of #152550 - Ozzy1423:rustc-attrs, r=JonathanBrouwer
Zalathar Feb 13, 2026
4a207a3
Rollup merge of #152552 - androm3da:hexagon-hvx-abi-rules, r=madsmtm
Zalathar Feb 13, 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
9 changes: 3 additions & 6 deletions compiler/rustc_ast_passes/src/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,15 +338,11 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
fn visit_expr(&mut self, e: &'a ast::Expr) {
match e.kind {
ast::ExprKind::TryBlock(_, None) => {
// `try { ... }` is old and is only gated post-expansion here.
gate!(&self, try_blocks, e.span, "`try` expression is experimental");
}
ast::ExprKind::TryBlock(_, Some(_)) => {
gate!(
&self,
try_blocks_heterogeneous,
e.span,
"`try bikeshed` expression is experimental"
);
// `try_blocks_heterogeneous` is new, and gated pre-expansion instead.
}
ast::ExprKind::Lit(token::Lit {
kind: token::LitKind::Float | token::LitKind::Integer,
Expand Down Expand Up @@ -522,6 +518,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
half_open_range_patterns_in_slices,
"half-open range patterns in slices are unstable"
);
gate_all!(try_blocks_heterogeneous, "`try bikeshed` expression is experimental");
gate_all!(yeet_expr, "`do yeet` expression is experimental");
gate_all!(const_closures, "const closures are experimental");
gate_all!(builtin_syntax, "`builtin #` syntax is unstable");
Expand Down
9 changes: 9 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1211,3 +1211,12 @@ impl<S: Stage> SingleAttributeParser<S> for RustcReservationImplParser {
Some(AttributeKind::RustcReservationImpl(cx.attr_span, value_str))
}
}

pub(crate) struct PreludeImportParser;

impl<S: Stage> NoArgsAttributeParser<S> for PreludeImportParser {
const PATH: &[Symbol] = &[sym::prelude_import];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Use)]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::PreludeImport;
}
1 change: 1 addition & 0 deletions compiler/rustc_attr_parsing/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ attribute_parsers!(
Single<WithoutArgs<PassByValueParser>>,
Single<WithoutArgs<PinV2Parser>>,
Single<WithoutArgs<PointeeParser>>,
Single<WithoutArgs<PreludeImportParser>>,
Single<WithoutArgs<ProcMacroAttributeParser>>,
Single<WithoutArgs<ProcMacroParser>>,
Single<WithoutArgs<ProfilerRuntimeParser>>,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,8 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
// We want to focus on relevant live locals in diagnostics, so when polonius is enabled, we
// ensure that we don't emit live boring locals as explanations.
let is_local_boring = |local| {
if let Some(polonius_diagnostics) = self.polonius_diagnostics {
polonius_diagnostics.boring_nll_locals.contains(&local)
if let Some(polonius_context) = self.polonius_context {
polonius_context.boring_nll_locals.contains(&local)
} else {
assert!(!tcx.sess.opts.unstable_opts.polonius.is_next_enabled());

Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_borrowck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ use crate::diagnostics::{
use crate::path_utils::*;
use crate::place_ext::PlaceExt;
use crate::places_conflict::{PlaceConflictBias, places_conflict};
use crate::polonius::PoloniusContext;
use crate::polonius::legacy::{
PoloniusFacts, PoloniusFactsExt, PoloniusLocationTable, PoloniusOutput,
};
use crate::polonius::{PoloniusContext, PoloniusDiagnosticsContext};
use crate::prefixes::PrefixSet;
use crate::region_infer::RegionInferenceContext;
use crate::region_infer::opaque_types::DeferredOpaqueTypeError;
Expand Down Expand Up @@ -424,7 +424,7 @@ fn borrowck_check_region_constraints<'tcx>(
polonius_output,
opt_closure_req,
nll_errors,
polonius_diagnostics,
polonius_context,
} = nll::compute_regions(
root_cx,
&infcx,
Expand All @@ -448,7 +448,7 @@ fn borrowck_check_region_constraints<'tcx>(
&regioncx,
&opt_closure_req,
&borrow_set,
polonius_diagnostics.as_ref(),
polonius_context.as_ref(),
);

// We also have a `#[rustc_regions]` annotation that causes us to dump
Expand Down Expand Up @@ -490,7 +490,7 @@ fn borrowck_check_region_constraints<'tcx>(
polonius_output: None,
move_errors: Vec::new(),
diags_buffer,
polonius_diagnostics: polonius_diagnostics.as_ref(),
polonius_context: polonius_context.as_ref(),
};
struct MoveVisitor<'a, 'b, 'infcx, 'tcx> {
ctxt: &'a mut MirBorrowckCtxt<'b, 'infcx, 'tcx>,
Expand Down Expand Up @@ -529,7 +529,7 @@ fn borrowck_check_region_constraints<'tcx>(
move_errors: Vec::new(),
diags_buffer,
polonius_output: polonius_output.as_deref(),
polonius_diagnostics: polonius_diagnostics.as_ref(),
polonius_context: polonius_context.as_ref(),
};

// Compute and report region errors, if any.
Expand Down Expand Up @@ -779,7 +779,7 @@ struct MirBorrowckCtxt<'a, 'infcx, 'tcx> {
/// Results of Polonius analysis.
polonius_output: Option<&'a PoloniusOutput>,
/// When using `-Zpolonius=next`: the data used to compute errors and diagnostics.
polonius_diagnostics: Option<&'a PoloniusDiagnosticsContext>,
polonius_context: Option<&'a PoloniusContext>,
}

// Check that:
Expand Down
14 changes: 7 additions & 7 deletions compiler/rustc_borrowck/src/nll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ use crate::borrow_set::BorrowSet;
use crate::consumers::RustcFacts;
use crate::diagnostics::RegionErrors;
use crate::handle_placeholders::compute_sccs_applying_placeholder_outlives_constraints;
use crate::polonius::PoloniusContext;
use crate::polonius::legacy::{
PoloniusFacts, PoloniusFactsExt, PoloniusLocationTable, PoloniusOutput,
};
use crate::polonius::{PoloniusContext, PoloniusDiagnosticsContext};
use crate::region_infer::RegionInferenceContext;
use crate::type_check::MirTypeckRegionConstraints;
use crate::type_check::free_region_relations::UniversalRegionRelations;
Expand All @@ -47,7 +47,7 @@ pub(crate) struct NllOutput<'tcx> {

/// When using `-Zpolonius=next`: the data used to compute errors and diagnostics, e.g.
/// localized typeck and liveness constraints.
pub polonius_diagnostics: Option<PoloniusDiagnosticsContext>,
pub polonius_context: Option<PoloniusContext>,
}

/// Rewrites the regions in the MIR to use NLL variables, also scraping out the set of universal
Expand Down Expand Up @@ -122,7 +122,7 @@ pub(crate) fn compute_regions<'tcx>(
universal_region_relations: Frozen<UniversalRegionRelations<'tcx>>,
constraints: MirTypeckRegionConstraints<'tcx>,
mut polonius_facts: Option<AllFacts<RustcFacts>>,
polonius_context: Option<PoloniusContext>,
mut polonius_context: Option<PoloniusContext>,
) -> NllOutput<'tcx> {
let polonius_output = root_cx.consumer.as_ref().map_or(false, |c| c.polonius_output())
|| infcx.tcx.sess.opts.unstable_opts.polonius.is_legacy_enabled();
Expand Down Expand Up @@ -154,9 +154,9 @@ pub(crate) fn compute_regions<'tcx>(

// If requested for `-Zpolonius=next`, convert NLL constraints to localized outlives constraints
// and use them to compute loan liveness.
let polonius_diagnostics = polonius_context.map(|polonius_context| {
polonius_context.compute_loan_liveness(infcx.tcx, &mut regioncx, body, borrow_set)
});
if let Some(polonius_context) = polonius_context.as_mut() {
polonius_context.compute_loan_liveness(&mut regioncx, body, borrow_set)
}

// If requested: dump NLL facts, and run legacy polonius analysis.
let polonius_output = polonius_facts.as_ref().and_then(|polonius_facts| {
Expand Down Expand Up @@ -189,7 +189,7 @@ pub(crate) fn compute_regions<'tcx>(
polonius_output,
opt_closure_req: closure_region_requirements,
nll_errors,
polonius_diagnostics,
polonius_context,
}
}

Expand Down
Loading
Loading