diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-06-30 12:53:00 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-06-30 12:53:00 +1000 |
| commit | 25a6fd3213ae54c83d27741b38a7e7dad7c686f0 (patch) | |
| tree | 002b2384d87056c57d93162ebd5c298a92f26960 /tests/ui/stats | |
| parent | ed2d759783dc9de134bbb3f01085b1e6dbf539f3 (diff) | |
| download | rust-25a6fd3213ae54c83d27741b38a7e7dad7c686f0.tar.gz rust-25a6fd3213ae54c83d27741b38a7e7dad7c686f0.zip | |
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.)
Diffstat (limited to 'tests/ui/stats')
| -rw-r--r-- | tests/ui/stats/macro-stats.rs | 9 | ||||
| -rw-r--r-- | tests/ui/stats/macro-stats.stderr | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/tests/ui/stats/macro-stats.rs b/tests/ui/stats/macro-stats.rs index ee265d682fd..d986904ddd6 100644 --- a/tests/ui/stats/macro-stats.rs +++ b/tests/ui/stats/macro-stats.rs @@ -49,12 +49,17 @@ fn opt(x: Option<u32>) { } } -macro_rules! this_is_a_really_really_long_macro_name { +macro_rules! long_name_that_fits_on_a_single_line { + () => {} +} +long_name_that_fits_on_a_single_line!(); + +macro_rules! long_name_that_doesnt_fit_on_one_line { ($t:ty) => { fn f(_: $t) {} } } -this_is_a_really_really_long_macro_name!(u32!()); // AstFragmentKind::{Items,Ty} +long_name_that_doesnt_fit_on_one_line!(u32!()); // AstFragmentKind::{Items,Ty} macro_rules! trait_tys { () => { diff --git a/tests/ui/stats/macro-stats.stderr b/tests/ui/stats/macro-stats.stderr index 00c6b55c6a2..c8336443ca7 100644 --- a/tests/ui/stats/macro-stats.stderr +++ b/tests/ui/stats/macro-stats.stderr @@ -15,12 +15,14 @@ macro-stats #[derive(Copy)] 1 2 2.0 macro-stats p! 1 3 3.0 32 32.0 macro-stats trait_impl_tys! 1 2 2.0 28 28.0 macro-stats foreign_item! 1 1 1.0 21 21.0 -macro-stats this_is_a_really_really_long_macro_name! +macro-stats long_name_that_doesnt_fit_on_one_line! macro-stats 1 1 1.0 18 18.0 macro-stats impl_const! 1 1 1.0 17 17.0 macro-stats trait_tys! 1 2 2.0 15 15.0 macro-stats n99! 2 2 1.0 4 2.0 macro-stats none! 1 1 1.0 4 4.0 macro-stats u32! 1 1 1.0 3 3.0 +macro-stats long_name_that_fits_on_a_single_line! +macro-stats 1 1 1.0 0 0.0 macro-stats #[test] 1 1 1.0 0 0.0 macro-stats =================================================================================== |
