Files
rust/tests/ui/diagnostic-width/flag-json.rs
Vadim Petrochenkov 56d6b4e427 compiletest: Support matching on non-json lines in compiler output
and migrate most of remaining `error-pattern`s to it.
2025-05-04 18:27:45 +03:00

11 lines
387 B
Rust

//@ compile-flags: --diagnostic-width=20 --error-format=json
// This test checks that `-Z output-width` effects the JSON error output by restricting it to an
// arbitrarily low value so that the effect is visible.
fn main() {
let _: () = 42; //~ ERROR mismatched types
//~| NOTE expected `()`, found integer
//~| NOTE expected due to this
}