Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
011d95b
Neon fast path for str::contains
JamieCunliffe Jan 27, 2026
d05eb78
std: move `exit` out of PAL
joboet Feb 15, 2026
b0050c2
move `must_use` lint to a separate file
WaffleLapkin Feb 23, 2026
c6ae0a9
make `is_ty_must_use` public
WaffleLapkin Feb 23, 2026
696a105
`must_use`: internal doc improvements
WaffleLapkin Feb 23, 2026
b2cc4d5
`must_use`: make the check for trivial types cleaner
WaffleLapkin Feb 23, 2026
ae1e2c6
`must_use`: drive-by-cleanup
WaffleLapkin Feb 23, 2026
1b97e9b
add a flag to `is_ty_must_use` to simplify `Result<T, Uninhabited>` a…
WaffleLapkin Feb 23, 2026
a67baaa
Update books
rustbot Feb 23, 2026
94787c8
on_unimplemented: split structs and implementations
mejrs Jan 22, 2026
fa31d0b
port over diagnostic::on_unimplemented
mejrs Feb 2, 2026
668e758
Due to attr parsing port, we do not attempt to recover from invalid s…
mejrs Feb 8, 2026
ff54293
Port rustc_on_unimplemented attribute
mejrs Feb 14, 2026
20e6446
Port diagnostic::on_const
mejrs Feb 16, 2026
670fc8c
Delete unused code
mejrs Feb 16, 2026
c02e251
Dele e0231
mejrs Feb 16, 2026
8153a5f
Move diagnostic formatting logic to rustc_hir
mejrs Feb 16, 2026
2a55caa
Warn on duplicate parent label
mejrs Feb 17, 2026
b44ec0e
Still finalize a on_const attribute if it is malformed
mejrs Feb 17, 2026
5ba5bce
Fix impossible doc link
mejrs Feb 17, 2026
fb971c4
Move do_not_recommend to diagnostic folder
mejrs Feb 17, 2026
f0f46d2
Split derive attribute
mejrs Feb 17, 2026
03713d0
Remove redundant import
mejrs Feb 17, 2026
0e10ce2
Explain early return in parser
mejrs Feb 17, 2026
f3662f4
use raw string literal
mejrs Feb 17, 2026
a9c068c
address feedback
mejrs Feb 19, 2026
8ac769f
Remove `rustc_feedable_queries` and `define_feedable` macros.
nnethercote Feb 23, 2026
98ab94b
Use proper find_attr syntax
mejrs Feb 23, 2026
bf0f511
Clarify how "ensure" queries check whether they can skip execution
Zalathar Feb 24, 2026
16fbd29
Streamline `QueryVTableUnerased` into `GetQueryVTable`
Zalathar Feb 23, 2026
f8b5f9c
Port `#[register_tool]` to the new attribute parsers
JonathanBrouwer Feb 22, 2026
07bf6ae
Use the new parser throughout the compiler
JonathanBrouwer Feb 22, 2026
6118347
Rollup merge of #152176 - JamieCunliffe:neon-str-contains, r=Mark-Sim…
JonathanBrouwer Feb 24, 2026
c005396
Rollup merge of #152657 - joboet:move_pal_exit, r=jhpratt
JonathanBrouwer Feb 24, 2026
3e9d577
Rollup merge of #152841 - Zalathar:unerased, r=nnethercote
JonathanBrouwer Feb 24, 2026
dc056a4
Rollup merge of #153009 - nnethercote:rm-define_feedable, r=oli-obk
JonathanBrouwer Feb 24, 2026
36d38a6
Rollup merge of #151558 - mejrs:port_on_unimplemented, r=jdonszelmann…
JonathanBrouwer Feb 24, 2026
055ae14
Rollup merge of #152988 - JonathanBrouwer:register-tool, r=jdonszelmann
JonathanBrouwer Feb 24, 2026
9a752b8
Rollup merge of #153018 - WaffleLapkin:must_use_improvements, r=jdons…
JonathanBrouwer Feb 24, 2026
6d09787
Rollup merge of #153023 - rustbot:docs-update, r=ehuss
JonathanBrouwer Feb 24, 2026
3382fdd
Rollup merge of #153033 - Zalathar:ensure, r=nnethercote
JonathanBrouwer Feb 24, 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
2 changes: 1 addition & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3548,6 +3548,7 @@ dependencies = [
"rustc_lexer",
"rustc_macros",
"rustc_parse",
"rustc_parse_format",
"rustc_session",
"rustc_span",
"rustc_target",
Expand Down Expand Up @@ -4682,7 +4683,6 @@ dependencies = [
"rustc_macros",
"rustc_middle",
"rustc_next_trait_solver",
"rustc_parse_format",
"rustc_session",
"rustc_span",
"rustc_transmute",
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_attr_parsing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ rustc_hir = { path = "../rustc_hir" }
rustc_lexer = { path = "../rustc_lexer" }
rustc_macros = { path = "../rustc_macros" }
rustc_parse = { path = "../rustc_parse" }
rustc_parse_format = { path = "../rustc_parse_format" }
rustc_session = { path = "../rustc_session" }
rustc_span = { path = "../rustc_span" }
rustc_target = { path = "../rustc_target" }
Expand Down
47 changes: 47 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/crate_level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,3 +347,50 @@ impl<S: Stage> CombineAttributeParser<S> for FeatureParser {
res
}
}

pub(crate) struct RegisterToolParser;

impl<S: Stage> CombineAttributeParser<S> for RegisterToolParser {
const PATH: &[Symbol] = &[sym::register_tool];
type Item = Ident;
const CONVERT: ConvertFn<Self::Item> = AttributeKind::RegisterTool;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(ALL_TARGETS);
const TEMPLATE: AttributeTemplate = template!(List: &["tool1, tool2, ..."]);

fn extend(
cx: &mut AcceptContext<'_, '_, S>,
args: &ArgParser,
) -> impl IntoIterator<Item = Self::Item> {
let ArgParser::List(list) = args else {
cx.expected_list(cx.attr_span, args);
return Vec::new();
};

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

let mut res = Vec::new();

for elem in list.mixed() {
let Some(elem) = elem.meta_item() else {
cx.expected_identifier(elem.span());
continue;
};
if let Err(arg_span) = elem.args().no_args() {
cx.expected_no_args(arg_span);
continue;
}

let path = elem.path();
let Some(ident) = path.word() else {
cx.expected_identifier(path.span());
continue;
};

res.push(ident);
}

res
}
}
Loading
Loading