rust/compiler/rustc_ast_lowering/src
bors 255aa22082 Auto merge of #140748 - m-ou-se:super-format-args3, r=jdonszelmann
Allow storing `format_args!()` in variable

Fixes https://github.com/rust-lang/rust/issues/92698

Tracking issue for super let: https://github.com/rust-lang/rust/issues/139076

Tracking issue for format_args: https://github.com/rust-lang/rust/issues/99012

This change allows:

```rust
let name = "world";
let f = format_args!("hello {name}!"); // New: Store format_args!() for later!

println!("{f}");
```

This will need an FCP.

This implementation makes use of `super let`, which is unstable and might not exist in the future in its current form. However, it is entirely reasonable to assume future Rust will always have _a_ way of expressing temporary lifetimes like this, since the (stable) `pin!()` macro needs this too. (This was also the motivation for merging https://github.com/rust-lang/rust/pull/139114.)

(This is a second version of https://github.com/rust-lang/rust/pull/139135)
2025-06-19 19:13:32 +00:00
..
asm.rs Stabilize asm_goto 2025-03-17 11:12:10 +00:00
block.rs Implement super let. 2025-04-04 09:44:19 +02:00
delegation.rs Add visit_id to ast Visitor 2025-06-01 02:38:24 +00:00
errors.rs Reject union default field values 2025-06-17 07:27:58 +08:00
expr.rs Allow storing format_args!() in let. 2025-06-18 10:20:20 +02:00
format.rs Use expr_ref. 2025-06-19 14:08:20 +02:00
index.rs Reorder fields in hir::ItemKind variants. 2025-05-30 02:23:20 +10:00
item.rs Reject union default field values 2025-06-17 07:27:58 +08:00
lib.rs Auto merge of #140748 - m-ou-se:super-format-args3, r=jdonszelmann 2025-06-19 19:13:32 +00:00
pat.rs Auto merge of #140453 - Zoxc:next-disambiguator, r=oli-obk 2025-05-05 11:50:43 +00:00
path.rs Overhaul UsePath. 2025-06-03 08:23:21 +10:00
stability.rs add extern "custom" functions 2025-06-12 20:27:10 +02:00