summaryrefslogtreecommitdiffstats
path: root/src/tools/cargo/crates/rustfix/tests/edge-cases/indented_whitespace.json
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/cargo/crates/rustfix/tests/edge-cases/indented_whitespace.json')
-rw-r--r--src/tools/cargo/crates/rustfix/tests/edge-cases/indented_whitespace.json60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/tools/cargo/crates/rustfix/tests/edge-cases/indented_whitespace.json b/src/tools/cargo/crates/rustfix/tests/edge-cases/indented_whitespace.json
new file mode 100644
index 000000000..b25189aaf
--- /dev/null
+++ b/src/tools/cargo/crates/rustfix/tests/edge-cases/indented_whitespace.json
@@ -0,0 +1,60 @@
+{
+ "message": "non-ASCII whitespace symbol '\\u{a0}' is not skipped",
+ "code": null,
+ "level": "warning",
+ "spans":
+ [
+ {
+ "file_name": "lib.rs",
+ "byte_start": 26,
+ "byte_end": 28,
+ "line_start": 2,
+ "line_end": 2,
+ "column_start": 1,
+ "column_end": 2,
+ "is_primary": false,
+ "text":
+ [
+ {
+ "text": " indented\";",
+ "highlight_start": 1,
+ "highlight_end": 2
+ }
+ ],
+ "label": "non-ASCII whitespace symbol '\\u{a0}' is not skipped",
+ "suggested_replacement": null,
+ "suggestion_applicability": null,
+ "expansion": null
+ },
+ {
+ "file_name": "lib.rs",
+ "byte_start": 24,
+ "byte_end": 28,
+ "line_start": 1,
+ "line_end": 2,
+ "column_start": 25,
+ "column_end": 2,
+ "is_primary": true,
+ "text":
+ [
+ {
+ "text": "pub static FOO: &str = \"\\",
+ "highlight_start": 25,
+ "highlight_end": 26
+ },
+ {
+ "text": " indented\";",
+ "highlight_start": 1,
+ "highlight_end": 2
+ }
+ ],
+ "label": null,
+ "suggested_replacement": null,
+ "suggestion_applicability": null,
+ "expansion": null
+ }
+ ],
+ "children":
+ [],
+ "rendered": "warning: non-ASCII whitespace symbol '\\u{a0}' is not skipped\n --> lib.rs:1:25\n |\n1 | pub static FOO: &str = \"\\\n | _________________________^\n2 | |  indented\";\n | | ^ non-ASCII whitespace symbol '\\u{a0}' is not skipped\n | |_|\n | \n\n"
+}