Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
c918352
stabilize `Box::take`
edwloef Aug 3, 2026
71ef655
Dedicated Display type for CStr::display
clarfonthey Sep 16, 2026
428aeee
Restore `Send` and `Sync` for `BorrowedCursor`
Ddystopia Sep 20, 2026
c176c10
OpenBSD/sparc64 has switched from GCC to Clang
brad0 Sep 21, 2026
1403737
Skip redundant storage-conflict updates during coroutine layout
charliermarsh Sep 21, 2026
240e41a
librustdoc: remove stale dep on base64
durin42 Sep 21, 2026
2269cba
we have the `location_map` at home
lqd Sep 22, 2026
acabd50
fix typo
lqd Sep 22, 2026
87e35b5
assorted cleanups in `LivenessComputation::compute`
lqd Sep 22, 2026
38ca3d3
expand comment to match callback signature
lqd Sep 22, 2026
4a461d0
move `LivenessSource` to liveness module
lqd Sep 22, 2026
ec908e6
remove unneeded `BorrowckInferCtxt` from `defer_local`
lqd Sep 22, 2026
1d76d15
remove pre-existing link that doesn't work
lqd Sep 22, 2026
0875187
fix issue-156949
bb1yd May 26, 2026
f9276f4
fix
bb1yd Jun 1, 2026
355aec9
changed to parser
bb1yd Jul 8, 2026
622fd6a
treat inductive cycles as ambig
lcnr Sep 22, 2026
baf4778
Add `f16` inline ASM support for `nvptx64-nvidia-cuda`
beetrees Aug 24, 2026
3438e6f
clarify some names in `record_legacy_polonius_drop_facts`
lqd Sep 22, 2026
d72a519
remove unneeded type ascription
lqd Sep 22, 2026
6241eb0
remove allocation to create the local use map
lqd Sep 22, 2026
9a3ab65
add comment
lqd Sep 22, 2026
6c0f3aa
macro_metavar_expr_concat: support concatenating into string literals
mejrs Sep 22, 2026
fc83fc8
avoid ICEs when recovering malformed function parameters
TaKO8Ki Sep 8, 2026
41ae947
tests: Update `f16b` codegen test for LoongArch and RISC-V
heiher Sep 22, 2026
501b40c
Document coroutine storage-conflict fast path
charliermarsh Sep 22, 2026
3c7c76c
Update deprecated rustc_hir imports
mejrs Sep 22, 2026
84a341b
Use wrapping arithmetic in `from_str_radix`
maxdexh Sep 21, 2026
9ba8cc9
Rollup merge of #163170 - mejrs:hir_imports, r=oli-obk
JonathanBrouwer Sep 22, 2026
1b4eb6d
Rollup merge of #156949 - bb1yd:detect-missing-else, r=estebank
JonathanBrouwer Sep 22, 2026
37b2893
Rollup merge of #160436 - edwloef:stabilize-box-take, r=Darksonn
JonathanBrouwer Sep 22, 2026
6705144
Rollup merge of #160570 - mejrs:concat_str, r=petrochenkov
JonathanBrouwer Sep 22, 2026
b283983
Rollup merge of #162498 - TaKO8Ki:fix/parser-arg-recovery-ice, r=fee1…
JonathanBrouwer Sep 22, 2026
a3fab40
Rollup merge of #162837 - clarfonthey:c-str-display, r=Darksonn
JonathanBrouwer Sep 22, 2026
5146ae3
Rollup merge of #163099 - maxdexh:int-from-str-loop-unchecked, r=Dark…
JonathanBrouwer Sep 22, 2026
9709084
Rollup merge of #163166 - lqd:deferred-liveness, r=jackh726
JonathanBrouwer Sep 22, 2026
91e8c40
Rollup merge of #161667 - beetrees:f16-inline-asm-nvptx, r=folkertdev
JonathanBrouwer Sep 22, 2026
4a3811d
Rollup merge of #163063 - Ddystopia:borrowed-cursor-send-sync, r=clar…
JonathanBrouwer Sep 22, 2026
9cab8b1
Rollup merge of #163097 - brad0:librustc_llvm_sparc64, r=folkertdev
JonathanBrouwer Sep 22, 2026
0d2142b
Rollup merge of #163126 - charliermarsh:charlie/conflicts, r=oli-obk
JonathanBrouwer Sep 22, 2026
a6a3acf
Rollup merge of #163135 - durin42:base64-upgrade, r=Urgau
JonathanBrouwer Sep 22, 2026
03acbd7
Rollup merge of #163146 - heiher:ignore-f16b-la-rv, r=lqd
JonathanBrouwer Sep 22, 2026
37c2f01
Rollup merge of #163159 - lcnr:inductive-cycles-ambig, r=oli-obk
JonathanBrouwer Sep 22, 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
15 changes: 6 additions & 9 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,6 @@ dependencies = [
"windows-targets",
]

[[package]]
name = "base64"
version = "0.21.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"

[[package]]
name = "base64"
version = "0.22.1"
Expand Down Expand Up @@ -2135,7 +2129,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8bdc5a74b0feeb5e6a1dc2dd08c34280a61e37668d10a6a3b27ad69d0fb9ce2e"
dependencies = [
"aho-corasick",
"base64 0.22.1",
"base64",
"bstr",
"jaq-core",
"jiff",
Expand Down Expand Up @@ -4174,6 +4168,7 @@ dependencies = [
"rustc_abi",
"rustc_ast",
"rustc_ast_pretty",
"rustc_attr_ir",
"rustc_hir",
"rustc_span",
]
Expand Down Expand Up @@ -4738,6 +4733,7 @@ dependencies = [
"rustc_arena",
"rustc_ast",
"rustc_ast_pretty",
"rustc_attr_ir",
"rustc_attr_parsing",
"rustc_data_structures",
"rustc_errors",
Expand Down Expand Up @@ -4854,6 +4850,7 @@ dependencies = [
"punycode",
"rustc-demangle",
"rustc_abi",
"rustc_attr_ir",
"rustc_data_structures",
"rustc_hashes",
"rustc_hir",
Expand Down Expand Up @@ -4953,8 +4950,8 @@ version = "0.0.0"
dependencies = [
"itertools",
"rustc_abi",
"rustc_attr_ir",
"rustc_data_structures",
"rustc_hir",
"rustc_middle",
"rustc_span",
"smallvec",
Expand All @@ -4967,6 +4964,7 @@ version = "0.0.0"
dependencies = [
"itertools",
"rustc_abi",
"rustc_attr_ir",
"rustc_data_structures",
"rustc_errors",
"rustc_hashes",
Expand Down Expand Up @@ -5051,7 +5049,6 @@ version = "0.0.0"
dependencies = [
"arrayvec",
"askama",
"base64 0.21.7",
"expect-test",
"indexmap",
"itertools",
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/block.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rustc_ast::{Block, BlockCheckMode, Local, LocalKind, Stmt, StmtKind};
use rustc_attr_ir::target::Target;
use rustc_hir as hir;
use rustc_hir::Target;
use rustc_span::sym;
use smallvec::SmallVec;

Expand Down
9 changes: 5 additions & 4 deletions compiler/rustc_ast_lowering/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::sync::Arc;

use rustc_hir::attrs::lang_items::LangItem;
use rustc_attr_ir::lang_items::LangItem;
use rustc_attr_ir::target::Target;
use thin_vec::thin_vec;

use crate::LoweringContext;
Expand Down Expand Up @@ -209,15 +210,15 @@ impl<'hir> LoweringContext<'_, 'hir> {

let postcond_checker = self.arena.alloc(self.expr_enum_variant_lang_item(
postcond_checker.span,
rustc_hir::attrs::lang_items::LangItem::OptionSome,
LangItem::OptionSome,
&*arena_vec![self; *postcond_checker],
));
let then_block_stmts = self.block_all(span, stmts, Some(postcond_checker));
let then_block = self.arena.alloc(self.expr_block(&then_block_stmts));

let none_expr = self.arena.alloc(self.expr_enum_variant_lang_item(
postcond_checker.span,
rustc_hir::attrs::lang_items::LangItem::OptionNone,
LangItem::OptionNone,
Default::default(),
));
let else_block = self.block_expr(none_expr);
Expand Down Expand Up @@ -350,7 +351,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
));

let attrs: rustc_ast::AttrVec = thin_vec![self.unreachable_code_attr(span)];
self.lower_attrs(contract_check.hir_id, &attrs, span, rustc_hir::Target::Expression);
self.lower_attrs(contract_check.hir_id, &attrs, span, Target::Expression);

let ret_block = self.block_all(span, arena_vec![self; ret_stmt], Some(contract_check));
self.arena.alloc(self.expr_block(self.arena.alloc(ret_block)))
Expand Down
26 changes: 15 additions & 11 deletions compiler/rustc_ast_lowering/src/delegation/attributes.rs
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
use rustc_attr_ir::{AttributeKind, InlineAttr};
use rustc_hir as hir;
use rustc_hir::attrs::{AttributeKind, InlineAttr};
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 equals: fn(&rustc_attr_ir::Attribute) -> bool,
pub kind: AdditionKind,
}

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

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

hir::Attribute::Parsed(AttributeKind::MustUse { span, reason })
rustc_attr_ir::Attribute::Parsed(AttributeKind::MustUse { span, reason })
},
},
},
AdditionInfo {
equals: |a| matches!(a, hir::Attribute::Parsed(AttributeKind::Inline(..))),
equals: |a| matches!(a, rustc_attr_ir::Attribute::Parsed(AttributeKind::Inline(..))),
kind: AdditionKind::Default {
factory: |span| hir::Attribute::Parsed(AttributeKind::Inline(InlineAttr::Hint, span)),
factory: |span| {
rustc_attr_ir::Attribute::Parsed(AttributeKind::Inline(InlineAttr::Hint, span))
},
},
},
];
Expand Down Expand Up @@ -61,8 +65,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
&self,
span: Span,
sig_id: DefId,
existing: Option<&&[hir::Attribute]>,
) -> Vec<hir::Attribute> {
existing: Option<&&[rustc_attr_ir::Attribute]>,
) -> Vec<rustc_attr_ir::Attribute> {
ADDITIONS
.iter()
.filter_map(|addition| {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/delegation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use hir::def::Res;
use rustc_abi::ExternAbi;
use rustc_ast as ast;
use rustc_ast::*;
use rustc_hir::attrs::lang_items::LangItem;
use rustc_attr_ir::lang_items::LangItem;
use rustc_hir::def::DefKind;
use rustc_hir::{self as hir, FnDeclFlags, QPath};
use rustc_middle::ty::Asyncness;
Expand Down
12 changes: 7 additions & 5 deletions compiler/rustc_ast_lowering/src/expr/closure.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use rustc_ast::*;
use rustc_attr_ir::find_attr;
use rustc_attr_ir::target::Target;
use rustc_hir as hir;
use rustc_hir::{HirId, Target, find_attr};
use rustc_hir::HirId;
use rustc_span::{Span, span_bug};

use super::{LoweringContext, MoveExprState};
Expand Down Expand Up @@ -55,7 +57,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
fn lower_expr_coroutine_closure_with_move_exprs(
&mut self,
expr_hir_id: HirId,
attrs: &[hir::Attribute],
attrs: &[rustc_attr_ir::Attribute],
binder: &ClosureBinder,
capture_clause: CaptureBy,
closure_id: NodeId,
Expand Down Expand Up @@ -114,7 +116,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
fn lower_expr_plain_closure_with_move_exprs(
&mut self,
expr_hir_id: HirId,
attrs: &[hir::Attribute],
attrs: &[rustc_attr_ir::Attribute],
binder: &ClosureBinder,
capture_clause: CaptureBy,
closure_id: NodeId,
Expand Down Expand Up @@ -153,7 +155,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
// local uses and the caller can later add the matching initializers.
fn lower_expr_closure(
&mut self,
attrs: &[hir::Attribute],
attrs: &[rustc_attr_ir::Attribute],
binder: &ClosureBinder,
capture_clause: CaptureBy,
closure_id: NodeId,
Expand Down Expand Up @@ -283,7 +285,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
body: &Expr,
fn_decl_span: Span,
fn_arg_span: Span,
attrs: &[hir::Attribute],
attrs: &[rustc_attr_ir::Attribute],
) -> hir::ExprKind<'hir> {
let closure_def_id = self.local_def_id(closure_id);
let (binder_clause, generic_params) = self.lower_closure_binder(binder);
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/format.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::borrow::Cow;

use rustc_ast::*;
use rustc_attr_ir::lang_items::LangItem;
use rustc_data_structures::fx::FxIndexMap;
use rustc_hir as hir;
use rustc_hir::attrs::lang_items::LangItem;
use rustc_session::config::FmtDebug;
use rustc_span::{ByteSymbol, DesugaringKind, Ident, Span, Symbol, sym};

Expand Down
39 changes: 22 additions & 17 deletions compiler/rustc_ast_lowering/src/item.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
use rustc_abi::ExternAbi;
use rustc_ast::visit::AssocCtxt;
use rustc_ast::*;
use rustc_attr_ir::target::Target;
use rustc_attr_ir::{AttributeKind, EiiImplResolution, find_attr};
use rustc_errors::{E0570, ErrorGuaranteed, struct_span_code_err};
use rustc_hir::attrs::{AttributeKind, EiiImplResolution};
use rustc_hir::def::{DefKind, PerNS, Res};
use rustc_hir::{
self as hir, HirId, ImplItemImplKind, LifetimeSource, PredicateOrigin, Target, find_attr,
};
use rustc_hir::{self as hir, HirId, ImplItemImplKind, LifetimeSource, PredicateOrigin};
use rustc_middle::ty::data_structures::IndexMap;
use rustc_span::def_id::{DefId, LocalDefId};
use rustc_span::edit_distance::find_best_match_for_name;
Expand Down Expand Up @@ -68,8 +67,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
id: NodeId,
name: Ident,
EiiDecl { foreign_item, impl_unsafe }: &EiiDecl,
) -> Option<hir::attrs::EiiDecl> {
self.lower_path_simple_eii(id, foreign_item).map(|did| hir::attrs::EiiDecl {
) -> Option<rustc_attr_ir::EiiDecl> {
self.lower_path_simple_eii(id, foreign_item).map(|did| rustc_attr_ir::EiiDecl {
foreign_item: did,
impl_unsafe: *impl_unsafe,
name,
Expand All @@ -87,7 +86,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
is_default,
known_eii_macro_resolution,
}: &EiiImpl,
) -> hir::attrs::EiiImpl {
) -> rustc_attr_ir::EiiImpl {
let resolution = if let Some(target) = known_eii_macro_resolution
&& let Some(foreign_item_did) = self.lower_path_simple_eii(*node_id, target)
{
Expand All @@ -100,7 +99,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
)
};

hir::attrs::EiiImpl {
rustc_attr_ir::EiiImpl {
span: self.lower_span(*span),
inner_span: self.lower_span(*inner_span),
impl_unsafe_span: match *impl_safety {
Expand All @@ -116,19 +115,21 @@ impl<'hir> LoweringContext<'_, 'hir> {
&mut self,
id: NodeId,
i: &ItemKind,
) -> Vec<hir::Attribute> {
) -> Vec<rustc_attr_ir::Attribute> {
match i {
ItemKind::Fn(Fn { eii_impl: None, .. })
| ItemKind::Static(StaticItem { eii_impl: None, .. }) => Vec::new(),
ItemKind::Fn(Fn { eii_impl: Some(eii_impl), .. })
| ItemKind::Static(StaticItem { eii_impl: Some(eii_impl), .. }) => {
vec![hir::Attribute::Parsed(AttributeKind::EiiImpl(Box::new(
vec![rustc_attr_ir::Attribute::Parsed(AttributeKind::EiiImpl(Box::new(
self.lower_eii_impl(eii_impl),
)))]
}
ItemKind::MacroDef(name, MacroDef { eii_declaration: Some(target), .. }) => self
.lower_eii_decl(id, *name, target)
.map(|decl| vec![hir::Attribute::Parsed(AttributeKind::EiiDeclaration(decl))])
.map(|decl| {
vec![rustc_attr_ir::Attribute::Parsed(AttributeKind::EiiDeclaration(decl))]
})
.unwrap_or_default(),

ItemKind::ExternCrate(..)
Expand Down Expand Up @@ -184,7 +185,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
span: Span,
id: NodeId,
hir_id: hir::HirId,
attrs: &'hir [hir::Attribute],
attrs: &'hir [rustc_attr_ir::Attribute],
vis_span: Span,
i: &ItemKind,
) -> hir::ItemKind<'hir> {
Expand Down Expand Up @@ -551,7 +552,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
prefix: &Path,
id: NodeId,
vis_span: Span,
attrs: &'hir [hir::Attribute],
attrs: &'hir [rustc_attr_ir::Attribute],
) -> hir::ItemKind<'hir> {
let path = &tree.prefix;
let segments = prefix.segments.iter().chain(path.segments.iter()).cloned().collect();
Expand Down Expand Up @@ -1351,7 +1352,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
decl: &FnDecl,
coroutine_marker: Option<CoroutineMarker>,
body: Option<&Block>,
attrs: &'hir [hir::Attribute],
attrs: &'hir [rustc_attr_ir::Attribute],
contract: Option<&FnContract>,
) -> hir::BodyId {
let Some(body) = body else {
Expand Down Expand Up @@ -1612,7 +1613,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
id: NodeId,
kind: FnDeclKind,
coroutine_marker: Option<CoroutineMarker>,
attrs: &[hir::Attribute],
attrs: &[rustc_attr_ir::Attribute],
) -> (&'hir hir::Generics<'hir>, hir::FnSig<'hir>) {
let header = self.lower_fn_header(sig.header, hir::Safety::Safe, attrs);
let itctx = ImplTraitContext::Universal;
Expand All @@ -1626,7 +1627,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
&mut self,
h: FnHeader,
default_safety: hir::Safety,
attrs: &[hir::Attribute],
attrs: &[rustc_attr_ir::Attribute],
) -> hir::FnHeader {
let asyncness = if let Some(coroutine_marker) = h.coroutine_marker
&& let CoroutineKind::Async = coroutine_marker.kind
Expand Down Expand Up @@ -1713,7 +1714,11 @@ impl<'hir> LoweringContext<'_, 'hir> {
/// Lowers constness or comptime attribute.
/// Whether `const` is allowed here is checked by ast validation.
/// Whether `comptime` is allowed here is checked by the `comptime` attribute parser.
pub(super) fn lower_constness(&mut self, attrs: &[hir::Attribute], c: Const) -> hir::Constness {
pub(super) fn lower_constness(
&mut self,
attrs: &[rustc_attr_ir::Attribute],
c: Const,
) -> hir::Constness {
let mut constness = match c {
Const::Yes(_) => hir::Constness::Const { always: false },
Const::No => hir::Constness::NotConst,
Expand Down
Loading
Loading