about summary refs log tree commit diff
path: root/tests/ui/patchable-function-entry/patchable-function-entry-attribute.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-06-19 19:13:32 +0000
committerbors <bors@rust-lang.org>2025-06-19 19:13:32 +0000
commit73273f2571e2e0e8f31146aec3ef044614e61c64 (patch)
treee927525e7e21efd092f6aa64cb3576144fd4be97 /tests/ui/patchable-function-entry/patchable-function-entry-attribute.rs
parent62a36e611f10f7843543b9128a2750b251d17b05 (diff)
parenta01dd1edaf8d2774360d21a0c9a16bbfbb56fbb2 (diff)
downloadrust-73273f2571e2e0e8f31146aec3ef044614e61c64.tar.gz
rust-73273f2571e2e0e8f31146aec3ef044614e61c64.zip
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)
Diffstat (limited to 'tests/ui/patchable-function-entry/patchable-function-entry-attribute.rs')
0 files changed, 0 insertions, 0 deletions