rustc_on_unimplemented: introduce format specifiers#156161
Conversation
|
Some changes occurred in compiler/rustc_attr_parsing cc @jdonszelmann, @JonathanBrouwer The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes. Some changes occurred in compiler/rustc_hir/src/attrs |
|
rustbot has assigned @dingxiangfei2009. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
…ns for the annotated item.
|
r? compiler |
There was a problem hiding this comment.
@bors r+
since this seems to be a multi-step undertaking, please add a tracking issue and link to it from every PR that makes progress on it
|
@bors rollup |
…uwer Rollup of 9 pull requests Successful merges: - #156959 (stdarch subtree update) - #156541 (delegation: remove method call generation) - #156161 (rustc_on_unimplemented: introduce format specifiers) - #156752 (fix E0371 description) - #156761 (tidy: remove duplicate entry and alphabetize OS constants list) - #156872 (Drop skip_move_check_fns query.) - #156899 (fix breakpoint callback registration in `lldb_batchmode`) - #156927 (Reorganize `tests/ui/issues` [1/N]) - #156947 (Update mdbook to 0.5.3)
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, _> ```
...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.
will do: