Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPretty printer inlines modules #12590
Comments
huonw
added
A-pretty
labels
Feb 27, 2014
This comment has been minimized.
This comment has been minimized.
|
Triage: the output here has gotten weirder:
I'm guessing the blank line comes from dropping the comment when |
This comment has been minimized.
This comment has been minimized.
|
Triage: it is now un-weird, and back to the original way it was reported in the ticket. |
This comment has been minimized.
This comment has been minimized.
|
I personally thought that |
This comment has been minimized.
This comment has been minimized.
|
But the original report is about |
This comment has been minimized.
This comment has been minimized.
|
Oh. Yeah, that's true. I'm not even really sure what the intended purpose of |
Mark-Simulacrum
added
C-bug
and removed
I-wrong
labels
Jul 20, 2017
tinco
added a commit
to tinco/rust
that referenced
this issue
Jul 12, 2018
This comment has been minimized.
This comment has been minimized.
|
I made a PR that fixes this behavior, turned out the parser simply forgot where module items come from, so it didn't know how to not expand modules, the fix was to track this information in the Ast. |
chris-morgan commentedFeb 27, 2014
a.rs:b.rs:Expected output of
rustc --pretty normal a.rs:Actual output of
rustc --pretty normal a.rs:Note the two problems here: (a) the module is inlined, and (b) the comment in the module is lost. But by fixing the first, the second becomes irrelevant.