diff options
| author | Takayuki Maeda <takoyaki0316@gmail.com> | 2023-12-04 21:19:43 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-04 21:19:43 +0900 |
| commit | da30882eb3f33813656e3079a144a2a5a1f5cee2 (patch) | |
| tree | dee6af1df78718f2cc39969f8abb2a0013a3ebac /compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp | |
| parent | cf8d81213c193fc0ca9f2b99165476f8ae028295 (diff) | |
| parent | 1a1cd6e6db4b147f854f93122315b3c0e14d3e82 (diff) | |
| download | rust-da30882eb3f33813656e3079a144a2a5a1f5cee2.tar.gz rust-da30882eb3f33813656e3079a144a2a5a1f5cee2.zip | |
Rollup merge of #118495 - weiznich:more_tests_for_on_unimplemented, r=compiler-errors
Restrict what symbols can be used in `#[diagnostic::on_unimplemented]` format strings
This commit restricts what symbols can be used in a format string for any option of the `diagnostic::on_unimplemented` attribute. We previously allowed all the ad-hoc options supported by the internal `#[rustc_on_unimplemented]` attribute. For the stable attribute we only want to support generic parameter names and `{Self}` as parameters. For any other parameter an warning is emitted and the parameter is replaced by the literal parameter string, so for example `{integer}` turns into `{integer}`. This follows the general design of attributes in the `#[diagnostic]` attribute namespace, that any syntax "error" is treated as warning and subsequently ignored.
r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
