Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
973e303
enforce noalias on custom allocator Box by default
RalfJung May 26, 2026
b40e934
Merge pull request #5067 from RalfJung/noalias-custom-allocator-box
RalfJung May 27, 2026
cd44d5f
windows shims: avoid representing directories as paths
RalfJung May 27, 2026
d22cc82
Shim the LoongArch CRC intrinsics
Gelbpunkt May 24, 2026
62cc075
aarch64 crc: better variable names
RalfJung May 27, 2026
d4442c0
add loongarch64-unknown-linux-gnu target to CI (not officially suppor…
RalfJung May 27, 2026
53b3a84
Merge pull request #5069 from RalfJung/win-dir
RalfJung May 27, 2026
f737fc3
Merge pull request #5062 from Gelbpunkt/la64-crc
RalfJung May 27, 2026
9eea936
Prepare for merging from rust-lang/rust
May 28, 2026
e6481d7
Merge ref '8f02e856be94' from rust-lang/rust
May 28, 2026
617db62
Merge pull request #5072 from rust-lang/rustup-2026-05-28
RalfJung May 28, 2026
97f91eb
flock tests: cover the case of asking for both locks on the same file
RalfJung May 28, 2026
8bacbc1
Merge pull request #5073 from RalfJung/flock-tests
RalfJung May 28, 2026
b465d66
Add support for level-triggered epoll
WhySoBad May 26, 2026
3504096
Merge pull request #5071 from WhySoBad/level-triggered-epoll
RalfJung May 29, 2026
366be2e
Prepare for merging from rust-lang/rust
May 30, 2026
dddf84b
Merge ref '6368fd52cb9f' from rust-lang/rust
May 30, 2026
b956f21
fmt
May 30, 2026
07bd4cb
Merge pull request #5077 from rust-lang/rustup-2026-05-30
oli-obk May 30, 2026
55cb982
Add regression test for unhandled Crate(Mod) ICE
pbkx May 29, 2026
22cc43e
reduce sleep times in various tests
RalfJung May 31, 2026
c48dd01
feat: Implement linkat syscall for hardlink support
acegikmoo May 12, 2026
fa42565
Merge pull request #5079 from RalfJung/futex-timing
RalfJung May 31, 2026
90d167f
support prctl on Linux (not just Android)
RalfJung May 31, 2026
029cc55
Merge pull request #5081 from RalfJung/prctl
RalfJung May 31, 2026
58837e8
add shim for `neon.pmull64`
folkertdev May 27, 2026
8b35be8
minor cleanup
RalfJung May 31, 2026
5d34fd3
Merge pull request #5070 from folkertdev/aarch64-pmull64
RalfJung May 31, 2026
7284481
Merge pull request #5028 from acegikmoo/hardlink
RalfJung May 31, 2026
a559174
Convert feature gating to the new attr parsing infrastructure
JonathanBrouwer May 31, 2026
dd6760a
Update uitests
JonathanBrouwer May 31, 2026
fae7271
Remove stability information from `BUILTIN_ATTRIBUTES`
JonathanBrouwer May 31, 2026
d79693e
Fix typo in `DebuggerVisualizerParser`
JonathanBrouwer May 31, 2026
c238acd
fix: remove custom `check_epoll_wait` in epoll data race test
WhySoBad May 31, 2026
cad55b5
fix: remove custom `check_epoll_wait` in epoll block two thread test
WhySoBad May 31, 2026
c1572df
feat: add `check_epoll_wait_explicit`, remove generic events length
WhySoBad May 31, 2026
0151f30
fix: bless the block two thread stderr
WhySoBad May 31, 2026
cf8b4e9
[Priroda] refactor: move entry_fn from Miri bin to eval module to all…
moabo3li May 27, 2026
0357847
[Priroda] initial standalone CLI crate
moabo3li May 27, 2026
57517b3
Prepare for merging from rust-lang/rust
RalfJung Jun 1, 2026
5350517
Merge ref 'bef8e620f19a' from rust-lang/rust
RalfJung Jun 1, 2026
8954a11
minor tweaks
RalfJung Jun 1, 2026
7b0778b
Merge pull request #5083 from WhySoBad/epoll-check-more-events
RalfJung Jun 1, 2026
bf2661d
windows shims: avoid returning possibly outdated metadata
RalfJung Jun 1, 2026
19a1abe
libc-fs tests: cover some more corner cases
RalfJung Jun 1, 2026
cc5de07
Merge pull request #5082 from RalfJung/win-metadata
RalfJung Jun 1, 2026
9aa390e
[Priroda] Extract `miri_step` to share core step logic
moabo3li May 29, 2026
82d9159
[Priroda] Add build-only CI job
moabo3li Jun 1, 2026
3d78a30
tests: adapt for LLVM codegen change https://github.com/llvm/llvm-pro…
krasimirgg Jun 1, 2026
c668b83
Use a `ArrayVec` in `CastTarget`
alexcrichton May 29, 2026
452b0ce
Merge pull request #5068 from moabo3li/priroda
oli-obk Jun 1, 2026
00d4895
Update books
rustbot Jun 1, 2026
47acd7a
Remove help message for stability attributes
JonathanBrouwer May 31, 2026
6e2dc81
triagebot.toml: add LawnGnome to libs reviewers
LawnGnome Jun 1, 2026
832388a
Enable Enzyme for aarch64-apple-darwin
sgasho Jun 1, 2026
8845779
Use minimized unhandled Crate(Mod) regression
pbkx Jun 2, 2026
4e0f909
Rollup merge of #157240 - sgasho:enable_enzyme, r=ZuseZ4
jhpratt Jun 2, 2026
f079f84
Rollup merge of #157276 - RalfJung:miri, r=RalfJung
jhpratt Jun 2, 2026
c550435
Rollup merge of #157130 - alexcrichton:refactor-cast-target-internals…
jhpratt Jun 2, 2026
2263661
Rollup merge of #157131 - pbkx:issue-144888-ui-test, r=petrochenkov
jhpratt Jun 2, 2026
809d06f
Rollup merge of #157195 - JonathanBrouwer:gating-port, r=mejrs
jhpratt Jun 2, 2026
4e5740f
Rollup merge of #157256 - krasimirgg:llvm23-addp, r=durin42
jhpratt Jun 2, 2026
8b2e28f
Rollup merge of #157265 - rustbot:docs-update, r=ehuss
jhpratt Jun 2, 2026
206e6fd
Rollup merge of #157277 - LawnGnome:add-self-to-triagebot, r=LawnGnome
jhpratt Jun 2, 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 @@ -4756,6 +4756,7 @@ dependencies = [
name = "rustc_target"
version = "0.0.0"
dependencies = [
"arrayvec",
"bitflags",
"object 0.37.3",
"rustc_abi",
Expand Down
11 changes: 1 addition & 10 deletions compiler/rustc_ast_passes/src/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use rustc_ast::visit::{self, AssocCtxt, FnCtxt, FnKind, Visitor};
use rustc_ast::{self as ast, AttrVec, GenericBound, NodeId, PatKind, attr, token};
use rustc_attr_parsing::AttributeParser;
use rustc_errors::msg;
use rustc_feature::{AttributeGate, BUILTIN_ATTRIBUTE_MAP, BuiltinAttribute, Features};
use rustc_feature::Features;
use rustc_hir::Attribute;
use rustc_hir::attrs::AttributeKind;
use rustc_session::Session;
Expand Down Expand Up @@ -155,15 +155,6 @@ impl<'a> PostExpansionVisitor<'a> {

impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
fn visit_attribute(&mut self, attr: &ast::Attribute) {
let attr_info = attr.name().and_then(|name| BUILTIN_ATTRIBUTE_MAP.get(&name));
// Check feature gates for built-in attributes.
if let Some(BuiltinAttribute {
gate: AttributeGate::Gated { feature, message, check, notes, .. },
..
}) = attr_info
{
gate_alt!(self, check(self.features), *feature, attr.span, *message, *notes);
}
// Check unstable flavors of the `#[doc]` attribute.
if attr.has_name(sym::doc) {
for meta_item_inner in attr.meta_item_list().unwrap_or_default() {
Expand Down
11 changes: 8 additions & 3 deletions compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use std::iter;

use rustc_feature::AttributeStability;

use super::prelude::*;
use crate::session_diagnostics;

Expand All @@ -16,6 +18,7 @@ impl CombineAttributeParser for AllowInternalUnstableParser {
Warn(Target::Arm),
]);
const TEMPLATE: AttributeTemplate = template!(Word, List: &["feat1, feat2, ..."]);
const STABILITY: AttributeStability = unstable!(allow_internal_unstable);

fn extend(
cx: &mut AcceptContext<'_, '_>,
Expand All @@ -32,6 +35,7 @@ impl CombineAttributeParser for UnstableFeatureBoundParser {
const PATH: &[rustc_span::Symbol] = &[sym::unstable_feature_bound];
type Item = (Symbol, Span);
const CONVERT: ConvertFn<Self::Item> = |items, _| AttributeKind::UnstableFeatureBound(items);
const STABILITY: AttributeStability = unstable!(staged_api);
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Fn),
Allow(Target::Impl { of_trait: true }),
Expand All @@ -43,9 +47,6 @@ impl CombineAttributeParser for UnstableFeatureBoundParser {
cx: &mut AcceptContext<'_, '_>,
args: &ArgParser,
) -> impl IntoIterator<Item = Self::Item> {
if !cx.features().staged_api() {
cx.emit_err(session_diagnostics::StabilityOutsideStd { span: cx.attr_span });
}
parse_unstable(cx, args, <Self as CombineAttributeParser>::PATH[0])
.into_iter()
.zip(iter::repeat(cx.attr_span))
Expand All @@ -65,6 +66,10 @@ impl CombineAttributeParser for RustcAllowConstFnUnstableParser {
Allow(Target::Method(MethodKind::TraitImpl)),
]);
const TEMPLATE: AttributeTemplate = template!(Word, List: &["feat1, feat2, ..."]);
const STABILITY: AttributeStability = unstable!(
rustc_attrs,
"rustc_allow_const_fn_unstable side-steps feature gating and stability checks"
);

fn extend(
cx: &mut AcceptContext<'_, '_>,
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_attr_parsing/src/attributes/autodiff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::str::FromStr;

use rustc_ast::LitKind;
use rustc_ast::expand::autodiff_attrs::{DiffActivity, DiffMode};
use rustc_feature::{AttributeTemplate, template};
use rustc_feature::{AttributeStability, AttributeTemplate, template};
use rustc_hir::attrs::{AttributeKind, RustcAutodiff};
use rustc_hir::{MethodKind, Target};
use rustc_span::{Symbol, sym};
Expand All @@ -13,6 +13,7 @@ use crate::attributes::prelude::Allow;
use crate::context::AcceptContext;
use crate::parser::{ArgParser, MetaItemOrLitParser};
use crate::target_checking::AllowedTargets;
use crate::unstable;

pub(crate) struct RustcAutodiffParser;

Expand All @@ -29,6 +30,7 @@ impl SingleAttributeParser for RustcAutodiffParser {
List: &["MODE", "WIDTH", "INPUT_ACTIVITIES", "OUTPUT_ACTIVITY"],
"https://doc.rust-lang.org/std/autodiff/index.html"
);
const STABILITY: AttributeStability = unstable!(rustc_attrs);

fn convert(cx: &mut AcceptContext<'_, '_>, args: &ArgParser) -> Option<AttributeKind> {
let list = match args {
Expand Down
3 changes: 3 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/body.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
//! Attributes that can be found in function body.

use rustc_feature::AttributeStability;

use super::prelude::*;

pub(crate) struct CoroutineParser;

impl NoArgsAttributeParser for CoroutineParser {
const PATH: &[Symbol] = &[sym::coroutine];
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Closure)]);
const STABILITY: AttributeStability = unstable!(coroutines);
const CREATE: fn(rustc_span::Span) -> AttributeKind = |_| AttributeKind::Coroutine;
}
3 changes: 3 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/cfi_encoding.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use rustc_feature::AttributeStability;

use super::prelude::*;
pub(crate) struct CfiEncodingParser;
impl SingleAttributeParser for CfiEncodingParser {
Expand All @@ -9,6 +11,7 @@ impl SingleAttributeParser for CfiEncodingParser {
Allow(Target::Union),
]);
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "encoding");
const STABILITY: AttributeStability = unstable!(cfi_encoding);

fn convert(cx: &mut AcceptContext<'_, '_>, args: &ArgParser) -> Option<AttributeKind> {
let name_value = cx.expect_name_value(args, cx.attr_span, Some(sym::cfi_encoding))?;
Expand Down
21 changes: 18 additions & 3 deletions compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use rustc_feature::AttributeStability;
use rustc_hir::attrs::{CoverageAttrKind, OptimizeAttr, RtsanSetting, SanitizerSet, UsedBy};
use rustc_session::errors::feature_err;
use rustc_span::edition::Edition::Edition2024;
Expand All @@ -22,6 +23,7 @@ impl SingleAttributeParser for OptimizeParser {
Allow(Target::Method(MethodKind::Inherent)),
]);
const TEMPLATE: AttributeTemplate = template!(List: &["size", "speed", "none"]);
const STABILITY: AttributeStability = unstable!(optimize_attribute);

fn convert(cx: &mut AcceptContext<'_, '_>, args: &ArgParser) -> Option<AttributeKind> {
let single = cx.expect_single_element_list(args, cx.attr_span)?;
Expand Down Expand Up @@ -54,6 +56,7 @@ impl NoArgsAttributeParser for ColdParser {
Allow(Target::ForeignFn),
Allow(Target::Closure),
]);
const STABILITY: AttributeStability = AttributeStability::Stable;
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::Cold;
}

Expand All @@ -73,6 +76,7 @@ impl SingleAttributeParser for CoverageParser {
Allow(Target::Crate),
]);
const TEMPLATE: AttributeTemplate = template!(OneOf: &[sym::off, sym::on]);
const STABILITY: AttributeStability = unstable!(coverage_attribute);

fn convert(cx: &mut AcceptContext<'_, '_>, args: &ArgParser) -> Option<AttributeKind> {
let arg = cx.expect_single_element_list(args, cx.attr_span)?;
Expand Down Expand Up @@ -116,6 +120,7 @@ impl SingleAttributeParser for ExportNameParser {
Warn(Target::MacroCall),
]);
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "name");
const STABILITY: AttributeStability = AttributeStability::Stable;

fn convert(cx: &mut AcceptContext<'_, '_>, args: &ArgParser) -> Option<AttributeKind> {
let nv = cx.expect_name_value(args, cx.attr_span, None)?;
Expand Down Expand Up @@ -143,6 +148,7 @@ impl SingleAttributeParser for RustcObjcClassParser {
const ALLOWED_TARGETS: AllowedTargets =
AllowedTargets::AllowList(&[Allow(Target::ForeignStatic)]);
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "ClassName");
const STABILITY: AttributeStability = unstable!(rustc_attrs);

fn convert(cx: &mut AcceptContext<'_, '_>, args: &ArgParser) -> Option<AttributeKind> {
let nv = cx.expect_name_value(args, cx.attr_span, None)?;
Expand Down Expand Up @@ -170,6 +176,7 @@ impl SingleAttributeParser for RustcObjcSelectorParser {
const ALLOWED_TARGETS: AllowedTargets =
AllowedTargets::AllowList(&[Allow(Target::ForeignStatic)]);
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "methodName");
const STABILITY: AttributeStability = unstable!(rustc_attrs);

fn convert(cx: &mut AcceptContext<'_, '_>, args: &ArgParser) -> Option<AttributeKind> {
let nv = cx.expect_name_value(args, cx.attr_span, None)?;
Expand Down Expand Up @@ -197,7 +204,7 @@ pub(crate) struct NakedParser {

impl AttributeParser for NakedParser {
const ATTRIBUTES: AcceptMapping<Self> =
&[(&[sym::naked], template!(Word), |this, cx, args| {
&[(&[sym::naked], template!(Word), AttributeStability::Stable, |this, cx, args| {
let Some(()) = cx.expect_no_args(args) else {
return;
};
Expand Down Expand Up @@ -331,6 +338,7 @@ impl NoArgsAttributeParser for TrackCallerParser {
Warn(Target::Field),
Warn(Target::MacroCall),
]);
const STABILITY: AttributeStability = AttributeStability::Stable;
const CREATE: fn(Span) -> AttributeKind = AttributeKind::TrackCaller;
}

Expand All @@ -347,6 +355,7 @@ impl NoArgsAttributeParser for NoMangleParser {
AllowSilent(Target::Const), // Handled in the `InvalidNoMangleItems` pass
Error(Target::Closure),
]);
const STABILITY: AttributeStability = AttributeStability::Stable;
const CREATE: fn(Span) -> AttributeKind = AttributeKind::NoMangle;
}

Expand All @@ -365,6 +374,7 @@ impl AttributeParser for UsedParser {
const ATTRIBUTES: AcceptMapping<Self> = &[(
&[sym::used],
template!(Word, List: &["compiler", "linker"]),
AttributeStability::Stable,
|group: &mut Self, cx, args| {
let used_by = match args {
ArgParser::NoArgs => UsedBy::Default,
Expand Down Expand Up @@ -502,6 +512,7 @@ impl CombineAttributeParser for TargetFeatureParser {
was_forced: false,
};
const TEMPLATE: AttributeTemplate = template!(List: &["enable = \"feat1, feat2\""]);
const STABILITY: AttributeStability = AttributeStability::Stable;

fn extend(
cx: &mut AcceptContext<'_, '_>,
Expand Down Expand Up @@ -541,6 +552,7 @@ impl CombineAttributeParser for ForceTargetFeatureParser {
Allow(Target::Method(MethodKind::Trait { body: true })),
Allow(Target::Method(MethodKind::TraitImpl)),
]);
const STABILITY: AttributeStability = unstable!(effective_target_features);

fn extend(
cx: &mut AcceptContext<'_, '_>,
Expand All @@ -554,10 +566,8 @@ pub(crate) struct SanitizeParser;

impl SingleAttributeParser for SanitizeParser {
const PATH: &[Symbol] = &[sym::sanitize];

// FIXME: still checked in check_attrs.rs
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(ALL_TARGETS);

const TEMPLATE: AttributeTemplate = template!(List: &[
r#"address = "on|off""#,
r#"kernel_address = "on|off""#,
Expand All @@ -571,6 +581,7 @@ impl SingleAttributeParser for SanitizeParser {
r#"thread = "on|off""#,
r#"realtime = "nonblocking|blocking|caller""#,
]);
const STABILITY: AttributeStability = unstable!(sanitize);

fn convert(cx: &mut AcceptContext<'_, '_>, args: &ArgParser) -> Option<AttributeKind> {
let list = cx.expect_list(args, cx.attr_span)?;
Expand Down Expand Up @@ -667,6 +678,7 @@ impl NoArgsAttributeParser for ThreadLocalParser {
const PATH: &[Symbol] = &[sym::thread_local];
const ALLOWED_TARGETS: AllowedTargets =
AllowedTargets::AllowList(&[Allow(Target::Static), Allow(Target::ForeignStatic)]);
const STABILITY: AttributeStability = unstable!(thread_local);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::ThreadLocal;
}

Expand All @@ -675,6 +687,7 @@ pub(crate) struct RustcPassIndirectlyInNonRusticAbisParser;
impl NoArgsAttributeParser for RustcPassIndirectlyInNonRusticAbisParser {
const PATH: &[Symbol] = &[sym::rustc_pass_indirectly_in_non_rustic_abis];
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Struct)]);
const STABILITY: AttributeStability = unstable!(rustc_attrs);
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcPassIndirectlyInNonRusticAbis;
}

Expand All @@ -684,6 +697,7 @@ impl NoArgsAttributeParser for RustcEiiForeignItemParser {
const PATH: &[Symbol] = &[sym::rustc_eii_foreign_item];
const ALLOWED_TARGETS: AllowedTargets =
AllowedTargets::AllowList(&[Allow(Target::ForeignFn), Allow(Target::ForeignStatic)]);
const STABILITY: AttributeStability = unstable!(eii_internals);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcEiiForeignItem;
}

Expand All @@ -693,6 +707,7 @@ impl SingleAttributeParser for PatchableFunctionEntryParser {
const PATH: &[Symbol] = &[sym::patchable_function_entry];
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Fn)]);
const TEMPLATE: AttributeTemplate = template!(List: &["prefix_nops = m, entry_nops = n"]);
const STABILITY: AttributeStability = unstable!(patchable_function_entry);

fn convert(cx: &mut AcceptContext<'_, '_>, args: &ArgParser) -> Option<AttributeKind> {
let meta_item_list = cx.expect_list(args, cx.attr_span)?;
Expand Down
3 changes: 3 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/confusables.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use rustc_feature::AttributeStability;

use super::prelude::*;
use crate::session_diagnostics::EmptyConfusables;

Expand All @@ -11,6 +13,7 @@ impl AttributeParser for ConfusablesParser {
const ATTRIBUTES: AcceptMapping<Self> = &[(
&[sym::rustc_confusables],
template!(List: &[r#""name1", "name2", ..."#]),
unstable!(rustc_attrs),
|this, cx, args| {
let Some(list) = cx.expect_list(args, cx.attr_span) else { return };

Expand Down
Loading
Loading