Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some more cleanups to syntax::print #62532

Merged
merged 30 commits into from
Jul 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
9b0ebfa
Move literal_to_string to fmt::Display
Mark-Simulacrum Jun 26, 2019
0f10d11
Remove duplicate attr_to_string
Mark-Simulacrum Jul 5, 2019
a440337
Remove unused arm_to_string
Mark-Simulacrum Jul 5, 2019
11d5216
Move lifetime_to_string to Display impl
Mark-Simulacrum Jul 5, 2019
ae5ed9b
Don't re-collect tokenstream twice to pretty print
Mark-Simulacrum Jul 5, 2019
4483980
Privatize and remove unused functions
Mark-Simulacrum Jul 5, 2019
a573d14
Remove unused boxes vector
Mark-Simulacrum Jul 5, 2019
59b161c
Stop Option-wrapping comments
Mark-Simulacrum Jul 5, 2019
9b5e397
Inline State::new
Mark-Simulacrum Jul 5, 2019
0eb2e56
Combine comment-handling logic into struct
Mark-Simulacrum Jul 5, 2019
7e37914
Replace src: &mut dyn Read with String
Mark-Simulacrum Jul 5, 2019
e0db2e6
print_crate returns String instead of taking an out pointer
Mark-Simulacrum Jul 5, 2019
e0ffa7c
Inline State::new_from_input in pprust
Mark-Simulacrum Jul 5, 2019
00ca508
Move pp::Printer out field to owned String
Mark-Simulacrum Jul 5, 2019
4c58fc3
Fully privatize (vs. crate visibility) functions
Mark-Simulacrum Jul 6, 2019
ccf279d
Remove useless call to indent
Mark-Simulacrum Jul 6, 2019
cd2d832
Move BufEntry assignment into scan_push
Mark-Simulacrum Jul 6, 2019
55a6a76
Simplify check_stack implementation
Mark-Simulacrum Jul 7, 2019
57cf7a2
Simplify print_end
Mark-Simulacrum Jul 7, 2019
4783d9e
Remove is_begin/is_end functions from PrintState
Mark-Simulacrum Jul 7, 2019
5879146
Rename pretty_print_* to scan_* to follow naming in the paper
Mark-Simulacrum Jul 8, 2019
04b80a5
Drop length from Token::String
Mark-Simulacrum Jul 5, 2019
39aa9bf
Remove needless indirection in bclose
Mark-Simulacrum Jul 9, 2019
e91dbc5
Rename is_bol -> is_beginning_of_line
Mark-Simulacrum Jul 9, 2019
cab4532
Move pp::Printer helpers to direct impl
Mark-Simulacrum Jul 9, 2019
daf1b29
Properly case indent_unit constant
Mark-Simulacrum Jul 9, 2019
63fdf1a
Remove needless indent arguments
Mark-Simulacrum Jul 9, 2019
73c1752
Use constant instead of magic number
Mark-Simulacrum Jul 9, 2019
096cb41
Remove writer function from PrintState
Mark-Simulacrum Jul 9, 2019
56a9237
File is now short enough for tidy
Mark-Simulacrum Jul 9, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/librustc/hir/map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1212,10 +1212,8 @@ impl<'a> print::State<'a> {
Node::Pat(a) => self.print_pat(&a),
Node::Arm(a) => self.print_arm(&a),
Node::Block(a) => {
use syntax::print::pprust::PrintState;

// containing cbox, will be closed by print-block at }
self.cbox(print::indent_unit);
self.cbox(print::INDENT_UNIT);
// head-ibox, will be closed by print-block after {
self.ibox(0);
self.print_block(&a)
Expand Down
Loading