Files
rust/compiler/rustc_span
Jonathan Brouwer 903a08c0b0 Rollup merge of #156161 - mejrs:this_formatargs, r=oli-obk
rustc_on_unimplemented: introduce format specifiers

...as printing options for the annotated item.

See also the test and dev guide prose. This only affects rustc_on_unimplemented, not (yet) the other diagnostic attributes. I plan to do that in some later PR.

```rust
#![feature(rustc_attrs)]

#[rustc_on_unimplemented(
    message = "normal: {This}, path: {This:path},  resolved: {This:resolved}"
)]
pub trait Trait<'lifetime, const CONST_GENERIC: usize, A, B> where A: Send {}
```
will do:
```
normal: Trait, path: Trait<'lifetime, CONST_GENERIC, A, B>,  resolved: Trait<'_, 6, u8, _>
```
2026-05-26 13:42:16 +02:00
..