Rollup merge of #143796 - JonathanBrouwer:fix-builtin-attribute-prefix, r=jdonszelmann

Fix ICE for parsed attributes with longer path not handled by CheckAttribute

Fixes https://github.com/rust-lang/rust/issues/137590
Fixes https://github.com/rust-lang/rust/issues/143789

r? ```@jdonszelmann```
This commit is contained in:
León Orell Valerian Liehr
2025-07-13 07:21:21 +02:00
committed by GitHub
6 changed files with 40 additions and 1 deletions

View File

@@ -735,6 +735,11 @@ impl<'sess, S: Stage> AttributeParser<'sess, S> {
attributes
}
/// Returns whether there is a parser for an attribute with this name
pub fn is_parsed_attribute(path: &[Symbol]) -> bool {
Late::parsers().0.contains_key(path)
}
fn lower_attr_args(&self, args: &ast::AttrArgs, lower_span: impl Fn(Span) -> Span) -> AttrArgs {
match args {
ast::AttrArgs::Empty => AttrArgs::Empty,