diff options
| author | David Tolnay <dtolnay@gmail.com> | 2021-12-05 12:35:09 -0800 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2021-12-08 14:35:20 -0800 |
| commit | f0f7b8d44abde324082a91e47f08112f4c0adae8 (patch) | |
| tree | 28092853f64da98a77257eb95c7ed5bb8a02b840 /src/test/pretty | |
| parent | e6b883c74f49f32cb5d1cbad3457f2b8805a4a38 (diff) | |
Pretty print break and continue without redundant space
Diffstat (limited to 'src/test/pretty')
| -rw-r--r-- | src/test/pretty/ast-stmt-expr-attr.rs | 4 | ||||
| -rw-r--r-- | src/test/pretty/hir-pretty-loop.pp | 2 | ||||
| -rw-r--r-- | src/test/pretty/stmt_expr_attributes.rs | 5 |
3 files changed, 5 insertions, 6 deletions
diff --git a/src/test/pretty/ast-stmt-expr-attr.rs b/src/test/pretty/ast-stmt-expr-attr.rs index c80bce2d140..e32f5ca24ea 100644 --- a/src/test/pretty/ast-stmt-expr-attr.rs +++ b/src/test/pretty/ast-stmt-expr-attr.rs @@ -110,8 +110,8 @@ fn syntax() { let _ = #[attr] &mut 0; let _ = #[attr] &#[attr] 0; let _ = #[attr] &mut #[attr] 0; - let _ = #[attr] break ; - let _ = #[attr] continue ; + let _ = #[attr] break; + let _ = #[attr] continue; let _ = #[attr] return; let _ = #[attr] foo!(); let _ = #[attr] foo!(#! [attr]); diff --git a/src/test/pretty/hir-pretty-loop.pp b/src/test/pretty/hir-pretty-loop.pp index 19b3a1775cf..9b10fd86c47 100644 --- a/src/test/pretty/hir-pretty-loop.pp +++ b/src/test/pretty/hir-pretty-loop.pp @@ -6,4 +6,4 @@ extern crate std; // pretty-mode:hir // pp-exact:hir-pretty-loop.pp -pub fn foo() { loop { break ; } } +pub fn foo() { loop { break; } } diff --git a/src/test/pretty/stmt_expr_attributes.rs b/src/test/pretty/stmt_expr_attributes.rs index 12204c8cd30..01533cd8107 100644 --- a/src/test/pretty/stmt_expr_attributes.rs +++ b/src/test/pretty/stmt_expr_attributes.rs @@ -229,9 +229,8 @@ fn _11() { let _ = #[rustc_dummy] &mut 0; let _ = #[rustc_dummy] &#[rustc_dummy] 0; let _ = #[rustc_dummy] &mut #[rustc_dummy] 0; - // FIXME: pp bug, extra space after keyword? - while false { let _ = #[rustc_dummy] continue ; } - while true { let _ = #[rustc_dummy] break ; } + while false { let _ = #[rustc_dummy] continue; } + while true { let _ = #[rustc_dummy] break; } || #[rustc_dummy] return; let _ = #[rustc_dummy] expr_mac!(); let _ = #[rustc_dummy] expr_mac![]; |
