diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-03-25 15:50:31 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-03-25 16:48:03 +1100 |
| commit | 867da30cc71017597d9ed731b03a45c79accd873 (patch) | |
| tree | c8675db30281e7955c3bc369c26c7ac1c6b2f2b6 /compiler/rustc_codegen_llvm/src | |
| parent | e576d8850de702f6c712eaca77f758f72ef13419 (diff) | |
| download | rust-867da30cc71017597d9ed731b03a45c79accd873.tar.gz rust-867da30cc71017597d9ed731b03a45c79accd873.zip | |
Avoid `kw::Empty` when dealing with `rustc_allowed_through_unstable_modules`.
The existing code produces `Some(kw::Empty)` for these invalid forms: - a non-name-value, e.g. `#[rustc_allowed_through_unstable_modules]` - a non-string arg, e.g. `#[rustc_allowed_through_unstable_modules = 3]` The new code avoids the `kw::Empty` and is a little shorter. It will produce `None` in those cases, which means E0789 won't be produced if the `stable` attribute is missing for these invalid forms. This doesn't matter, because these invalid forms will trigger an "malformed `rustc_allowed_through_unstable_modules` attribute" anyway.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
