@@ -1770,7 +1770,8 @@ mod test {
1770
1770
// suggests that this can only occur in the presence of local-expand, which
1771
1771
// we have no plans to support. ... unless it's needed for item hygiene....
1772
1772
#[ ignore]
1773
- #[ test] fn issue_8062 ( ) {
1773
+ #[ test]
1774
+ fn issue_8062 ( ) {
1774
1775
run_renaming_test (
1775
1776
& ( "fn main() {let hrcoo = 19; macro_rules! getx(()=>(hrcoo)); getx!();}" ,
1776
1777
vec ! ( vec!( 0 ) ) , true ) , 0 )
@@ -1781,7 +1782,8 @@ mod test {
1781
1782
// (just g) along the other, so the result of the whole thing should
1782
1783
// be "let z_123 = 3; z_123"
1783
1784
#[ ignore]
1784
- #[ test] fn issue_6994 ( ) {
1785
+ #[ test]
1786
+ fn issue_6994 ( ) {
1785
1787
run_renaming_test (
1786
1788
& ( "macro_rules! g (($x:ident) =>
1787
1789
({macro_rules! f(($y:ident)=>({let $y=3;$x}));f!($x)}));
@@ -1792,7 +1794,8 @@ mod test {
1792
1794
1793
1795
// match variable hygiene. Should expand into
1794
1796
// fn z() {match 8 {x_1 => {match 9 {x_2 | x_2 if x_2 == x_1 => x_2 + x_1}}}}
1795
- #[ test] fn issue_9384 ( ) {
1797
+ #[ test]
1798
+ fn issue_9384 ( ) {
1796
1799
run_renaming_test (
1797
1800
& ( "macro_rules! bad_macro (($ex:expr) => ({match 9 {x | x if x == $ex => x + $ex}}));
1798
1801
fn z() {match 8 {x => bad_macro!(x)}}" ,
@@ -1805,7 +1808,8 @@ mod test {
1805
1808
// interpolated nodes weren't getting labeled.
1806
1809
// should expand into
1807
1810
// fn main(){let g1_1 = 13; g1_1}}
1808
- #[ test] fn pat_expand_issue_15221 ( ) {
1811
+ #[ test]
1812
+ fn pat_expand_issue_15221 ( ) {
1809
1813
run_renaming_test (
1810
1814
& ( "macro_rules! inner ( ($e:pat ) => ($e));
1811
1815
macro_rules! outer ( ($e:pat ) => (inner!($e)));
@@ -1821,7 +1825,8 @@ mod test {
1821
1825
1822
1826
// method arg hygiene
1823
1827
// method expands to fn get_x(&self_0, x_1: i32) {self_0 + self_2 + x_3 + x_1}
1824
- #[ test] fn method_arg_hygiene ( ) {
1828
+ #[ test]
1829
+ fn method_arg_hygiene ( ) {
1825
1830
run_renaming_test (
1826
1831
& ( "macro_rules! inject_x (()=>(x));
1827
1832
macro_rules! inject_self (()=>(self));
@@ -1834,7 +1839,8 @@ mod test {
1834
1839
1835
1840
// ooh, got another bite?
1836
1841
// expands to struct A; impl A {fn thingy(&self_1) {self_1;}}
1837
- #[ test] fn method_arg_hygiene_2 ( ) {
1842
+ #[ test]
1843
+ fn method_arg_hygiene_2 ( ) {
1838
1844
run_renaming_test (
1839
1845
& ( "struct A;
1840
1846
macro_rules! add_method (($T:ty) =>
@@ -1847,7 +1853,8 @@ mod test {
1847
1853
1848
1854
// item fn hygiene
1849
1855
// expands to fn q(x_1: i32){fn g(x_2: i32){x_2 + x_1};}
1850
- #[ test] fn issue_9383 ( ) {
1856
+ #[ test]
1857
+ fn issue_9383 ( ) {
1851
1858
run_renaming_test (
1852
1859
& ( "macro_rules! bad_macro (($ex:expr) => (fn g(x: i32){ x + $ex }));
1853
1860
fn q(x: i32) { bad_macro!(x); }" ,
@@ -1857,7 +1864,8 @@ mod test {
1857
1864
1858
1865
// closure arg hygiene (ExprClosure)
1859
1866
// expands to fn f(){(|x_1 : i32| {(x_2 + x_1)})(3);}
1860
- #[ test] fn closure_arg_hygiene ( ) {
1867
+ #[ test]
1868
+ fn closure_arg_hygiene ( ) {
1861
1869
run_renaming_test (
1862
1870
& ( "macro_rules! inject_x (()=>(x));
1863
1871
fn f(){(|x : i32| {(inject_x!() + x)})(3);}" ,
@@ -1867,7 +1875,8 @@ mod test {
1867
1875
}
1868
1876
1869
1877
// macro_rules in method position. Sadly, unimplemented.
1870
- #[ test] fn macro_in_method_posn ( ) {
1878
+ #[ test]
1879
+ fn macro_in_method_posn ( ) {
1871
1880
expand_crate_str (
1872
1881
"macro_rules! my_method (() => (fn thirteen(&self) -> i32 {13}));
1873
1882
struct A;
@@ -1877,7 +1886,8 @@ mod test {
1877
1886
1878
1887
// another nested macro
1879
1888
// expands to impl Entries {fn size_hint(&self_1) {self_1;}
1880
- #[ test] fn item_macro_workaround ( ) {
1889
+ #[ test]
1890
+ fn item_macro_workaround ( ) {
1881
1891
run_renaming_test (
1882
1892
& ( "macro_rules! item { ($i:item) => {$i}}
1883
1893
struct Entries;
@@ -1961,7 +1971,8 @@ mod test {
1961
1971
}
1962
1972
}
1963
1973
1964
- #[ test] fn fmt_in_macro_used_inside_module_macro ( ) {
1974
+ #[ test]
1975
+ fn fmt_in_macro_used_inside_module_macro ( ) {
1965
1976
let crate_str = "macro_rules! fmt_wrap(($b:expr)=>($b.to_string()));
1966
1977
macro_rules! foo_module (() => (mod generated { fn a() { let xx = 147; fmt_wrap!(xx);}}));
1967
1978
foo_module!();
0 commit comments