Skip to content

Commit 25a6fd3

Browse files
committed
Augment the macro-stats test.
With a long macro name that could fit on one line, but currently isn't formatted that way, because the name would overlap with the maximum width of the "Uses" column. (The next commit will fix this.)
1 parent ed2d759 commit 25a6fd3

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

tests/ui/stats/macro-stats.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,17 @@ fn opt(x: Option<u32>) {
4949
}
5050
}
5151

52-
macro_rules! this_is_a_really_really_long_macro_name {
52+
macro_rules! long_name_that_fits_on_a_single_line {
53+
() => {}
54+
}
55+
long_name_that_fits_on_a_single_line!();
56+
57+
macro_rules! long_name_that_doesnt_fit_on_one_line {
5358
($t:ty) => {
5459
fn f(_: $t) {}
5560
}
5661
}
57-
this_is_a_really_really_long_macro_name!(u32!()); // AstFragmentKind::{Items,Ty}
62+
long_name_that_doesnt_fit_on_one_line!(u32!()); // AstFragmentKind::{Items,Ty}
5863

5964
macro_rules! trait_tys {
6065
() => {

tests/ui/stats/macro-stats.stderr

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ macro-stats #[derive(Copy)] 1 2 2.0
1515
macro-stats p! 1 3 3.0 32 32.0
1616
macro-stats trait_impl_tys! 1 2 2.0 28 28.0
1717
macro-stats foreign_item! 1 1 1.0 21 21.0
18-
macro-stats this_is_a_really_really_long_macro_name!
18+
macro-stats long_name_that_doesnt_fit_on_one_line!
1919
macro-stats 1 1 1.0 18 18.0
2020
macro-stats impl_const! 1 1 1.0 17 17.0
2121
macro-stats trait_tys! 1 2 2.0 15 15.0
2222
macro-stats n99! 2 2 1.0 4 2.0
2323
macro-stats none! 1 1 1.0 4 4.0
2424
macro-stats u32! 1 1 1.0 3 3.0
25+
macro-stats long_name_that_fits_on_a_single_line!
26+
macro-stats 1 1 1.0 0 0.0
2527
macro-stats #[test] 1 1 1.0 0 0.0
2628
macro-stats ===================================================================================

0 commit comments

Comments
 (0)