Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
752a910
MIR Call terminator: evaluate destination place before arguments
RalfJung Apr 28, 2026
f6d98a4
JSON target specs: remove 'x86-softfloat' compatibility alias
RalfJung May 30, 2026
f0ac18a
CI: rfl: add temporary commit for removal of `x86-softfloat`
ojeda May 30, 2026
b2d604c
Expand free alias types in the auto-trait orphan check
Dnreikronos Jun 12, 2026
5e016b6
Stabilize `#[my_macro] mod foo;` (part of `proc_macro_hygiene`)
TimNN Jun 13, 2026
5b4299f
Implement `IntoIterator` for `[&[mut]] Box<[T; N], A>`
WaffleLapkin Jun 28, 2026
cdac740
Move `std::io::IoHandle` to `core::io`
bushrat011899 May 12, 2026
4746813
Move `std::io::SizeHint` to `core::io`
bushrat011899 May 12, 2026
9b443be
tidy: make it more clear that it has to be run under bootstrap, not a…
jyn514 Jun 29, 2026
264bf6d
enable `TIDY_PRINT_DIFF` by default
jyn514 Jun 29, 2026
e2af9c0
borrowck: Introduce BlameConstraint::to_obligation_cause_from_path()
Enselic Jun 29, 2026
a3a8023
Update `transmute_copy` to ub_checks and `?Sized`
scottmcm Apr 30, 2026
ab4a014
Add release notes for 1.96.1
ehuss Jul 2, 2026
d7e4edd
Add -Zautodiff_post_passes flag to limit which llvm passes to run aft…
sgasho Jul 2, 2026
2a9e45d
Update LLVM IR checks in codegen-llvm/autodiff tests
sgasho Jul 2, 2026
cc7cef5
update TypeVisitable implementation
Jul 2, 2026
d42cca5
Refactor delegation AST -> HIR lowering
aerooneqq Jul 2, 2026
841041c
Optimize ArrayChunks::try_rfold with DoubleEndedIterator::next_chunk_…
asder8215 Jul 2, 2026
8b3fbb7
Restrict access to DropKind.
cjgillot Jun 14, 2026
28ed28a
Simplify API.
cjgillot Jun 17, 2026
5e19794
Mark `SizeHint::size_hint` as a `final` method
bushrat011899 Jul 3, 2026
c2f51ae
Add documentation to `SizeHint`
bushrat011899 Jul 3, 2026
4e2363a
library: Comment on libtest's dicey internal soundness
workingjubilee Jul 3, 2026
23e6ca0
refactor normalization in `coerce_shared_info`
adwinwhite Jul 1, 2026
4c3aa1f
don't use `Finalize` when resolving visbilities during AST expansion
LorrensP-2158466 Jul 2, 2026
c286fbb
rip out TIDY_PRINT_DIFF
jyn514 Jul 3, 2026
d6f62f6
rustdoc: Fix crash when trying to inline foreign item which cannot ha…
GuillaumeGomez Jul 3, 2026
523a12e
Rollup merge of #158692 - ehuss:1.96.1-release-notes, r=Mark-Simulacrum
JonathanBrouwer Jul 5, 2026
ba66ea3
Rollup merge of #134021 - WaffleLapkin:box-arr-into-iter2, r=Mark-Sim…
JonathanBrouwer Jul 5, 2026
9d8f84a
Rollup merge of #155932 - RalfJung:call-terminator-evaluation-order, …
JonathanBrouwer Jul 5, 2026
cef63f3
Rollup merge of #155989 - scottmcm:unsized-transmute-copy, r=Mark-Sim…
JonathanBrouwer Jul 5, 2026
2085491
Rollup merge of #156777 - sgasho:test-fix-codegen-llvm-autodiff-2, r=…
JonathanBrouwer Jul 5, 2026
af0735d
Rollup merge of #157151 - RalfJung:x86-softfloat, r=jieyouxu
JonathanBrouwer Jul 5, 2026
09300b8
Rollup merge of #157835 - Dnreikronos:orphan_auto_trait_free_alias_ex…
JonathanBrouwer Jul 5, 2026
a9eeba2
Rollup merge of #157857 - TimNN:macro-mod, r=petrochenkov
JonathanBrouwer Jul 5, 2026
a1b3e7f
Rollup merge of #158434 - aerooneqq:delegation-refactoring, r=petroch…
JonathanBrouwer Jul 5, 2026
f1d7eb1
Rollup merge of #158552 - ferrocene:jyn/tidy-errors, r=clubby789,davi…
JonathanBrouwer Jul 5, 2026
4a436da
Rollup merge of #158624 - Enselic:to_obligation_cause_from_path, r=Jo…
JonathanBrouwer Jul 5, 2026
441314a
Rollup merge of #158704 - asder8215:optimize_array_chunks, r=aapoalas
JonathanBrouwer Jul 5, 2026
6a55427
Rollup merge of #158711 - workingjubilee:explain-libtest-is-sketchy, …
JonathanBrouwer Jul 5, 2026
5324d9e
Rollup merge of #158751 - GuillaumeGomez:fix-foreign-inlining, r=Urgau
JonathanBrouwer Jul 5, 2026
cbc0b05
Rollup merge of #158539 - bushrat011899:core_io_internal_traits, r=cl…
JonathanBrouwer Jul 5, 2026
b820b48
Rollup merge of #158659 - adwinwhite:coerce-shared-info-norm, r=lcnr
JonathanBrouwer Jul 5, 2026
c0c6b6d
Rollup merge of #158689 - LorrensP-2158466:non-final-vis-resolve, r=p…
JonathanBrouwer Jul 5, 2026
ff239d9
Rollup merge of #158698 - addiesh:oh-a-visitor, r=oli-obk
JonathanBrouwer Jul 5, 2026
9f3f117
Rollup merge of #158706 - cjgillot:drop-api, r=Nadrieril
JonathanBrouwer Jul 5, 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: 9 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
Version 1.96.1 (2026-06-30)
===========================

<a id="1.96.1"></a>

- [Cargo: fix timeout/retry behavior](https://github.com/rust-lang/cargo/pull/17131)
- [Cargo: apply patches for CVE-2025-15661, CVE-2026-55199, and CVE-2026-55200 to libssh2](https://github.com/rust-lang/cargo/pull/17140)
- [rustc: fix miscompilation in MIR optimization](https://github.com/rust-lang/rust/pull/158214)

Version 1.96.0 (2026-05-28)
==========================

Expand Down
86 changes: 86 additions & 0 deletions compiler/rustc_ast_lowering/src/delegation/attributes.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
use rustc_hir::attrs::{AttributeKind, InlineAttr};
use rustc_hir::{self as hir};
use rustc_span::Span;
use rustc_span::def_id::DefId;

use crate::LoweringContext;
use crate::delegation::DelegationResolution;

struct AdditionInfo {
pub equals: fn(&hir::Attribute) -> bool,
pub kind: AdditionKind,
}

enum AdditionKind {
Default { factory: fn(Span) -> hir::Attribute },
Inherit { factory: fn(Span, &hir::Attribute) -> hir::Attribute },
}

static ADDITIONS: &[AdditionInfo] = &[
AdditionInfo {
equals: |a| matches!(a, hir::Attribute::Parsed(AttributeKind::MustUse { .. })),
kind: AdditionKind::Inherit {
factory: |span, original_attr| {
let reason = match original_attr {
hir::Attribute::Parsed(AttributeKind::MustUse { reason, .. }) => *reason,
_ => None,
};

hir::Attribute::Parsed(AttributeKind::MustUse { span, reason })
},
},
},
AdditionInfo {
equals: |a| matches!(a, hir::Attribute::Parsed(AttributeKind::Inline(..))),
kind: AdditionKind::Default {
factory: |span| hir::Attribute::Parsed(AttributeKind::Inline(InlineAttr::Hint, span)),
},
},
];

impl<'hir> LoweringContext<'_, 'hir> {
pub(super) fn add_attrs_if_needed(&mut self, resolution: &DelegationResolution) {
let &DelegationResolution { span, sig_id, .. } = resolution;

const PARENT_ID: hir::ItemLocalId = hir::ItemLocalId::ZERO;
let new_attrs = self.create_new_attrs(span, sig_id, self.attrs.get(&PARENT_ID));

if !new_attrs.is_empty() {
let new_attrs = match self.attrs.get(&PARENT_ID) {
Some(existing_attrs) => self.arena.alloc_from_iter(
existing_attrs.iter().map(|a| a.clone()).chain(new_attrs.into_iter()),
),
None => self.arena.alloc_from_iter(new_attrs.into_iter()),
};

self.attrs.insert(PARENT_ID, new_attrs);
}
}

fn create_new_attrs(
&self,
span: Span,
sig_id: DefId,
existing: Option<&&[hir::Attribute]>,
) -> Vec<hir::Attribute> {
ADDITIONS
.iter()
.filter_map(|addition| {
existing
.is_none_or(|attrs| !attrs.iter().any(|a| (addition.equals)(a)))
.then(|| match addition.kind {
AdditionKind::Default { factory } => Some(factory(span)),
AdditionKind::Inherit { factory, .. } =>
{
#[allow(deprecated)]
self.tcx
.get_all_attrs(sig_id)
.iter()
.find_map(|a| (addition.equals)(a).then(|| factory(span, a)))
}
})
.flatten()
})
.collect::<Vec<_>>()
}
}
Loading
Loading