diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-05-17 17:31:34 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-29 13:46:17 +1000 |
| commit | 99f6b6328e7b418abe2e3bcf49b4504c2866671e (patch) | |
| tree | 539b07299a2a534be63d29a13d4ab870040dbbeb /tests/ui/proc-macro | |
| parent | 5b1e4954a109725019e6bd24bb1e33b879079512 (diff) | |
| download | rust-99f6b6328e7b418abe2e3bcf49b4504c2866671e.tar.gz rust-99f6b6328e7b418abe2e3bcf49b4504c2866671e.zip | |
Improve pretty-printing of braces.
Most notably, the `FIXME` for suboptimal printing of `use` groups in `tests/ui/macros/stringify.rs` is fixed. And all other test output changes result in pretty printed output being closer to the original formatting in the source code.
Diffstat (limited to 'tests/ui/proc-macro')
| -rw-r--r-- | tests/ui/proc-macro/attr-complex-fn.stdout | 2 | ||||
| -rw-r--r-- | tests/ui/proc-macro/weird-braces.stdout | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/tests/ui/proc-macro/attr-complex-fn.stdout b/tests/ui/proc-macro/attr-complex-fn.stdout index 7c23d1ecae4..9bbb746bb4d 100644 --- a/tests/ui/proc-macro/attr-complex-fn.stdout +++ b/tests/ui/proc-macro/attr-complex-fn.stdout @@ -77,7 +77,7 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [ span: $DIR/attr-complex-fn.rs:19:42: 19:44 (#0), }, ] -PRINT-ATTR INPUT (DISPLAY): impl<T> MyTrait<T> for MyStruct<{ true }> { #![rustc_dummy] } +PRINT-ATTR INPUT (DISPLAY): impl<T> MyTrait<T> for MyStruct<{true}> { #![rustc_dummy] } PRINT-ATTR RE-COLLECTED (DISPLAY): impl < T > MyTrait < T > for MyStruct < { true } > { #![rustc_dummy] } PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): impl < T > MyTrait < T > for MyStruct < { true } > { #! [rustc_dummy] } PRINT-ATTR INPUT (DEBUG): TokenStream [ diff --git a/tests/ui/proc-macro/weird-braces.stdout b/tests/ui/proc-macro/weird-braces.stdout index 7da769ef0d2..0215deb05c3 100644 --- a/tests/ui/proc-macro/weird-braces.stdout +++ b/tests/ui/proc-macro/weird-braces.stdout @@ -5,7 +5,7 @@ PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [ span: $DIR/weird-braces.rs:16:25: 16:36 (#0), }, ] -PRINT-ATTR INPUT (DISPLAY): #[print_target_and_args(second_outer)] impl Bar<{ 1 > 0 }> for Foo<{ true }> +PRINT-ATTR INPUT (DISPLAY): #[print_target_and_args(second_outer)] impl Bar<{1 > 0}> for Foo<{true}> { #![print_target_and_args(first_inner)] #![print_target_and_args(second_inner)] @@ -191,7 +191,7 @@ PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [ span: $DIR/weird-braces.rs:17:25: 17:37 (#0), }, ] -PRINT-ATTR INPUT (DISPLAY): impl Bar<{ 1 > 0 }> for Foo<{ true }> +PRINT-ATTR INPUT (DISPLAY): impl Bar<{1 > 0}> for Foo<{true}> { #![print_target_and_args(first_inner)] #![print_target_and_args(second_inner)] @@ -350,8 +350,7 @@ PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [ span: $DIR/weird-braces.rs:19:30: 19:41 (#0), }, ] -PRINT-ATTR INPUT (DISPLAY): impl Bar<{ 1 > 0 }> for Foo<{ true }> -{ #![print_target_and_args(second_inner)] } +PRINT-ATTR INPUT (DISPLAY): impl Bar<{1 > 0}> for Foo<{true}> { #![print_target_and_args(second_inner)] } PRINT-ATTR RE-COLLECTED (DISPLAY): impl Bar < { 1 > 0 } > for Foo < { true } > { #![print_target_and_args(second_inner)] } PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): impl Bar < { 1 > 0 } > for Foo < { true } > @@ -470,7 +469,7 @@ PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [ span: $DIR/weird-braces.rs:20:30: 20:42 (#0), }, ] -PRINT-ATTR INPUT (DISPLAY): impl Bar<{ 1 > 0 }> for Foo<{ true }> {} +PRINT-ATTR INPUT (DISPLAY): impl Bar<{1 > 0}> for Foo<{true}> {} PRINT-ATTR RE-COLLECTED (DISPLAY): impl Bar < { 1 > 0 } > for Foo < { true } > {} PRINT-ATTR INPUT (DEBUG): TokenStream [ Ident { |
