aboutsummaryrefslogtreecommitdiff
path: root/crates/mbe/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-04-17 07:34:07 +0100
committerGitHub <[email protected]>2021-04-17 07:34:07 +0100
commitc9ca6a14349604089536cb1f591c7a78fd55c209 (patch)
treed8f6d2d1c2d2aac12f333a7f9955a708d49bd28d /crates/mbe/src
parentdf5b6f7d459a367b191d5d540c7363d9e526eadf (diff)
parentc4173bb468500f6490921e8f8627d87b2aeb7af5 (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.rs18
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]
944fn test_meta_extended_key_value_attributes() {
945 parse_macro(
946 r#"
947macro_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]
944fn test_meta_doc_comments_non_latin() { 962fn test_meta_doc_comments_non_latin() {
945 parse_macro( 963 parse_macro(
946 r#" 964 r#"