Stream: rustdoc

Topic: Dump Clean


view this post on Zulip Nixon Enraght-Moony (Jan 17 2021 at 15:42):

Is their a way to get the clean::Crate for debuging purposes, akin to -Z unpretty=hir-tree. If not, would you accept a PR to add it

view this post on Zulip Joshua Nelson (Jan 17 2021 at 15:49):

@Nixon Enraght-Moony that sounds like a lot of work to maintain :/ this is basically the equivalent of rustc_hir_pretty, right?

view this post on Zulip Nixon Enraght-Moony (Jan 17 2021 at 16:01):

rustc_hir_pretty can do a load of things, like printing back the code with identifiers. All I realy want is to use the Debug impls, which doesn't seem so bad

view this post on Zulip Joshua Nelson (Jan 17 2021 at 16:02):

if you use Debug that will be several thousand lines of info :sweat_smile:

view this post on Zulip Joshua Nelson (Jan 17 2021 at 16:02):

let's put it this way: if you come up with something nice I don't mind, but I think it will be hard to do

view this post on Zulip Joshua Nelson (Jan 17 2021 at 16:04):

If you want something in the short term you can use trace!(?krate) or something, I don't mind that

view this post on Zulip Nixon Enraght-Moony (Jan 17 2021 at 16:37):

With #![no_core] its only 109 lines for a unit struct, and 197 for the JSON Ice.

But without that, its 200k

view this post on Zulip Joshua Nelson (Jan 17 2021 at 16:38):

yeah, that's about what I expected

view this post on Zulip Joshua Nelson (Jan 17 2021 at 16:39):

and most of it isn't useful either, there's a lot of noise

view this post on Zulip Nixon Enraght-Moony (Jan 17 2021 at 17:11):

I've got a usefull output by messing with the Debug impls, but it's probably not worth upstreaming.

view this post on Zulip Joshua Nelson (Jan 17 2021 at 17:12):

I would definitely be interested in better Debug output :)


Last updated: Oct 11 2021 at 22:34 UTC