diff options
| author | Rajveer <rajveer.developer@icloud.com> | 2023-12-21 15:14:43 +0530 |
|---|---|---|
| committer | Rajveer <rajveer.developer@icloud.com> | 2023-12-21 16:45:29 +0530 |
| commit | af44e719fa16832425c0764ac9c54ad82a617d3a (patch) | |
| tree | 8b88d6149b8844ef853fe11a7d8f4b9f47b5f238 /tests/ui/diagnostic-width | |
| parent | be69926a7314200f367e6e9b21e44a2ad3b11ba7 (diff) | |
| download | rust-af44e719fa16832425c0764ac9c54ad82a617d3a.tar.gz rust-af44e719fa16832425c0764ac9c54ad82a617d3a.zip | |
Switch from using `//~ERROR` annotations with `--error-format` to `error-pattern`
Resolves Issue #118752
Diffstat (limited to 'tests/ui/diagnostic-width')
| -rw-r--r-- | tests/ui/diagnostic-width/flag-json.rs | 2 | ||||
| -rw-r--r-- | tests/ui/diagnostic-width/flag-json.stderr | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/diagnostic-width/flag-json.rs b/tests/ui/diagnostic-width/flag-json.rs index 51a1fb447c7..820f1a049e1 100644 --- a/tests/ui/diagnostic-width/flag-json.rs +++ b/tests/ui/diagnostic-width/flag-json.rs @@ -1,9 +1,9 @@ // compile-flags: --diagnostic-width=20 --error-format=json +// error-pattern:expected `()`, found integer // 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 arguments to this function are incorrect } diff --git a/tests/ui/diagnostic-width/flag-json.stderr b/tests/ui/diagnostic-width/flag-json.stderr index f3bf4f97942..0a4b54ebc85 100644 --- a/tests/ui/diagnostic-width/flag-json.stderr +++ b/tests/ui/diagnostic-width/flag-json.stderr @@ -24,8 +24,8 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/flag-json.rs","byte_start":243,"byte_end":245,"line_start":7,"line_end":7,"column_start":17,"column_end":19,"is_primary":true,"text":[{"text":" let _: () = 42;","highlight_start":17,"highlight_end":19}],"label":"expected `()`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/flag-json.rs","byte_start":238,"byte_end":240,"line_start":7,"line_end":7,"column_start":12,"column_end":14,"is_primary":false,"text":[{"text":" let _: () = 42;","highlight_start":12,"highlight_end":14}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0308]: mismatched types - --> $DIR/flag-json.rs:7:17 +"},"level":"error","spans":[{"file_name":"$DIR/flag-json.rs","byte_start":289,"byte_end":291,"line_start":8,"line_end":8,"column_start":17,"column_end":19,"is_primary":true,"text":[{"text":" let _: () = 42;","highlight_start":17,"highlight_end":19}],"label":"expected `()`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/flag-json.rs","byte_start":284,"byte_end":286,"line_start":8,"line_end":8,"column_start":12,"column_end":14,"is_primary":false,"text":[{"text":" let _: () = 42;","highlight_start":12,"highlight_end":14}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0308]: mismatched types + --> $DIR/flag-json.rs:8:17 | LL | ..._: () = 42; | -- ^^ expected `()`, found integer |
