Emit an error for --cfg=)
Fixes #73026 See also: #64467, #89468 The issue stems from a `FatalError` being silently raised in `panictry_buffer`. Normally this is not a problem, because `panictry_buffer` emits the causes of the error, but they are not themselves fatal, so they get filtered out by the silent emitter. To fix this, we use a parser entrypoint which doesn't use `panictry_buffer`, and we handle the error ourselves.
This commit is contained in:
parent
8ed935e92d
commit
193342eb8d
3 changed files with 24 additions and 19 deletions
3
src/test/ui/conditional-compilation/cfg-arg-invalid-8.rs
Normal file
3
src/test/ui/conditional-compilation/cfg-arg-invalid-8.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
// compile-flags: --cfg )
|
||||
// error-pattern: invalid `--cfg` argument: `)` (expected `key` or `key="value"`)
|
||||
fn main() {}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
error: invalid `--cfg` argument: `)` (expected `key` or `key="value"`)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue