diff options
| author | Georg Semmler <github@weiznich.de> | 2023-12-01 07:26:05 +0100 |
|---|---|---|
| committer | Georg Semmler <github@weiznich.de> | 2023-12-04 10:00:33 +0100 |
| commit | 1a1cd6e6db4b147f854f93122315b3c0e14d3e82 (patch) | |
| tree | f939af191f4d8b1fddf4a783c99552b73cb59cec /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 74fccd0b50485d70680156c66229cf0949d08d2c (diff) | |
| download | rust-1a1cd6e6db4b147f854f93122315b3c0e14d3e82.tar.gz rust-1a1cd6e6db4b147f854f93122315b3c0e14d3e82.zip | |
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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
