Skip to content

Commit 09a504b

Browse files
committed
Test expressions in key-value attributes
1 parent 46b28e0 commit 09a504b

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

corpus/declarations.txt

+35
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,41 @@ mod macos_only {
996996
(identifier)
997997
value: (string_literal))))))))
998998

999+
================================================================================
1000+
Key-Value Attribute Expressions
1001+
================================================================================
1002+
1003+
#[doc = include_str!("foo-doc.md")]
1004+
fn foo() {}
1005+
1006+
#[namespace = foo::bar]
1007+
fn baz() {}
1008+
1009+
--------------------------------------------------------------------------------
1010+
1011+
(source_file
1012+
(attribute_item
1013+
(meta_item
1014+
(identifier)
1015+
(macro_invocation
1016+
(identifier)
1017+
(token_tree
1018+
(string_literal)))))
1019+
(function_item
1020+
(identifier)
1021+
(parameters)
1022+
(block))
1023+
(attribute_item
1024+
(attr_item
1025+
(identifier)
1026+
(scoped_identifier
1027+
(identifier)
1028+
(identifier))))
1029+
(function_item
1030+
(identifier)
1031+
(parameters)
1032+
(block)))
1033+
9991034
================================================================================
10001035
Attribute macros
10011036
================================================================================

0 commit comments

Comments
 (0)