about summary refs log tree commit diff
path: root/tests/ui/diagnostic-width/flag-json.rs
blob: edc7d2e2a4255429405ee2a0a45fac414424ccd6 (plain)
1
2
3
4
5
6
7
8
9
10
//@ 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
}