diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-04-17 07:34:07 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-17 07:34:07 +0100 |
commit | c9ca6a14349604089536cb1f591c7a78fd55c209 (patch) | |
tree | d8f6d2d1c2d2aac12f333a7f9955a708d49bd28d /crates/mbe/src | |
parent | df5b6f7d459a367b191d5d540c7363d9e526eadf (diff) | |
parent | c4173bb468500f6490921e8f8627d87b2aeb7af5 (diff) |
Merge #8550
8550: Handle extended key value attributes in mbe r=edwin0cheng a=edwin0cheng
fixes #8544
bors r+
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/mbe/src')
-rw-r--r-- | crates/mbe/src/tests/expand.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/mbe/src/tests/expand.rs b/crates/mbe/src/tests/expand.rs index e02d038b6..146b236e2 100644 --- a/crates/mbe/src/tests/expand.rs +++ b/crates/mbe/src/tests/expand.rs | |||
@@ -941,6 +941,24 @@ fn test_meta_doc_comments() { | |||
941 | } | 941 | } |
942 | 942 | ||
943 | #[test] | 943 | #[test] |
944 | fn test_meta_extended_key_value_attributes() { | ||
945 | parse_macro( | ||
946 | r#" | ||
947 | macro_rules! foo { | ||
948 | (#[$i:meta]) => ( | ||
949 | #[$ i] | ||
950 | fn bar() {} | ||
951 | ) | ||
952 | } | ||
953 | "#, | ||
954 | ) | ||
955 | .assert_expand_items( | ||
956 | r#"foo! { #[doc = concat!("The `", "bla", "` lang item.")] }"#, | ||
957 | r#"# [doc = concat ! ("The `" , "bla" , "` lang item.")] fn bar () {}"#, | ||
958 | ); | ||
959 | } | ||
960 | |||
961 | #[test] | ||
944 | fn test_meta_doc_comments_non_latin() { | 962 | fn test_meta_doc_comments_non_latin() { |
945 | parse_macro( | 963 | parse_macro( |
946 | r#" | 964 | r#" |