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

Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
This commit is contained in:
Jonathan Brouwer
2025-07-11 17:02:24 +02:00
parent 855e0fe46e
commit 2f05fa6fff
6 changed files with 40 additions and 1 deletions

View File

@@ -718,6 +718,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,