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

ty::print::pretty's p! macro should support string literals. #70948

Closed
eddyb opened this issue Apr 9, 2020 · 4 comments · Fixed by #77190
Closed

ty::print::pretty's p! macro should support string literals. #70948

eddyb opened this issue Apr 9, 2020 · 4 comments · Fixed by #77190
Assignees
Labels
A-pretty Area: Pretty printing (including `-Z unpretty`) C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@eddyb
Copy link
Member

eddyb commented Apr 9, 2020

E.g. printing ty::Slice(ty) uses:

p!(write("["), print(ty), write("]"))

but we could allow writing it like this, by letting the macro use $...:literal:

p!("[", print(ty), "]")

But I'm not sure the macro can handle it easily.

Maybe we should just have Print implemented for more types and just make p!(a, b, c) print a, b and c (and we can then rename it to print!).

This issue has been assigned to @jakevossen5 via this comment.

@eddyb eddyb added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 9, 2020
@jonas-schievink jonas-schievink added the A-pretty Area: Pretty printing (including `-Z unpretty`) label Apr 9, 2020
@jakevossen5
Copy link
Contributor

@rustbot claim

@rustbot rustbot self-assigned this Apr 11, 2020
@Alexendoo
Copy link
Member

Hi @jakevossen5, are you still working on this issue?

@jakevossen5
Copy link
Contributor

So sorry for the lack of communication on this. I am, have gotten a bit busy this summer but have some stuff wrapping up and hope to get it done soon. If this is blocking or causing problems, then someone else can take it but if not I would still like to work on this.

@Alexendoo
Copy link
Member

No problem @jakevossen5, it's not blocking anything I'm just checking claimed issues to see if people are still interested in working on them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-pretty Area: Pretty printing (including `-Z unpretty`) C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants