diff options
Diffstat (limited to 'src/tools/cargo/crates/rustfix/tests/everything/replace-only-one-char.json')
-rw-r--r-- | src/tools/cargo/crates/rustfix/tests/everything/replace-only-one-char.json | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/src/tools/cargo/crates/rustfix/tests/everything/replace-only-one-char.json b/src/tools/cargo/crates/rustfix/tests/everything/replace-only-one-char.json new file mode 100644 index 000000000..9a70c0880 --- /dev/null +++ b/src/tools/cargo/crates/rustfix/tests/everything/replace-only-one-char.json @@ -0,0 +1,70 @@ +{ + "message": "unused variable: `x`", + "code": { + "code": "unused_variables", + "explanation": null + }, + "level": "warning", + "spans": [ + { + "file_name": "replace-only-one-char.rs", + "byte_start": 20, + "byte_end": 21, + "line_start": 2, + "line_end": 2, + "column_start": 9, + "column_end": 10, + "is_primary": true, + "text": [ + { + "text": " let x = 42;", + "highlight_start": 9, + "highlight_end": 10 + } + ], + "label": null, + "suggested_replacement": null, + "expansion": null + } + ], + "children": [ + { + "message": "#[warn(unused_variables)] on by default", + "code": null, + "level": "note", + "spans": [], + "children": [], + "rendered": null + }, + { + "message": "consider using `_x` instead", + "code": null, + "level": "help", + "spans": [ + { + "file_name": "replace-only-one-char.rs", + "byte_start": 20, + "byte_end": 21, + "line_start": 2, + "line_end": 2, + "column_start": 9, + "column_end": 10, + "is_primary": true, + "text": [ + { + "text": " let x = 42;", + "highlight_start": 9, + "highlight_end": 10 + } + ], + "label": null, + "suggested_replacement": "_x", + "expansion": null + } + ], + "children": [], + "rendered": null + } + ], + "rendered": "warning: unused variable: `x`\n --> replace-only-one-char.rs:2:9\n |\n2 | let x = 42;\n | ^ help: consider using `_x` instead\n |\n = note: #[warn(unused_variables)] on by default\n\n" +} |