Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
b7df3de
rustdoc: Set tracing max_level_info when debug-logging is false
camelid Jul 21, 2026
6a7e3d2
remove const hack in alloc
Syvraa Jul 23, 2026
85adfcf
run intrinsic-test by default on x86_64-gnu
xonx4l Jul 26, 2026
7f8e276
add regression test for stale closure recovery state
TaKO8Ki Jul 27, 2026
da2697d
reset closure recovery state before parsing a statement
TaKO8Ki Jul 27, 2026
747ce1a
Make `AttributeParser::parse_limited` accept filters instead of symbol
nbdd0121 Jun 19, 2026
c8238fa
Stop mentioning `register_attr` feature from `custom_attribute`
nbdd0121 Jun 17, 2026
178bddc
Make `RegisterToolParser` implement `AttributeParser` directly
nbdd0121 Jun 19, 2026
75999c4
Split register_tool into register_attribute_tool and register_lint_tool
nbdd0121 Jun 17, 2026
43444bf
Remove duplicate tool error and add reserved error
nbdd0121 Jun 17, 2026
a22359b
Add test for `register_{attribute,lint}_tool` with cfg
nbdd0121 Jun 17, 2026
d0f008d
Expand register_tool feature gate test to cover attr and lint tool
nbdd0121 Jul 27, 2026
b0da120
Add register_{attribute,lint}_tool test with crate-attr
nbdd0121 Jul 27, 2026
7696641
Add regression test for fn-ptr coercion normalization ICE
zakrad Jul 27, 2026
4ab575d
Update `browser-ui-test` version to `0.25.0`
GuillaumeGomez Jul 27, 2026
ff161b1
Many "predicate"-to-"clause" renamings
nnethercote May 28, 2026
51a9794
Improve consistency of proc macro attribute error messages
nnethercote Jul 28, 2026
c9be59d
Improve consistency of `rustc_abi` attribute error messages
nnethercote Jul 28, 2026
02df958
Improve consistency of `rustc_const_stable` attribute error messages
nnethercote Jul 28, 2026
909079f
Improve consistency of `diagnostic::on_const` attribute error messages
nnethercote Jul 28, 2026
6c97237
Improve consistency of `test`/`bench` attribute error messages
nnethercote Jul 28, 2026
8704b63
Improve consistency of unsafe attribute error messages
nnethercote Jul 28, 2026
8bfa429
Add regression test for generic associated function suggestions
chenyukang Jul 28, 2026
c9dbe2b
Use value syntax for associated function suggestions
chenyukang Jul 28, 2026
1d32220
Add missing `"clipboard-read"` permission
GuillaumeGomez Jul 28, 2026
a6b2d2b
refactor(mir-transform): Calculate optimization status inside `run_pa…
jamie-osec Jul 28, 2026
506de47
Revert "codegen: handle OperandValue::Uninit in codegen_return_termin…
glandium Jul 28, 2026
7158341
Revert "codegen: add OperandValue::Uninit to skip stores for entirely…
glandium Jul 28, 2026
6d9e407
codegen: skip stores for entirely-uninit constant aggregate fields
glandium Jul 28, 2026
23e9a09
add build.sde to bootstrap.example.toml
xonx4l Jul 28, 2026
2b2b925
Fix ICE when dumping the dep graph with the parallel frontend
xmakro Jul 28, 2026
e945118
Distinguish the dep-graph index space from the live node count
xmakro Jul 28, 2026
32246e5
Update Rust crate tracing-subscriber to v0.3.23 [SECURITY]
renovate-bot Jul 28, 2026
c35d330
sanitize_standard_fds: clarify macos comment
RalfJung Jul 28, 2026
0d16cb1
use unstable features when updating dependencies
marcoieni Jul 28, 2026
7b8f260
Replace most `Ty::new_fn_def` calls with `type_of` queries directly
Jul 21, 2026
ec6c779
miri ui tests: don't run native tests on stage 0
RalfJung Jul 28, 2026
65b40f5
Switch cargo assignments to weihanglo
ehuss Jul 28, 2026
c340978
Update assignment for docs
ehuss Jul 28, 2026
0a1a25a
Rollup merge of #159990 - nnethercote:predicate-to-clause, r=oli-obk
JonathanBrouwer Jul 28, 2026
1da9319
Rollup merge of #159665 - addiesh:turbofish-fear-me, r=oli-obk
JonathanBrouwer Jul 28, 2026
7d73f93
Rollup merge of #159687 - camelid:rustdoc-max_level_info, r=Mark-Simu…
JonathanBrouwer Jul 28, 2026
3048347
Rollup merge of #160057 - clubby789:local-optimizations, r=RalfJung
JonathanBrouwer Jul 28, 2026
7f6e2de
Rollup merge of #160060 - glandium:issue159867, r=oli-obk
JonathanBrouwer Jul 28, 2026
cffcbce
Rollup merge of #160063 - xmakro:fix/parallel-dump-dep-graph-ice, r=p…
JonathanBrouwer Jul 28, 2026
aff2e65
Rollup merge of #160065 - xmakro:cleanup/dep-graph-index-space-len, r…
JonathanBrouwer Jul 28, 2026
bca8564
Rollup merge of #158038 - nbdd0121:register_tool, r=mejrs
JonathanBrouwer Jul 28, 2026
82b7eea
Rollup merge of #159776 - Syvraa:main, r=LawnGnome
JonathanBrouwer Jul 28, 2026
7183dd5
Rollup merge of #159978 - xonx4l:x86-intrinsic-test-default, r=Kobzol
JonathanBrouwer Jul 28, 2026
9e4d2e6
Rollup merge of #160008 - TaKO8Ki:fix-stale-closure-recovery, r=mati865
JonathanBrouwer Jul 28, 2026
1cb8d93
Rollup merge of #160027 - zakrad:regr-test-132767, r=chenyukang
JonathanBrouwer Jul 28, 2026
fe0ebee
Rollup merge of #160030 - GuillaumeGomez:update-browser-ui-test, r=Gu…
JonathanBrouwer Jul 28, 2026
54e4c45
Rollup merge of #160046 - nnethercote:attr-errors-2, r=estebank
JonathanBrouwer Jul 28, 2026
e5209b8
Rollup merge of #160056 - chenyukang:yukang-fix-159813-assoc-fn-turbo…
JonathanBrouwer Jul 28, 2026
6d0520c
Rollup merge of #160069 - renovate-bot:renovate/crate-tracing-subscri…
JonathanBrouwer Jul 28, 2026
bed06a3
Rollup merge of #160071 - RalfJung:sanitize_standard_fds, r=clarfonthey
JonathanBrouwer Jul 28, 2026
b563017
Rollup merge of #160076 - marcoieni:renovate-lockfile-update-fix, r=K…
JonathanBrouwer Jul 28, 2026
02a88ad
Rollup merge of #160092 - RalfJung:miri-native, r=oli-obk
JonathanBrouwer Jul 28, 2026
dfea7b5
Rollup merge of #160093 - ehuss:triagebot-cargo, r=weihanglo
JonathanBrouwer Jul 28, 2026
4247c21
Rollup merge of #160094 - ehuss:triagebot-lang-docs, r=traviscross
JonathanBrouwer Jul 28, 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
27 changes: 27 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@
// (still gated by dashboard approval for now)
":maintainLockFilesMonthly",
],
// Cargo manifests in this repository use unstable features.
"env": {
"RUSTC_BOOTSTRAP": "1"
},
// The compiler and rustbook workspaces have path dependencies in these
// submodules.
"cloneSubmodules": true,
"cloneSubmodulesFilter": [
"src/doc/book",
"src/doc/reference"
],
// Require manual approval from the Dependency Dashboard before opening PRs
"dependencyDashboardApproval": true,
// Renovate shouldn't update a PR if it is in the bors merge queue.
Expand All @@ -18,6 +29,22 @@
// No dashboard approval necessary for GitHub Actions updates
"matchManagers": ["github-actions"],
"dependencyDashboardApproval": false
},
{
// Only maintain the Cargo lockfiles managed by update-lockfile.sh.
"matchManagers": ["cargo"],
"matchUpdateTypes": ["lockFileMaintenance"],
"enabled": false
},
{
"matchManagers": ["cargo"],
"matchUpdateTypes": ["lockFileMaintenance"],
"matchFileNames": [
"Cargo.toml",
"library/Cargo.toml",
"src/tools/rustbook/Cargo.toml"
],
"enabled": true
}
],
// Don't manage dependencies inside subtrees. They are updated upstream and
Expand Down
22 changes: 11 additions & 11 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ version = "3.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand Down Expand Up @@ -1261,7 +1261,7 @@ dependencies = [
"libc",
"option-ext",
"redox_users",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand Down Expand Up @@ -1388,7 +1388,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand Down Expand Up @@ -2166,7 +2166,7 @@ dependencies = [
"portable-atomic",
"portable-atomic-util",
"serde_core",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand Down Expand Up @@ -2653,7 +2653,7 @@ version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand Down Expand Up @@ -5084,7 +5084,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand Down Expand Up @@ -5516,7 +5516,7 @@ dependencies = [
"getrandom 0.3.3",
"once_cell",
"rustix",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand All @@ -5535,7 +5535,7 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8c27177b12a6399ffc08b98f76f7c9a1f4fe9fc967c784c5a071fa8d93cf7e1"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand Down Expand Up @@ -5905,9 +5905,9 @@ dependencies = [

[[package]]
name = "tracing-subscriber"
version = "0.3.22"
version = "0.3.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e"
checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319"
dependencies = [
"matchers",
"nu-ansi-term",
Expand Down Expand Up @@ -6513,7 +6513,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]

[[package]]
Expand Down
4 changes: 4 additions & 0 deletions bootstrap.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,10 @@
# Set this to "discover" to automatically discover LLDB from the environment.
#build.lldb = "lldb"

# The path to (or name of) the Intel SDE executable, used to run the
# intrinsic-test suite for x86 target features the host CPU may not support.
#build.sde = "sde64"

# The node.js executable to use. Note that this is only used for the emscripten
# target when running tests, otherwise this can be omitted.
#build.nodejs = "node"
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 @@ -291,7 +291,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
attribute_parser: AttributeParser::new(
tcx.sess,
tcx.features(),
tcx.registered_tools(()),
tcx.registered_attr_tools(()),
ShouldEmit::ErrorsAndLints { recovery: Recovery::Allowed },
),
delayed_lints: Vec::new(),
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_passes/src/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ fn maybe_stage_features(sess: &Session, features: &Features, krate: &ast::Crate)
let mut errored = false;

if let Some(Attribute::Parsed(AttributeKind::Feature(feature_idents, first_span))) =
AttributeParser::parse_limited(sess, &krate.attrs, &[sym::feature])
AttributeParser::parse_limited_sym(sess, &krate.attrs, &[sym::feature])
{
// `feature(...)` used on non-nightly. This is definitely an error.
let mut err = diagnostics::FeatureOnNonNightly {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ impl AttributeParser for NakedParser {

let span = self.span?;

let Some(tools) = cx.tools else {
let Some(tools) = cx.attr_tools else {
unreachable!("tools required while parsing attributes");
};

Expand Down
109 changes: 74 additions & 35 deletions compiler/rustc_attr_parsing/src/attributes/crate_level.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
use rustc_data_structures::fx::FxIndexSet;
use rustc_feature::AttributeStability;
use rustc_hir::attrs::{CrateType, WindowsSubsystemKind};
use rustc_session::lint::builtin::UNKNOWN_CRATE_TYPES;
use rustc_span::Symbol;
use rustc_span::edit_distance::find_best_match_for_name_with_substrings;

use super::prelude::*;
use crate::diagnostics::{UnknownCrateTypes, UnknownCrateTypesSuggestion};
use crate::diagnostics::{ToolReserved, UnknownCrateTypes, UnknownCrateTypesSuggestion};

pub(crate) struct CrateNameParser;

Expand Down Expand Up @@ -317,49 +318,87 @@ impl CombineAttributeParser for FeatureParser {
}
}

pub(crate) struct RegisterToolParser;
#[derive(Default)]
pub(crate) struct RegisterToolParser {
attr_tools: FxIndexSet<Ident>,
lint_tools: FxIndexSet<Ident>,
}

impl CombineAttributeParser for RegisterToolParser {
const PATH: &[Symbol] = &[sym::register_tool];
type Item = Ident;
const CONVERT: ConvertFn<Self::Item> = |tools, _span| AttributeKind::RegisterTool(tools);
const ALLOWED_TARGETS: AllowedTargets<'_> = AllowedTargets::AllowList(&[Allow(Target::Crate)]);
const TEMPLATE: AttributeTemplate = template!(List: &["tool1, tool2, ..."]);
const STABILITY: AttributeStability = unstable!(register_tool);
fn parse_register_tool(
tools: &mut [&mut FxIndexSet<Ident>],
cx: &mut AcceptContext<'_, '_>,
args: &ArgParser,
) {
let Some(list) = cx.expect_list(args, cx.attr_span) else {
return;
};

if list.is_empty() {
let attr_span = cx.attr_span;
cx.adcx().warn_empty_attribute(attr_span);
}

fn extend(
cx: &mut AcceptContext<'_, '_>,
args: &ArgParser,
) -> impl IntoIterator<Item = Self::Item> {
let Some(list) = cx.expect_list(args, cx.attr_span) else {
return Vec::new();
for elem in list.mixed() {
let Some(elem) = elem.meta_item() else {
cx.adcx().expected_identifier(elem.span());
continue;
};
let Some(()) = cx.expect_no_args(elem.args()) else {
continue;
};

if list.is_empty() {
let attr_span = cx.attr_span;
cx.adcx().warn_empty_attribute(attr_span);
let path = elem.path();
let Some(ident) = path.word() else {
cx.adcx().expected_identifier(path.span());
continue;
};

if ident.name == sym::rustc {
cx.should_emit
.emit_err(cx.dcx().create_err(ToolReserved { span: ident.span, tool: ident }));
continue;
}

let mut res = Vec::new();
for tools in tools.iter_mut() {
tools.insert(ident);
}
}
}

for elem in list.mixed() {
let Some(elem) = elem.meta_item() else {
cx.adcx().expected_identifier(elem.span());
continue;
};
let Some(()) = cx.expect_no_args(elem.args()) else {
continue;
};
impl AttributeParser for RegisterToolParser {
const ATTRIBUTES: AcceptMapping<Self> = &[
(
&[sym::register_tool],
template!(List: &["tool1, tool2, ..."]),
unstable!(register_tool),
|this, cx, args| {
parse_register_tool(&mut [&mut this.attr_tools, &mut this.lint_tools], cx, args)
},
),
(
&[sym::register_attribute_tool],
template!(List: &["tool1, tool2, ..."]),
unstable!(register_tool),
|this, cx, args| parse_register_tool(&mut [&mut this.attr_tools], cx, args),
),
(
&[sym::register_lint_tool],
template!(List: &["tool1, tool2, ..."]),
unstable!(register_tool),
|this, cx, args| parse_register_tool(&mut [&mut this.lint_tools], cx, args),
),
];

let path = elem.path();
let Some(ident) = path.word() else {
cx.adcx().expected_identifier(path.span());
continue;
};
const ALLOWED_TARGETS: AllowedTargets<'_> = AllowedTargets::AllowList(&[Allow(Target::Crate)]);

res.push(ident);
fn finalize(self, _cx: &FinalizeContext<'_, '_>) -> Option<AttributeKind> {
if self.attr_tools.is_empty() && self.lint_tools.is_empty() {
None
} else {
Some(AttributeKind::RegisterTool {
attr_tools: self.attr_tools.into_iter().collect(),
lint_tools: self.lint_tools.into_iter().collect(),
})
}

res
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::attributes::diagnostic::*;
use crate::attributes::prelude::*;
#[derive(Default)]
pub(crate) struct OnConstParser {
span: Option<Span>,
path_span: Option<Span>,
directive: Option<(Span, Directive)>,
}

Expand All @@ -21,8 +21,8 @@ impl AttributeParser for OnConstParser {
return;
}

let span = cx.attr_span;
this.span = Some(span);
let path_span = cx.attr_path.span;
this.path_span = Some(path_span);

let mode = Mode::DiagnosticOnConst;

Expand All @@ -31,7 +31,7 @@ impl AttributeParser for OnConstParser {
let Some(directive) = parse_directive_items(cx, mode, items.mixed(), true) else {
return;
};
merge_directives(cx, &mut this.directive, (span, directive));
merge_directives(cx, &mut this.directive, (path_span, directive));
},
)];

Expand All @@ -44,8 +44,11 @@ impl AttributeParser for OnConstParser {
]);

fn finalize(self, _cx: &FinalizeContext<'_, '_>) -> Option<AttributeKind> {
if let Some(span) = self.span {
Some(AttributeKind::OnConst { span, directive: self.directive.map(|d| Box::new(d.1)) })
if let Some(path_span) = self.path_span {
Some(AttributeKind::OnConst {
span: path_span,
directive: self.directive.map(|d| Box::new(d.1)),
})
} else {
None
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ impl AttributeParser for ConstStabilityParser {
{
this.stability = Some((
PartialConstStability { level, feature, promotable: false },
cx.attr_span,
cx.attr_path.span,
));
}
},
Expand All @@ -225,7 +225,7 @@ impl AttributeParser for ConstStabilityParser {
{
this.stability = Some((
PartialConstStability { level, feature, promotable: false },
cx.attr_span,
cx.attr_path.span,
));
}
},
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ attribute_parsers!(
OnUnknownParser,
OnUnmatchedArgsParser,
OpaqueParser,
RegisterToolParser,
RustcAlignParser,
RustcAlignStaticParser,
RustcCguTestAttributeParser,
Expand All @@ -188,7 +189,6 @@ attribute_parsers!(
Combine<FeatureParser>,
Combine<ForceTargetFeatureParser>,
Combine<LinkParser>,
Combine<RegisterToolParser>,
Combine<ReprParser>,
Combine<RustcAllowConstFnUnstableParser>,
Combine<RustcCleanParser>,
Expand Down
Loading
Loading