Repository navigation
fixed indentation in AST pretty printed expanded dump of trait. - #1810
Conversation
|
@00AR this is the output I get when running your commit on the testcase in #1785: #[lang = "clone"]
trait Copy{
fn clone(&self) -> Self;
fn clone_from(& mut self, source: &Self)
}there's still one extra indentation level. I think the changes you need to make are within the Let me know if you'd like any tips or if anything in the code is unclear. |
|
It was strange at first because it gave correct output on my system. But I may have undid this second change(Sorry!) because the lines looks exactly the same without building gccrs freshly 😅
@CohenArthur Thanks! I will surely ask on Zulip :) |
|
@00AR here's a simpler testcase which should help you: trait Foo {
fn a();
fn b(&self);
}
impl Foo for i32 {
fn a() {}
fn b(&self) {}
}On master branch, the output is as follows: trait Foo{
fn a() ;
fn b(&self) ;
}
impl Foo for i32 {
fn a() {
}
fn b(&self) {
}
}with this PR: trait Foo{
fn a() ;
fn b(&self) ;
}
impl Foo for i32 {
fn a() {
}
fn b(&self) {
}
}so you fixed almost all of the issues :) thank you |
|
I am learning rust in parallel to make new relevant testcases for the future changes I will make. |
Nice :D Thanks for getting into this :)
Yes, moving forward all commits will need to conform to the GNU guidelines. We're putting together automation to make the process less painful. |
|
@00AR if you're done with this PR let me know and I'll post the Changelog content here for you to add to your commit. Then, we can merge this. |
|
@CohenArthur Thanks. I will ping you once I finish testing some other parts that I suspect may also need some correction. |
|
@CohenArthur You can merge this PR when you get time. |
|
Great stuff @00AR thank you! The one thing remaining for you is to add a Changelog to your commit according to the following structure: Also, feel free to ping me on Zulip and ask your questions :) |
|
The Changelog needs to sit above the |
f66ee53 to
8c4ab3d
Compare
…geLog: * ast/rust-ast-dump.cc (Dump::visit): removed extra indentations in trait ast dump Signed-off-by: Abdul Rafey <abdulrafeyq@gmail.com>
|
bors r+ |

fixes #1785
Signed-off-by: Abdul Rafey abdulrafeyq@gmail.com
In Dump::visit (TraitImpl), the for loop adds indentation before calling visit () on every iteration. I think when Dump::visit (Method) is executed it adds extra indentation on top of it.