Skip to content

rust-lang/rust#140748 will require us to adjust our format_args! lowering #19929

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

Open
Veykril opened this issue Jun 5, 2025 · 4 comments
Open
Labels
Broken Window Bugs / technical debt to be addressed immediately C-bug Category: bug

Comments

@Veykril
Copy link
Member

Veykril commented Jun 5, 2025

rust-lang/rust#140748
It removes the UnsafeArg token from the constructor, we need to mimic that and gate on the toolchain version

@Veykril Veykril added C-bug Category: bug Broken Window Bugs / technical debt to be addressed immediately labels Jun 5, 2025
@Veykril Veykril changed the title https://github.com/rust-lang/rust/pull/140748 will require us to adjust our format_args! lowering rust-lang/rust#140748 will require us to adjust our format_args! lowering Jun 5, 2025
@ChayimFriedman2
Copy link
Contributor

Thinking about it, why do we even need to mimic rustc with lowering of format_args! exactly? As long as we make sure we have all the formatting traits and expressions it should be fine, after all we don't actually format anything.

@Veykril
Copy link
Member Author

Veykril commented Jun 6, 2025

We do make use of the formatting output for mir building / eval. We try to render the debug impl for things on hover for example (though its mostly broken due to us failing in various places in std at the moment.

@ShoyuVanilla
Copy link
Member

ShoyuVanilla commented Jun 7, 2025

The mentioned PR generates super let args = ... while expanding format_args!
Do we need super let to properly handle temporal lifetimes for mir building, as we don't have it yet?

@Veykril
Copy link
Member Author

Veykril commented Jun 7, 2025

We might? The main immediate problem here is that we just need to fix up the lowering to prevent us from generating diagnostics for our desugared code (as that will cause log spamming again). More of our mir eval is semi broken right now anyways due to lack of support for a bunch of things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Broken Window Bugs / technical debt to be addressed immediately C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants