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

Print the full func name (and path) in the debug MIR #572

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kkysen
Copy link
Contributor

@kkysen kkysen commented Aug 2, 2022

Print the full func name (and path) in the debug MIR.

The function name itself is not enough for readability. We can elide well-known items, such as things in the std prelude, but that's not what wasn't done, and I'm not sure how difficult it is to do that.

This reverts part of the changes in 7e31053, which I had missed (7e31053#r935146145).

That change changed things like this:

std::vec::Vec::<*mut i8>::push(move _29, move _30);

to this:

push(move _29, move _30);

which is IMO a lot less readable.

What we want is

Vec::<*mut i8>::push(move _29, move _30);

since Vec is in the std prelude.

Since I'm not sure how easy it is to do that prelude elision (I know rustc recently added this), this reverts those changes.

The function name itself is not enough for readability.
We can elide well-known items, such as things in the `std` prelude,
but that's not what wasn't done, and I'm not sure how difficult it is to do that.
@kkysen kkysen requested a review from aneksteind August 2, 2022 06:10
@kkysen
Copy link
Contributor Author

kkysen commented Aug 22, 2022

I think a good alternative would be something like

Vec::push(move _29, move _30);

which is still fairly concise but a lot more easily readable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant