Update tests for #2438 and #2476

This commit is contained in:
topecongiro 2018-02-23 08:10:17 +09:00
parent f09480432d
commit 093633ecb7
2 changed files with 61 additions and 7 deletions

View File

@ -1,3 +1,5 @@
// rustfmt-error_on_line_overflow: false
macro_rules! m {
// a
($expr :expr, $( $func : ident ) * ) => {
@ -50,12 +52,37 @@ macro m2 {
}
}
// #2438
// #2438, #2476
macro_rules! m {
() => {
this_line_is_99_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
); // this line is drifting
fn foo() {
this_line_is_98_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
);
}
}
}
macro_rules! m {
() => {
fn foo() {
this_line_is_99_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
);
}
};
}
macro_rules! m {
() => {
fn foo() {
this_line_is_100_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
);
}
};
}
macro_rules! m {
() => {
fn foo() {
this_line_is_101_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
);
}
};
}

View File

@ -1,3 +1,5 @@
// rustfmt-error_on_line_overflow: false
macro_rules! m {
// a
($expr: expr, $($func: ident)*) => {{
@ -42,11 +44,36 @@ macro m2 {
}
}
// #2438
// #2438, #2476
macro_rules! m {
() => {
this_line_is_99_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
); // this line is drifting
fn foo() {
this_line_is_98_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx();
}
};
}
macro_rules! m {
() => {
fn foo() {
this_line_is_99_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
);
}
};
}
macro_rules! m {
() => {
fn foo() {
this_line_is_100_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
);
}
};
}
macro_rules! m {
() => {
fn foo() {
this_line_is_101_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
);
}
};
}