diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-02-02 23:06:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-02 23:06:55 +0100 |
| commit | 5ab356fde8f9e607f009f2e30774ae90582b3bb3 (patch) | |
| tree | 1eeb46fe163f13e093d4115965c0864399edf60e /compiler/rustc_interface/src/errors.rs | |
| parent | 4d3a4ee9e8b0c24b2c865fba162402d8c3c6a3ef (diff) | |
| parent | 43b729db2f248e3cd6daa113813c5bd2ef43e84f (diff) | |
| download | rust-5ab356fde8f9e607f009f2e30774ae90582b3bb3.tar.gz rust-5ab356fde8f9e607f009f2e30774ae90582b3bb3.zip | |
Rollup merge of #136403 - fmease:fix-a-ui-test, r=oli-obk
Fix malformed error annotations in a UI test
The compiletest DSL still features a historical remnant from the time when its directives were merely prefixed with `//` instead of `//`@`` when unknown directive names weren't rejected since they could just as well be part of prose:
As an "optimization", it stops looking for directives once it stumbles upon a line which starts with either `fn` or `mod`. This allowed a malformed error annotation of the form `//`@[…]~^^^`` to go undetected & unexercised (as it's placed below `fn main() {`).
Obviously a character other than ``@`` would've mangled the error annotation, too (but it might've caught the reviewer's eye). I specifically found this file because I ran `rg '^(fn|mod)[\s\S]*?//`@'` tests/ui --multiline -trust` to check how footgun-y that "special feature" of compiletest is.
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
