Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
2cc26bf
Remove rustc_legacy_const_generics from LoongArch64 SIMD
heiher Sep 9, 2026
9da2dbd
Stabilize LoongArch64 SIMD intrinsics
heiher Sep 9, 2026
da61e9c
Add tests for unsoundness involving alias liveness
jackh726 Oct 3, 2026
a4aac2f
Use "latest" symlink for icx path
adamgemmell Oct 19, 2026
34a8d25
raise ambiguity error on attribute macro that looks like tool attribute
mejrs Sep 27, 2026
168e53d
add `no_implicit_prelude` test
mejrs Oct 21, 2026
1077a78
Remove use of is_powerpc64_feature_detected
adamgemmell Oct 22, 2026
8bee029
Don't let riscv32gc-unknown-linux-gnu (tier 3) block CI on failure
adamgemmell Oct 22, 2026
2a66a81
Merge pull request #2259 from adamgemmell/dev/adagem01/icx-ver-bump
folkertdev Oct 22, 2026
3c5eefd
Merge pull request #2221 from heiher/stabilize-loong64-simd
folkertdev Oct 22, 2026
c6ed0ac
Reject cfg on expressions that cannot be safely removed
Unique-Usman Jul 18, 2026
da863f3
Suggest adding lifetime for `dyn Trait` in return type
estebank Oct 12, 2026
816be68
Disable recovery when attribute parser shouldn't emit
JonathanBrouwer Oct 25, 2026
e66afcd
Use a raw pointer for ownership of `LLVMBuilderRef`
Zalathar Oct 15, 2026
7434659
Tweak some SimpleCx lifetimes
Zalathar Oct 23, 2026
3b72d26
Use an invariant lifetime brand for LLVM contexts
Zalathar Oct 15, 2026
836cabb
AttrItem: remove id field
mejrs Oct 24, 2026
d105f7a
Split `Attribute::Unparsed` into `Tool` and `DeriveHelper`
mejrs Oct 24, 2026
1026f1b
make `tool_attrs` method to retrieve tool attributes.
mejrs Oct 25, 2026
d11be6b
fd-views: enable test on Miri
RalfJung Oct 26, 2026
7c12d6c
x86-64-linux-gnu seems to have working f128 now
RalfJung Oct 26, 2026
50871c8
copy_nonoverlapping: dont skip ovelrap check when src is fully uninit
RalfJung Oct 26, 2026
50031df
miri: add missing alignment check in write_bytes
RalfJung Oct 26, 2026
843ede5
Remove handling for `PassMode::Direct` aggregates
beetrees Oct 26, 2026
50f2c19
Refactor call argument codegen
beetrees Oct 24, 2026
21f918c
Lex lifetimes using emoji and emit appropriate error
estebank Mar 15, 2026
39d7cc1
docs: Nitpick change in `HashMap`'s `.insert_entry()` doc example
mikwielgus Oct 26, 2026
b6c9f78
core: Split the `resumable_breakpoint` intrinsic and constify it
tgross35 Oct 19, 2026
d0e5a14
std: Re-export core::process::resumable_breakpoint
tgross35 Oct 19, 2026
be649c0
Use a cfg-specific error for unsupported positions
Unique-Usman Oct 22, 2026
1b97c28
Add strict methods to `NonZero`
hsanzg Oct 24, 2026
7cd27a6
Add `NonZero::strict_` tests via macro-generated modules
hsanzg Oct 25, 2026
b749d20
parse inline and rustc_force_inline with same parser
mejrs Oct 20, 2026
b5978be
inline calls to Span::eq_ctxt()
conferatur Oct 27, 2026
ddb20b9
remove Span::eq_ctxt()
conferatur Oct 27, 2026
a95082d
Prepare for merging from rust-lang/rust
invalid-email-address Oct 27, 2026
cf5da2b
Merge ref '16d1ffac17ad' from rust-lang/rust
invalid-email-address Oct 27, 2026
ed7d26d
Run `cargo fmt`
invalid-email-address Oct 27, 2026
6574cf3
Merge pull request #2246 from rust-lang/rustc-pull
tgross35 Oct 27, 2026
eb44caa
update comments for unused-parens-macro-pat-issue-86959 lint test
conferatur Oct 27, 2026
a1dc0ab
rustdoc-search: rank re-export lower
notriddle Oct 27, 2026
9d230f2
fix: handle `false` in root contexts
born-in-autumn Oct 15, 2026
6aae980
feat: update destructure_type_outlives_constraints_in_root return typ…
born-in-autumn Oct 16, 2026
675c997
update destructure_type_outlives_constraints_in_root method return type
born-in-autumn Oct 27, 2026
800ff08
Enable `--generate-link-to-definition` rustdoc option on std docs
GuillaumeGomez Sep 15, 2026
f6db3da
Create new builtin rustc macro `rustdoc_skip_body` and replace the `s…
GuillaumeGomez Oct 14, 2026
4d2c7ad
Disable `unused_macros` check on `rustdoc_skip_body`
GuillaumeGomez Oct 24, 2026
b8a7bef
Ignore more std functions body
GuillaumeGomez Oct 25, 2026
6623b95
Stop using `Path` on Windows to generate URLs because of wrong `\` pa…
GuillaumeGomez Oct 26, 2026
1e90031
drop ands which are a superset of other ands
born-in-autumn Oct 18, 2026
e2ebb15
feat: add new simple test
born-in-autumn Oct 27, 2026
a8ad513
delegation: emit error when there is no field for Self mapping
aerooneqq Oct 27, 2026
66ac7ac
Rollup merge of #165032 - folkertdev:stdarch-sync-2026-10-27, r=folke…
JonathanBrouwer Oct 27, 2026
fd6334b
Rollup merge of #159580 - Unique-Usman:ua/cfg, r=petrochenkov
JonathanBrouwer Oct 27, 2026
e15c6a1
Rollup merge of #162597 - mejrs:ambiguity, r=petrochenkov
JonathanBrouwer Oct 27, 2026
d94084c
Rollup merge of #162808 - GuillaumeGomez:std-link-to-def, r=Amanieu
JonathanBrouwer Oct 27, 2026
4b62384
Rollup merge of #164168 - jackh726:alias-liveness-unsoundness-tests, …
JonathanBrouwer Oct 27, 2026
9fffcd4
Rollup merge of #164188 - estebank:issue-41966, r=bushrat011899,oli-obk
JonathanBrouwer Oct 27, 2026
6207fce
Rollup merge of #164345 - born-in-autumn:fix/handle-false-in-root-con…
JonathanBrouwer Oct 27, 2026
ab36a04
Rollup merge of #164494 - born-in-autumn:fix/drop-superset-ands, r=Bo…
JonathanBrouwer Oct 27, 2026
3a7a0d6
Rollup merge of #164608 - tgross35:resumable_breakpoint-updates, r=Ma…
JonathanBrouwer Oct 27, 2026
598b0a4
Rollup merge of #164785 - aerooneqq:delegation-zero-fields-infer-ice,…
JonathanBrouwer Oct 27, 2026
54d25b3
Rollup merge of #164787 - Zalathar:llref, r=hanna-kruppe
JonathanBrouwer Oct 27, 2026
317f3ba
Rollup merge of #164871 - beetrees:direct-always-immediate, r=bjorn3
JonathanBrouwer Oct 27, 2026
5159388
Rollup merge of #164966 - RalfJung:x86-linux-f128, r=tgross35
JonathanBrouwer Oct 27, 2026
b6f64b2
Rollup merge of #153893 - estebank:emoji-lifetime, r=jdonszelmann,Vey…
JonathanBrouwer Oct 27, 2026
51c7333
Rollup merge of #164648 - mejrs:inline_parser, r=JonathanBrouwer
JonathanBrouwer Oct 27, 2026
7fab4b0
Rollup merge of #164848 - hsanzg:strict-nonzero, r=jhpratt
JonathanBrouwer Oct 27, 2026
279a3e4
Rollup merge of #164895 - JonathanBrouwer:disable-recovery, r=mejrs
JonathanBrouwer Oct 27, 2026
154a13b
Rollup merge of #164900 - mejrs:tool_attrs, r=JonathanBrouwer,ada4a
JonathanBrouwer Oct 27, 2026
f91825c
Rollup merge of #164963 - RalfJung:fd-views-miri-test, r=the8472
JonathanBrouwer Oct 27, 2026
e6e95e3
Rollup merge of #164993 - RalfJung:nonoverlapping-uninit, r=oli-obk
JonathanBrouwer Oct 27, 2026
9f3c6f2
Rollup merge of #164996 - RalfJung:write_bytes_alignment, r=oli-obk
JonathanBrouwer Oct 27, 2026
7a93821
Rollup merge of #165004 - mikwielgus:entry-api-nitpick-2, r=aapoalas
JonathanBrouwer Oct 27, 2026
7e24cb8
Rollup merge of #165012 - conferatur:remove-span-eq-ctxt, r=mejrs
JonathanBrouwer Oct 27, 2026
57be3c2
Rollup merge of #165024 - notriddle:re-export-lower, r=GuillaumeGomez
JonathanBrouwer Oct 27, 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: 1 addition & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4640,6 +4640,7 @@ dependencies = [
"thin-vec",
"tracing",
"unicode-normalization",
"unicode-properties",
"unicode-width 0.2.2",
]

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
.gen_args
.as_ref()
.map_or(constraint.ident.span, |args| args.span());
if bound_end_span.eq_ctxt(constraint.span) {
if bound_end_span.ctxt() == constraint.span.ctxt() {
Some(self.tcx.sess.source_map().next_point(bound_end_span))
} else {
None
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_passes/src/ast_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1703,7 +1703,7 @@ impl Visitor<'_> for AstValidator<'_> {
}
if ident.name == kw::Underscore
&& !matches!(item.vis.kind, VisibilityKind::Inherited)
&& ident.span.eq_ctxt(item.vis.span)
&& ident.span.ctxt() == item.vis.span.ctxt()
{
self.lint_buffer.buffer_lint(
UNUSED_VISIBILITIES,
Expand Down
45 changes: 28 additions & 17 deletions compiler/rustc_attr_ir/src/attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use rustc_ast::{AttrStyle, DelimArgs, MetaItemLit, ast, join_path_idents};
use rustc_data_structures::stable_hash::{StableHash, StableHashCtxt, StableHasher};
use rustc_error_messages::{DiagArgValue, IntoDiagArg};
use rustc_macros::{Decodable, Encodable, StableHash};
use rustc_span::{AttrId, DUMMY_SP, Ident, Span, Symbol, sym};
use rustc_span::{AttrId, DUMMY_SP, Ident, Span, Symbol};
use smallvec::SmallVec;
use thin_vec::ThinVec;

Expand Down Expand Up @@ -72,7 +72,6 @@ pub struct AttrItem {
// Not lowered to hir::Path because we have no NodeId to resolve to.
pub path: AttrPath,
pub args: AttrArgs,
pub id: HashIgnoredAttrId,
/// Denotes if the attribute decorates the following construct (outer)
/// or the construct this attribute is contained within (inner).
pub style: AttrStyle,
Expand Down Expand Up @@ -110,16 +109,25 @@ pub enum Attribute {
/// [`AttributeKind::Stability`] attribute. Most `Attribute` variants do have a [`Span`] field,
/// though, mostly for the purpose of generating diagnostics later in the compilation process.
Parsed(AttributeKind),
/// Represents non built-in attributes, which are not converted into a parsed form.

/// A tool attribute.
///
/// Tool attributes, with the exception of diagnostic attributes, are not converted into a
/// parsed form.
Tool(Box<AttrItem>),

/// A derive helper attribute.
///
/// This is the case for custom tool attributes and derive helper attributes.
Unparsed(Box<AttrItem>),
/// Derive helper attributes serve no use beyond macro expansion, but they are useful to
/// consumers of `rustdoc-json`, so we keep them around. See
/// <https://github.com/rust-lang/rust/issues/157107> for context.
DeriveHelper(Box<AttrItem>),
}

impl Attribute {
pub fn value_lit(&self) -> Option<&MetaItemLit> {
match &self {
Attribute::Unparsed(n) => match n.as_ref() {
Attribute::Tool(n) | Attribute::DeriveHelper(n) => match n.as_ref() {
AttrItem { args: AttrArgs::Eq { eq_span: _, expr }, .. } => Some(expr),
_ => None,
},
Expand All @@ -129,7 +137,9 @@ impl Attribute {

pub fn is_prefix_attr_for_suggestions(&self) -> bool {
match self {
Attribute::Unparsed(attr) => attr.span.desugaring_kind().is_none(),
Attribute::Tool(attr) | Attribute::DeriveHelper(attr) => {
attr.span.desugaring_kind().is_none()
}
// Other parsed attributes that can appear on expressions originate from source and
// should make suggestions treat the expression like a prefixed form.
Attribute::Parsed(_) => true,
Expand All @@ -141,7 +151,7 @@ impl AttributeExt for Attribute {
#[inline]
fn meta_item_list(&self) -> Option<ThinVec<ast::MetaItemInner>> {
match &self {
Attribute::Unparsed(n) => match n.as_ref() {
Attribute::Tool(n) | Attribute::DeriveHelper(n) => match n.as_ref() {
AttrItem { args: AttrArgs::Delimited(d), .. } => {
ast::MetaItemKind::list_from_tokens(d.tokens.clone())
}
Expand All @@ -165,21 +175,23 @@ impl AttributeExt for Attribute {
#[inline]
fn name(&self) -> Option<Symbol> {
match &self {
Attribute::Unparsed(n) => {
Attribute::DeriveHelper(n) => {
if let [ident] = n.path.segments.as_ref() {
Some(*ident)
} else {
None
}
}
_ => None,
Attribute::Parsed(..) => None,
// Tools are never single segment attributes
Attribute::Tool(..) => None,
}
}

#[inline]
fn path_matches(&self, name: &[Symbol]) -> bool {
match &self {
Attribute::Unparsed(n) => n.path.segments.iter().eq(name),
Attribute::Tool(n) | Attribute::DeriveHelper(n) => n.path.segments.iter().eq(name),
_ => false,
}
}
Expand All @@ -196,7 +208,7 @@ impl AttributeExt for Attribute {
#[inline]
fn is_word(&self) -> bool {
match &self {
Attribute::Unparsed(n) => {
Attribute::Tool(n) | Attribute::DeriveHelper(n) => {
matches!(n.args, AttrArgs::Empty)
}
_ => false,
Expand All @@ -206,14 +218,16 @@ impl AttributeExt for Attribute {
#[inline]
fn symbol_path(&self) -> Option<SmallVec<[Symbol; 1]>> {
match &self {
Attribute::Unparsed(n) => Some(n.path.segments.iter().copied().collect()),
Attribute::Tool(n) | Attribute::DeriveHelper(n) => {
Some(n.path.segments.iter().copied().collect())
}
_ => None,
}
}

fn path_span(&self) -> Option<Span> {
match &self {
Attribute::Unparsed(attr) => Some(attr.path.span),
Attribute::Tool(attr) | Attribute::DeriveHelper(attr) => Some(attr.path.span),
Attribute::Parsed(_) => None,
}
}
Expand All @@ -239,9 +253,6 @@ impl AttributeExt for Attribute {
fn doc_resolution_scope(&self) -> Option<AttrStyle> {
match self {
Attribute::Parsed(AttributeKind::DocComment { style, .. }) => Some(*style),
Attribute::Unparsed(attr) if self.has_name(sym::doc) && self.value_str().is_some() => {
Some(attr.style)
}
_ => None,
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_ir/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ macro_rules! find_attr {
$crate::Attribute::Parsed($pattern) $(if $guard)? => {
break 'done Some($e);
}
$crate::Attribute::Unparsed(..) => {}
$crate::Attribute::Tool(..) | $crate::Attribute::DeriveHelper(..) => {}
// In lint emitting, there's a specific exception for this warning.
// It's not usually emitted from inside macros from other crates
// (see https://github.com/rust-lang/rust/issues/110613)
Expand Down
Loading
Loading