Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f80ef13
Make generate_proc_macro_decls_symbol a standalone function
bjorn3 Jun 10, 2026
f80c17e
Extract load_symbol_from_dylib and dlsym_proc_macros into a new module
bjorn3 Jun 10, 2026
88c2f7d
Move proc-macro dlopen from proc-macro-srv to rustc_metadata
bjorn3 Jun 10, 2026
d17ba8a
[Priroda] Rename `step` to `stepi` for single MIR instruction stepping
moabo3li Jun 8, 2026
bb0a187
[Priroda] Add step command to step through source lines
moabo3li Jun 8, 2026
8a7e1d7
Prepare for merging from rust-lang/rust
Jun 13, 2026
08177ea
Merge ref '4e391cf2425c' from rust-lang/rust
Jun 13, 2026
cf0ea64
fmt
Jun 13, 2026
72ef4e7
Merge pull request #5105 from rust-lang/rustup-2026-06-13
RalfJung Jun 13, 2026
fefab0c
Prepare for merging from rust-lang/rust
Jun 15, 2026
9c92c06
Merge ref '3daae5e42ec9' from rust-lang/rust
Jun 15, 2026
def508c
Merge pull request #5108 from rust-lang/rustup-2026-06-15
oli-obk Jun 15, 2026
f87a1ba
[Priroda] avoid repeated stops when one source line maps to multiple …
moabo3li Jun 10, 2026
d97a49f
[Priroda] Fix clippy warnings
moabo3li Jun 12, 2026
a272040
[Priroda] Add locals command to show variable names in the current frame
moabo3li Jun 17, 2026
d69410b
Merge pull request #5112 from moabo3li/priroda-commands
oli-obk Jun 18, 2026
44bb193
Prepare for merging from rust-lang/rust
RalfJung Jun 18, 2026
2badf36
Merge ref 'c55fad5a9048' from rust-lang/rust
RalfJung Jun 18, 2026
d3cb383
Update ipc-channel to 0.22 to drop bincode dependency
Turbo87 Jun 18, 2026
2f931e2
ipc-channel: Use crate-root `TryRecvError` path
Turbo87 Jun 18, 2026
f4d74a1
Merge pull request #5117 from RalfJung/rustu
RalfJung Jun 18, 2026
54c9c72
Merge pull request #5115 from Turbo87/update-ipc-channel
RalfJung Jun 18, 2026
48fea62
Update actions/download-artifact action to v8.0.1
renovate-bot Jun 18, 2026
d81944d
Update backtrace submodule to pick up AIX related fixes.
amy-kwan Jun 19, 2026
93741ff
Adjust `InvalidTarget` emitting for diagnostic attributes
JonathanBrouwer Jun 20, 2026
9e09aee
Use the new logic for the diagnostic attributes
JonathanBrouwer Jun 20, 2026
b9cd5ad
Add me to some rotation groups
JohnTitor Jun 21, 2026
35b4396
Prepare for merging from rust-lang/rust
Jun 21, 2026
b1867d9
Merge ref '01f54e80e888' from rust-lang/rust
Jun 21, 2026
48e7c28
rebuild LLVM when `bootstrap.toml` config changes
folkertdev Jun 12, 2026
9b6ab66
port-intrinsic-test
xonx4l May 9, 2026
5b5e408
add test case for miscompilation
hanna-kruppe Jun 21, 2026
a642d9b
don't try to remove assignments in SimplifyComparisonIntegral
hanna-kruppe Jun 21, 2026
2339cc4
we can no longer entirely skip proc macro tests
RalfJung Jun 21, 2026
dc80a26
Merge pull request #5121 from rust-lang/rustup-2026-06-21
RalfJung Jun 21, 2026
ad7973f
update lockfile
RalfJung Jun 21, 2026
f8f1189
Rollup merge of #156356 - xonx4l:port-intrinsic-test, r=kobzol,folker…
JonathanBrouwer Jun 21, 2026
b0f7e12
Rollup merge of #157711 - bjorn3:proc_macro_refactor7, r=Mark-Simulacrum
JonathanBrouwer Jun 21, 2026
0180169
Rollup merge of #157836 - folkertdev:rebuild-llvm-on-bootstrap-change…
JonathanBrouwer Jun 21, 2026
5030e61
Rollup merge of #158214 - hanna-kruppe:issue-158206, r=cjgillot
JonathanBrouwer Jun 21, 2026
155262d
Rollup merge of #158226 - RalfJung:miri, r=RalfJung
JonathanBrouwer Jun 21, 2026
19caa7c
Rollup merge of #158108 - renovate-bot:renovate/actions-download-arti…
JonathanBrouwer Jun 21, 2026
d574437
Rollup merge of #158150 - amy-kwan:amy-kwan/Update-backtrace, r=Mark-…
JonathanBrouwer Jun 21, 2026
a98e4af
Rollup merge of #158178 - JonathanBrouwer:diag_target, r=mejrs
JonathanBrouwer Jun 21, 2026
4849b10
Rollup merge of #158195 - JohnTitor:add-me-rotation, r=Mark-Simulacrum
JonathanBrouwer Jun 21, 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
4 changes: 2 additions & 2 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ jobs:
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5

- name: download Cargo.lock from update job
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: Cargo-lock
- name: download cargo-update log from update job
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: cargo-updates

Expand Down
20 changes: 6 additions & 14 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -300,15 +300,6 @@ dependencies = [
"serde",
]

[[package]]
name = "bincode"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]

[[package]]
name = "bitflags"
version = "2.10.0"
Expand Down Expand Up @@ -2106,18 +2097,19 @@ dependencies = [

[[package]]
name = "ipc-channel"
version = "0.20.2"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f93600b5616c2d075f8af8dbd23c1d69278c5d24e4913d220cbc60b14c95c180"
checksum = "347ef783e380784658248bdb0b87ca1293e3e3df3fc7dee061e129aa5f013d61"
dependencies = [
"bincode",
"crossbeam-channel",
"fnv",
"libc",
"mio",
"postcard",
"rand 0.9.2",
"serde",
"rustc-hash 2.1.1",
"serde_core",
"tempfile",
"thiserror 2.0.17",
"uuid",
"windows 0.61.3",
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
use rustc_feature::AttributeStability;
use rustc_hir::Target;
use rustc_hir::attrs::AttributeKind;
use rustc_session::lint::builtin::{
MALFORMED_DIAGNOSTIC_ATTRIBUTES, MISPLACED_DIAGNOSTIC_ATTRIBUTES,
};
use rustc_session::lint::builtin::MALFORMED_DIAGNOSTIC_ATTRIBUTES;
use rustc_span::{Symbol, sym};

use crate::attributes::prelude::Allow;
use crate::attributes::{OnDuplicate, SingleAttributeParser};
use crate::context::AcceptContext;
use crate::diagnostics::IncorrectDoNotRecommendLocation;
use crate::parser::ArgParser;
use crate::target_checking::{ALL_TARGETS, AllowedTargets};
use crate::target_checking::AllowedTargets;
use crate::{AttributeTemplate, template};

pub(crate) struct DoNotRecommendParser;
impl SingleAttributeParser for DoNotRecommendParser {
const PATH: &[Symbol] = &[sym::diagnostic, sym::do_not_recommend];
const ON_DUPLICATE: OnDuplicate = OnDuplicate::Warn;
// "Allowed" on any target, noop on all but trait impls
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(ALL_TARGETS);
const ALLOWED_TARGETS: AllowedTargets =
AllowedTargets::AllowListWarnRest(&[Allow(Target::Impl { of_trait: true })]);
const TEMPLATE: AttributeTemplate = template!(Word /*doesn't matter */);
const STABILITY: AttributeStability = AttributeStability::Stable;

Expand All @@ -32,16 +31,6 @@ impl SingleAttributeParser for DoNotRecommendParser {
);
}

if !matches!(cx.target, Target::Impl { of_trait: true }) {
let target_span = cx.target_span;
cx.emit_lint(
MISPLACED_DIAGNOSTIC_ATTRIBUTES,
IncorrectDoNotRecommendLocation { target_span },
attr_span,
);
return None;
}

Some(AttributeKind::DoNotRecommend)
}
}
20 changes: 5 additions & 15 deletions compiler/rustc_attr_parsing/src/attributes/diagnostic/on_const.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use rustc_feature::AttributeStability;
use rustc_hir::attrs::diagnostic::Directive;
use rustc_session::lint::builtin::MISPLACED_DIAGNOSTIC_ATTRIBUTES;

use crate::attributes::diagnostic::*;
use crate::attributes::prelude::*;
use crate::diagnostics::DiagnosticOnConstOnlyForTraitImpls;
#[derive(Default)]
pub(crate) struct OnConstParser {
span: Option<Span>,
Expand All @@ -26,18 +24,6 @@ impl AttributeParser for OnConstParser {
let span = cx.attr_span;
this.span = Some(span);

// FIXME(mejrs) no constness field on `Target`,
// so non-constness is still checked in check_attr.rs
if !matches!(cx.target, Target::Impl { of_trait: true }) {
let target_span = cx.target_span;
cx.emit_lint(
MISPLACED_DIAGNOSTIC_ATTRIBUTES,
DiagnosticOnConstOnlyForTraitImpls { target_span },
span,
);
return;
}

let mode = Mode::DiagnosticOnConst;

let Some(items) = parse_list(cx, args, mode) else { return };
Expand All @@ -51,7 +37,11 @@ impl AttributeParser for OnConstParser {

// "Allowed" on all targets; noop on anything but non-const trait impls;
// this linted on in parser.
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(ALL_TARGETS);
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowListWarnRest(&[
// FIXME(mejrs) no constness field on `Target`,
// so non-constness is still checked in check_attr.rs
Allow(Target::Impl { of_trait: true }),
]);

fn finalize(self, _cx: &FinalizeContext<'_, '_>) -> Option<AttributeKind> {
if let Some(span) = self.span {
Expand Down
16 changes: 6 additions & 10 deletions compiler/rustc_attr_parsing/src/attributes/diagnostic/on_move.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
use rustc_feature::AttributeStability;
use rustc_hir::attrs::AttributeKind;
use rustc_session::lint::builtin::MISPLACED_DIAGNOSTIC_ATTRIBUTES;
use rustc_span::sym;

use crate::attributes::diagnostic::*;
use crate::attributes::prelude::*;
use crate::context::AcceptContext;
use crate::diagnostics::DiagnosticOnMoveOnlyForAdt;
use crate::parser::ArgParser;
use crate::target_checking::{ALL_TARGETS, AllowedTargets};
use crate::target_checking::AllowedTargets;
use crate::template;

#[derive(Default)]
Expand All @@ -28,11 +26,6 @@ impl OnMoveParser {
let span = cx.attr_span;
self.span = Some(span);

if !matches!(cx.target, Target::Enum | Target::Struct | Target::Union) {
cx.emit_lint(MISPLACED_DIAGNOSTIC_ATTRIBUTES, DiagnosticOnMoveOnlyForAdt, span);
return;
}

let Some(items) = parse_list(cx, args, mode) else { return };

if let Some(directive) = parse_directive_items(cx, mode, items.mixed(), true) {
Expand All @@ -50,8 +43,11 @@ impl AttributeParser for OnMoveParser {
},
)];

// "Allowed" for all targets but noop if used on not-adt.
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(ALL_TARGETS);
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowListWarnRest(&[
Allow(Target::Enum),
Allow(Target::Struct),
Allow(Target::Union),
]);

fn finalize(self, _cx: &FinalizeContext<'_, '_>) -> Option<AttributeKind> {
if let Some(_span) = self.span {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
use rustc_hir::attrs::AttributeKind;
use rustc_lint_defs::builtin::MISPLACED_DIAGNOSTIC_ATTRIBUTES;
use rustc_span::sym;

use crate::attributes::AttributeStability;
use crate::attributes::diagnostic::*;
use crate::attributes::prelude::*;
use crate::context::AcceptContext;
use crate::diagnostics::DiagnosticOnTypeErrorOnlyForAdt;
use crate::parser::ArgParser;
use crate::target_checking::{ALL_TARGETS, AllowedTargets};
use crate::target_checking::AllowedTargets;
use crate::template;

#[derive(Default)]
Expand All @@ -26,11 +24,6 @@ impl OnTypeErrorParser {
let span = cx.attr_span;
self.span = Some(span);

if !matches!(cx.target, Target::Enum | Target::Struct | Target::Union) {
cx.emit_lint(MISPLACED_DIAGNOSTIC_ATTRIBUTES, DiagnosticOnTypeErrorOnlyForAdt, span);
return;
}

let Some(items) = parse_list(cx, args, mode) else { return };

if let Some(directive) = parse_directive_items(cx, mode, items.mixed(), true) {
Expand All @@ -49,7 +42,11 @@ impl AttributeParser for OnTypeErrorParser {
},
)];

const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(ALL_TARGETS);
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowListWarnRest(&[
Allow(Target::Enum),
Allow(Target::Struct),
Allow(Target::Union),
]);

fn finalize(self, _cx: &FinalizeContext<'_, '_>) -> Option<AttributeKind> {
if let Some(span) = self.span {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use rustc_feature::AttributeStability;
use rustc_hir::attrs::diagnostic::Directive;
use rustc_session::lint::builtin::MISPLACED_DIAGNOSTIC_ATTRIBUTES;

use crate::attributes::diagnostic::*;
use crate::attributes::prelude::*;
use crate::diagnostics::DiagnosticOnUnimplementedOnlyForTraits;

#[derive(Default)]
pub(crate) struct OnUnimplementedParser {
Expand All @@ -17,15 +15,6 @@ impl OnUnimplementedParser {
let span = cx.attr_span;
self.span = Some(span);

if !matches!(cx.target, Target::Trait) {
cx.emit_lint(
MISPLACED_DIAGNOSTIC_ATTRIBUTES,
DiagnosticOnUnimplementedOnlyForTraits,
span,
);
return;
}

let Some(items) = parse_list(cx, args, mode) else { return };

if let Some(directive) = parse_directive_items(cx, mode, items.mixed(), true) {
Expand Down Expand Up @@ -56,8 +45,8 @@ impl AttributeParser for OnUnimplementedParser {
},
),
];
//FIXME attribute is not parsed for non-traits but diagnostics are issued in `check_attr.rs`
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(ALL_TARGETS);
const ALLOWED_TARGETS: AllowedTargets =
AllowedTargets::AllowListWarnRest(&[Allow(Target::Trait)]);

fn finalize(self, _cx: &FinalizeContext<'_, '_>) -> Option<AttributeKind> {
if let Some(_span) = self.span {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
use rustc_feature::AttributeStability;
use rustc_hir::attrs::diagnostic::Directive;
use rustc_session::lint::builtin::MISPLACED_DIAGNOSTIC_ATTRIBUTES;

use crate::ShouldEmit;
use crate::attributes::diagnostic::*;
use crate::attributes::prelude::*;
use crate::diagnostics::DiagnosticOnUnknownInvalidTarget;

#[derive(Default)]
pub(crate) struct OnUnknownParser {
Expand All @@ -25,20 +22,6 @@ impl OnUnknownParser {
let span = cx.attr_span;
self.span = Some(span);

// At early parsing we get passed `Target::Crate` regardless of the item we're on.
// Therefore, only do target checking if we can emit.
let early = matches!(cx.should_emit, ShouldEmit::Nothing);

if !early && !matches!(cx.target, Target::Use | Target::Mod | Target::Crate) {
let target_span = cx.target_span;
cx.emit_lint(
MISPLACED_DIAGNOSTIC_ATTRIBUTES,
DiagnosticOnUnknownInvalidTarget { target_span },
span,
);
return;
}

let Some(items) = parse_list(cx, args, mode) else { return };

if let Some(directive) = parse_directive_items(cx, mode, items.mixed(), true) {
Expand All @@ -57,7 +40,11 @@ impl AttributeParser for OnUnknownParser {
},
)];
// "Allowed" for all targets, but noop for all but use statements.
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(ALL_TARGETS);
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowListWarnRest(&[
Allow(Target::Use),
Allow(Target::Mod),
Allow(Target::Crate),
]);

fn finalize(self, _cx: &FinalizeContext<'_, '_>) -> Option<AttributeKind> {
if let Some(_span) = self.span {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use rustc_feature::AttributeStability;
use rustc_hir::attrs::diagnostic::Directive;
use rustc_session::lint::builtin::MISPLACED_DIAGNOSTIC_ATTRIBUTES;

use crate::attributes::diagnostic::*;
use crate::attributes::prelude::*;
use crate::diagnostics::DiagnosticOnUnmatchedArgsOnlyForMacros;

#[derive(Default)]
pub(crate) struct OnUnmatchedArgsParser {
Expand All @@ -25,15 +23,6 @@ impl AttributeParser for OnUnmatchedArgsParser {
let span = cx.attr_span;
this.span = Some(span);

if !matches!(cx.target, Target::MacroDef) {
cx.emit_lint(
MISPLACED_DIAGNOSTIC_ATTRIBUTES,
DiagnosticOnUnmatchedArgsOnlyForMacros,
span,
);
return;
}

let mode = Mode::DiagnosticOnUnmatchedArgs;
let Some(items) = parse_list(cx, args, mode) else { return };

Expand All @@ -44,7 +33,8 @@ impl AttributeParser for OnUnmatchedArgsParser {
},
)];

const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(ALL_TARGETS);
const ALLOWED_TARGETS: AllowedTargets =
AllowedTargets::AllowListWarnRest(&[Allow(Target::MacroDef)]);

fn finalize(self, _cx: &FinalizeContext<'_, '_>) -> Option<AttributeKind> {
if let Some(_span) = self.span {
Expand Down
39 changes: 0 additions & 39 deletions compiler/rustc_attr_parsing/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,45 +279,6 @@ pub(crate) struct UnknownCrateTypesSuggestion {
pub snippet: Symbol,
}

#[derive(Diagnostic)]
#[diag("`#[diagnostic::on_const]` can only be applied to non-const trait implementations")]
pub(crate) struct DiagnosticOnConstOnlyForTraitImpls {
#[label("not a trait implementation")]
pub target_span: Span,
}

#[derive(Diagnostic)]
#[diag("`#[diagnostic::on_move]` can only be applied to enums, structs or unions")]
pub(crate) struct DiagnosticOnMoveOnlyForAdt;

#[derive(Diagnostic)]
#[diag("`#[diagnostic::on_unimplemented]` can only be applied to trait definitions")]
pub(crate) struct DiagnosticOnUnimplementedOnlyForTraits;

#[derive(Diagnostic)]
#[diag(
"`#[diagnostic::on_unknown]` can only be applied to `use` statements and module declarations"
)]
pub(crate) struct DiagnosticOnUnknownInvalidTarget {
#[label("not an import or module")]
pub target_span: Span,
}

#[derive(Diagnostic)]
#[diag("`#[diagnostic::on_unmatched_args]` can only be applied to macro definitions")]
pub(crate) struct DiagnosticOnUnmatchedArgsOnlyForMacros;

#[derive(Diagnostic)]
#[diag("`#[diagnostic::on_type_error]` can only be applied to enums, structs or unions")]
pub(crate) struct DiagnosticOnTypeErrorOnlyForAdt;

#[derive(Diagnostic)]
#[diag("`#[diagnostic::do_not_recommend]` can only be placed on trait implementations")]
pub(crate) struct IncorrectDoNotRecommendLocation {
#[label("not a trait implementation")]
pub target_span: Span,
}

#[derive(Diagnostic)]
#[diag("malformed `doc` attribute input")]
#[warning(
Expand Down
Loading
Loading