Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/mbe/src/tests/expand.rs')
-rw-r--r--crates/mbe/src/tests/expand.rs113
1 files changed, 0 insertions, 113 deletions
diff --git a/crates/mbe/src/tests/expand.rs b/crates/mbe/src/tests/expand.rs
index 393c2041d9..01b5533522 100644
--- a/crates/mbe/src/tests/expand.rs
+++ b/crates/mbe/src/tests/expand.rs
@@ -102,119 +102,6 @@ fn test_attr_to_token_tree() {
}
#[test]
-fn test_macro_2_0_panic_2015() {
- parse_macro2(
- r#"
-macro panic_2015 {
- () => (
- ),
- (bar) => (
- ),
-}
-"#,
- )
- .assert_expand_items("panic_2015!(bar);", "");
-}
-
-#[test]
-fn test_path() {
- parse_macro(
- r#"
- macro_rules! foo {
- ($ i:path) => {
- fn foo() { let a = $ i; }
- }
- }
-"#,
- )
- .assert_expand_items("foo! { foo }", "fn foo () {let a = foo ;}")
- .assert_expand_items(
- "foo! { bar::<u8>::baz::<u8> }",
- "fn foo () {let a = bar ::< u8 >:: baz ::< u8 > ;}",
- );
-}
-
-#[test]
-fn test_two_paths() {
- parse_macro(
- r#"
- macro_rules! foo {
- ($ i:path, $ j:path) => {
- fn foo() { let a = $ i; let b = $j; }
- }
- }
-"#,
- )
- .assert_expand_items("foo! { foo, bar }", "fn foo () {let a = foo ; let b = bar ;}");
-}
-
-#[test]
-fn test_path_with_path() {
- parse_macro(
- r#"
- macro_rules! foo {
- ($ i:path) => {
- fn foo() { let a = $ i :: bar; }
- }
- }
-"#,
- )
- .assert_expand_items("foo! { foo }", "fn foo () {let a = foo :: bar ;}");
-}
-
-#[test]
-fn test_expr() {
- parse_macro(
- r#"
- macro_rules! foo {
- ($ i:expr) => {
- fn bar() { $ i; }
- }
- }
-"#,
- )
- .assert_expand_items(
- "foo! { 2 + 2 * baz(3).quux() }",
- "fn bar () {2 + 2 * baz (3) . quux () ;}",
- );
-}
-
-#[test]
-fn test_last_expr() {
- parse_macro(
- r#"
- macro_rules! vec {
- ($($item:expr),*) => {
- {
- let mut v = Vec::new();
- $(
- v.push($item);
- )*
- v
- }
- };
- }
-"#,
- )
- .assert_expand_items(
- "vec!(1,2,3);",
- "{let mut v = Vec :: new () ; v . push (1) ; v . push (2) ; v . push (3) ; v}",
- );
-}
-
-#[test]
-fn test_expr_with_attr() {
- parse_macro(
- r#"
-macro_rules! m {
- ($a:expr) => {0}
-}
-"#,
- )
- .assert_expand_items("m!(#[allow(a)]())", "0");
-}
-
-#[test]
fn test_ty() {
parse_macro(
r#"