]> git.lizzy.rs Git - rust.git/blob - src/test/ui/json-bom-plus-crlf.rs
Rollup merge of #97317 - GuillaumeGomez:gui-settings-text-click, r=jsha
[rust.git] / src / test / ui / json-bom-plus-crlf.rs
1 // (This line has BOM so it's ignored by compiletest for directives)\r
2 //\r
3 // compile-flags: --json=diagnostic-short --error-format=json\r
4 // ignore-tidy-cr\r
5 \r
6 // For easier verifying, the byte offsets in this file should match those\r
7 // in the json_bom_plus_crlf_multifile_aux.rs - given the actual fn is\r
8 // identical (just with a different, but equally sized name), the easiest way\r
9 // to do this is to ensure the two files are of equal size on disk.\r
10 \r
11 // N.B., this file needs CRLF line endings. The .gitattributes file in\r
12 // this directory should enforce it.\r
13 \r
14 fn main() {\r
15 \r
16     let s : String = 1;  // Error in the middle of line.\r
17 \r
18     let s : String = 1\r
19     ;  // Error before the newline.\r
20 \r
21     let s : String =\r
22 1;  // Error after the newline.\r
23 \r
24     let s : String = (\r
25     );  // Error spanning the newline.\r
26 }\r