2017-02-07 21:17:03 +00:00
|
|
|
Execute(The Rust handler should handle rustc output):
|
2017-07-07 16:03:17 +00:00
|
|
|
call ale#test#SetFilename('src/playpen.rs')
|
|
|
|
|
2017-02-07 21:17:03 +00:00
|
|
|
AssertEqual
|
|
|
|
\ [
|
2017-04-24 20:11:27 +00:00
|
|
|
\ {
|
|
|
|
\ 'lnum': 15,
|
2017-05-31 12:17:04 +00:00
|
|
|
\ 'end_lnum': 15,
|
2017-04-24 20:11:27 +00:00
|
|
|
\ 'type': 'E',
|
2018-01-28 23:35:46 +00:00
|
|
|
\ 'col': 5,
|
2019-03-02 15:17:17 +00:00
|
|
|
\ 'end_col': 7,
|
2017-04-24 20:11:27 +00:00
|
|
|
\ 'text': 'expected one of `.`, `;`, `?`, `}`, or an operator, found `for`',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 13,
|
2017-05-31 12:17:04 +00:00
|
|
|
\ 'end_lnum': 13,
|
2017-04-24 20:11:27 +00:00
|
|
|
\ 'type': 'E',
|
2018-01-28 23:35:46 +00:00
|
|
|
\ 'col': 7,
|
2019-03-02 15:17:17 +00:00
|
|
|
\ 'end_col': 9,
|
2017-04-24 20:11:27 +00:00
|
|
|
\ 'text': 'no method named `wat` found for type `std::string::String` in the current scope',
|
|
|
|
\ },
|
2017-02-07 21:17:03 +00:00
|
|
|
\ ],
|
2017-09-09 23:05:04 +00:00
|
|
|
\ ale#handlers#rust#HandleRustErrors(bufnr(''), [
|
2017-02-07 21:17:03 +00:00
|
|
|
\ '',
|
|
|
|
\ 'ignore this',
|
2017-09-09 23:05:04 +00:00
|
|
|
\ json_encode({
|
|
|
|
\ 'message': 'expected one of `.`, `;`, `?`, `}`, or an operator, found `for`',
|
|
|
|
\ 'code': v:null,
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'spans': [
|
|
|
|
\ {
|
|
|
|
\ 'file_name': '<anon>',
|
|
|
|
\ 'byte_start': 418,
|
|
|
|
\ 'byte_end': 421,
|
|
|
|
\ 'line_start': 15,
|
|
|
|
\ 'line_end': 15,
|
|
|
|
\ 'column_start': 5,
|
|
|
|
\ 'column_end': 8,
|
|
|
|
\ 'is_primary': v:true,
|
|
|
|
\ 'label': v:null,
|
|
|
|
\ },
|
|
|
|
\ ],
|
|
|
|
\ }),
|
|
|
|
\ json_encode({
|
|
|
|
\ 'message': 'main function not found',
|
|
|
|
\ 'code': v:null,
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'spans': [],
|
|
|
|
\ }),
|
|
|
|
\ json_encode({
|
|
|
|
\ 'code': v:null,
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'no method named `wat` found for type `std::string::String` in the current scope',
|
|
|
|
\ 'spans': [
|
|
|
|
\ {
|
|
|
|
\ 'byte_end': 410,
|
|
|
|
\ 'byte_start': 407,
|
|
|
|
\ 'column_end': 10,
|
|
|
|
\ 'column_start': 7,
|
|
|
|
\ 'file_name': '<anon>',
|
|
|
|
\ 'is_primary': v:true,
|
|
|
|
\ 'label': v:null,
|
|
|
|
\ 'line_end': 13,
|
|
|
|
\ 'line_start': 13,
|
|
|
|
\ }
|
|
|
|
\ ]
|
|
|
|
\ }),
|
|
|
|
\ json_encode({
|
|
|
|
\ 'code': v:null,
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'aborting due to previous error',
|
|
|
|
\ 'spans': [
|
|
|
|
\ ]
|
|
|
|
\ }),
|
2017-02-07 21:17:03 +00:00
|
|
|
\ ])
|
|
|
|
|
|
|
|
Execute(The Rust handler should handle cargo output):
|
2017-07-07 16:03:17 +00:00
|
|
|
call ale#test#SetFilename('src/playpen.rs')
|
|
|
|
|
2017-02-07 21:17:03 +00:00
|
|
|
AssertEqual
|
|
|
|
\ [
|
2017-04-24 20:11:27 +00:00
|
|
|
\ {
|
|
|
|
\ 'lnum': 15,
|
2017-05-31 12:17:04 +00:00
|
|
|
\ 'end_lnum': 15,
|
2017-04-24 20:11:27 +00:00
|
|
|
\ 'type': 'E',
|
2018-01-28 23:35:46 +00:00
|
|
|
\ 'col': 5,
|
2019-03-02 15:17:17 +00:00
|
|
|
\ 'end_col': 7,
|
2017-04-24 20:11:27 +00:00
|
|
|
\ 'text': 'expected one of `.`, `;`, `?`, `}`, or an operator, found `for`',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 13,
|
2017-05-31 12:17:04 +00:00
|
|
|
\ 'end_lnum': 13,
|
2017-04-24 20:11:27 +00:00
|
|
|
\ 'type': 'E',
|
2018-01-28 23:35:46 +00:00
|
|
|
\ 'col': 7,
|
2019-03-02 15:17:17 +00:00
|
|
|
\ 'end_col': 9,
|
2017-04-24 20:11:27 +00:00
|
|
|
\ 'text': 'no method named `wat` found for type `std::string::String` in the current scope',
|
|
|
|
\ },
|
2017-02-07 21:17:03 +00:00
|
|
|
\ ],
|
2017-09-09 23:05:04 +00:00
|
|
|
\ ale#handlers#rust#HandleRustErrors(bufnr(''), [
|
2017-02-07 21:17:03 +00:00
|
|
|
\ '',
|
|
|
|
\ 'ignore this',
|
2017-09-09 23:05:04 +00:00
|
|
|
\ json_encode({
|
|
|
|
\ 'message': {
|
|
|
|
\ 'code': v:null,
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'expected one of `.`, `;`, `?`, `}`, or an operator, found `for`',
|
|
|
|
\ 'spans': [
|
|
|
|
\ {
|
|
|
|
\ 'byte_end': 11508,
|
|
|
|
\ 'byte_start': 11505,
|
|
|
|
\ 'column_end': 8,
|
|
|
|
\ 'column_start': 5,
|
2017-12-19 18:23:09 +00:00
|
|
|
\ 'file_name': ale#path#Simplify('src/playpen.rs'),
|
2017-09-09 23:05:04 +00:00
|
|
|
\ 'is_primary': v:true,
|
|
|
|
\ 'label': v:null,
|
|
|
|
\ 'line_end': 15,
|
|
|
|
\ 'line_start': 15,
|
|
|
|
\ }
|
|
|
|
\ ]
|
|
|
|
\ },
|
|
|
|
\ }),
|
|
|
|
\ json_encode({
|
|
|
|
\ 'message': {
|
|
|
|
\ 'code': v:null,
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'no method named `wat` found for type `std::string::String` in the current scope',
|
|
|
|
\ 'spans': [
|
|
|
|
\ {
|
|
|
|
\ 'byte_end': 11497,
|
|
|
|
\ 'byte_start': 11494,
|
|
|
|
\ 'column_end': 10,
|
|
|
|
\ 'column_start': 7,
|
2017-12-19 18:23:09 +00:00
|
|
|
\ 'file_name': ale#path#Simplify('src/playpen.rs'),
|
2017-09-09 23:05:04 +00:00
|
|
|
\ 'is_primary': v:true,
|
|
|
|
\ 'label': v:null,
|
|
|
|
\ 'line_end': 13,
|
|
|
|
\ 'line_start': 13,
|
|
|
|
\ }
|
|
|
|
\ ]
|
|
|
|
\ },
|
|
|
|
\ }),
|
|
|
|
\ json_encode({
|
|
|
|
\ 'message': {
|
|
|
|
\ 'code': v:null,
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'aborting due to previous error',
|
|
|
|
\ 'spans': [
|
|
|
|
\ ]
|
|
|
|
\ },
|
|
|
|
\ }),
|
2017-02-07 21:17:03 +00:00
|
|
|
\ ])
|
2017-05-26 23:35:57 +00:00
|
|
|
|
2017-09-09 23:05:04 +00:00
|
|
|
Execute(The Rust handler should should errors from expansion spans):
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 4,
|
|
|
|
\ 'end_lnum': 4,
|
|
|
|
\ 'type': 'E',
|
2018-01-28 23:35:46 +00:00
|
|
|
\ 'col': 21,
|
2019-03-02 15:17:17 +00:00
|
|
|
\ 'end_col': 22,
|
2017-09-09 23:05:04 +00:00
|
|
|
\ 'text': 'mismatched types: expected bool, found integral variable',
|
|
|
|
\ },
|
|
|
|
\ ],
|
|
|
|
\ ale#handlers#rust#HandleRustErrors(bufnr(''), [
|
|
|
|
\ json_encode({
|
|
|
|
\ 'message': {
|
|
|
|
\ 'code': v:null,
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'mismatched types',
|
|
|
|
\ 'spans': [
|
|
|
|
\ {
|
|
|
|
\ 'byte_end': 1,
|
|
|
|
\ 'byte_start': 1,
|
|
|
|
\ 'column_end': 1,
|
|
|
|
\ 'column_start': 1,
|
2017-12-19 18:23:09 +00:00
|
|
|
\ 'file_name': ale#path#Simplify('src/other.rs'),
|
2017-09-09 23:05:04 +00:00
|
|
|
\ 'is_primary': v:true,
|
|
|
|
\ 'label': 'some other error',
|
|
|
|
\ 'line_end': 4,
|
|
|
|
\ 'line_start': 4,
|
|
|
|
\ 'expansion': {
|
|
|
|
\ 'span': {
|
|
|
|
\ 'byte_end': 54,
|
|
|
|
\ 'byte_start': 52,
|
|
|
|
\ 'column_end': 23,
|
|
|
|
\ 'column_start': 21,
|
2017-12-19 18:23:09 +00:00
|
|
|
\ 'file_name': ale#path#Simplify('src/playpen.rs'),
|
2017-09-09 23:05:04 +00:00
|
|
|
\ 'is_primary': v:true,
|
|
|
|
\ 'label': 'expected bool, found integral variable',
|
|
|
|
\ 'line_end': 4,
|
|
|
|
\ 'line_start': 4,
|
|
|
|
\ }
|
|
|
|
\ }
|
|
|
|
\ }
|
|
|
|
\ ]
|
|
|
|
\ },
|
|
|
|
\ }),
|
|
|
|
\ ])
|
2017-07-07 16:03:17 +00:00
|
|
|
|
2017-05-31 17:16:49 +00:00
|
|
|
Execute(The Rust handler should show detailed errors):
|
2017-07-07 16:03:17 +00:00
|
|
|
call ale#test#SetFilename('src/playpen.rs')
|
|
|
|
|
2017-05-31 17:16:49 +00:00
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 4,
|
|
|
|
\ 'end_lnum': 4,
|
|
|
|
\ 'type': 'E',
|
2018-01-28 23:35:46 +00:00
|
|
|
\ 'col': 21,
|
2019-03-02 15:17:17 +00:00
|
|
|
\ 'end_col': 22,
|
2017-05-31 17:16:49 +00:00
|
|
|
\ 'text': 'mismatched types: expected bool, found integral variable',
|
|
|
|
\ },
|
|
|
|
\ ],
|
2017-09-09 23:05:04 +00:00
|
|
|
\ ale#handlers#rust#HandleRustErrors(bufnr(''), [
|
2017-05-31 17:16:49 +00:00
|
|
|
\ '',
|
|
|
|
\ 'ignore this',
|
2017-09-09 23:05:04 +00:00
|
|
|
\ json_encode({
|
|
|
|
\ 'message': {
|
|
|
|
\ 'code': v:null,
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'mismatched types',
|
|
|
|
\ 'spans': [
|
|
|
|
\ {
|
|
|
|
\ 'byte_end': 54,
|
|
|
|
\ 'byte_start': 52,
|
|
|
|
\ 'column_end': 23,
|
|
|
|
\ 'column_start': 21,
|
|
|
|
\ 'expansion': v:null,
|
2017-12-19 18:23:09 +00:00
|
|
|
\ 'file_name': ale#path#Simplify('src/playpen.rs'),
|
2017-09-09 23:05:04 +00:00
|
|
|
\ 'is_primary': v:true,
|
|
|
|
\ 'label': 'expected bool, found integral variable',
|
|
|
|
\ 'line_end': 4,
|
|
|
|
\ 'line_start': 4,
|
|
|
|
\ }
|
|
|
|
\ ]
|
|
|
|
\ },
|
|
|
|
\ }),
|
|
|
|
\ json_encode({
|
|
|
|
\ 'message': {
|
|
|
|
\ 'code': v:null,
|
2019-06-05 04:54:26 +00:00
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'aborting due to previous error(s)',
|
|
|
|
\ 'spans': [
|
|
|
|
\ ]
|
|
|
|
\ },
|
|
|
|
\ }),
|
|
|
|
\ ])
|
|
|
|
|
|
|
|
Execute(The Rust handler should show detailed clippy errors with rendered field if it's available):
|
|
|
|
call ale#test#SetFilename('src/playpen.rs')
|
|
|
|
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 4,
|
|
|
|
\ 'end_lnum': 4,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'col': 21,
|
|
|
|
\ 'end_col': 22,
|
|
|
|
\ 'text': 'mismatched types: expected bool, found integral variable',
|
|
|
|
\ 'detail': 'this is a detailed description',
|
|
|
|
\ },
|
|
|
|
\ ],
|
|
|
|
\ ale#handlers#rust#HandleRustErrors(bufnr(''), [
|
|
|
|
\ '',
|
|
|
|
\ 'ignore this',
|
|
|
|
\ json_encode({
|
|
|
|
\ 'message': {
|
|
|
|
\ 'code': v:null,
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'mismatched types',
|
|
|
|
\ 'rendered': 'this is a detailed description',
|
|
|
|
\ 'spans': [
|
|
|
|
\ {
|
|
|
|
\ 'byte_end': 54,
|
|
|
|
\ 'byte_start': 52,
|
|
|
|
\ 'column_end': 23,
|
|
|
|
\ 'column_start': 21,
|
|
|
|
\ 'expansion': v:null,
|
|
|
|
\ 'file_name': ale#path#Simplify('src/playpen.rs'),
|
|
|
|
\ 'is_primary': v:true,
|
|
|
|
\ 'label': 'expected bool, found integral variable',
|
|
|
|
\ 'line_end': 4,
|
|
|
|
\ 'line_start': 4,
|
|
|
|
\ }
|
|
|
|
\ ]
|
|
|
|
\ },
|
|
|
|
\ }),
|
|
|
|
\ json_encode({
|
|
|
|
\ 'message': {
|
|
|
|
\ 'code': v:null,
|
2017-09-09 23:05:04 +00:00
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'aborting due to previous error(s)',
|
|
|
|
\ 'spans': [
|
|
|
|
\ ]
|
|
|
|
\ },
|
|
|
|
\ }),
|
2017-05-31 17:16:49 +00:00
|
|
|
\ ])
|
|
|
|
|
2017-05-26 23:35:57 +00:00
|
|
|
Execute(The Rust handler should find correct files):
|
2017-07-07 16:03:17 +00:00
|
|
|
call ale#test#SetFilename('src/noerrors/mod.rs')
|
|
|
|
|
2017-05-26 23:35:57 +00:00
|
|
|
AssertEqual
|
|
|
|
\ [],
|
2017-09-09 23:05:04 +00:00
|
|
|
\ ale#handlers#rust#HandleRustErrors(bufnr(''), [
|
2017-05-26 23:35:57 +00:00
|
|
|
\ '',
|
|
|
|
\ 'ignore this',
|
2017-09-09 23:05:04 +00:00
|
|
|
\ json_encode({
|
|
|
|
\ 'message': {
|
|
|
|
\ 'code': v:null,
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'unresolved import `Undefined`',
|
|
|
|
\ 'spans': [
|
|
|
|
\ {
|
|
|
|
\ 'byte_end': 103,
|
|
|
|
\ 'byte_start': 94,
|
|
|
|
\ 'column_end': 14,
|
|
|
|
\ 'column_start': 5,
|
|
|
|
\ 'file_name': 'src/haserrors/mod.rs',
|
|
|
|
\ 'is_primary': v:true,
|
|
|
|
\ 'label': 'no `Undefined` in the root',
|
|
|
|
\ 'line_end': 1,
|
|
|
|
\ 'line_start': 1,
|
|
|
|
\ }
|
|
|
|
\ ]
|
|
|
|
\ },
|
|
|
|
\ }),
|
|
|
|
\ json_encode({
|
|
|
|
\ 'message': {
|
|
|
|
\ 'code': v:null,
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'aborting due to previous error',
|
|
|
|
\ 'spans': [
|
|
|
|
\ ]
|
|
|
|
\ },
|
|
|
|
\ }),
|
2017-05-26 23:35:57 +00:00
|
|
|
\ ])
|
2018-10-26 08:38:20 +00:00
|
|
|
|
|
|
|
Execute(The Rust handler should remove secondary spans if set):
|
|
|
|
call ale#test#SetFilename('src/noerrors/mod.rs')
|
|
|
|
|
|
|
|
let g:ale_rust_ignore_secondary_spans = 0
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 1,
|
|
|
|
\ 'end_lnum': 1,
|
|
|
|
\ 'type': 'E',
|
2019-03-02 15:17:17 +00:00
|
|
|
\ 'end_col': 20,
|
2018-10-26 08:38:20 +00:00
|
|
|
\ 'col': 1,
|
|
|
|
\ 'text': 'this function takes 1 parameter but 0 were supplied: defined here',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 1,
|
|
|
|
\ 'end_lnum': 1,
|
|
|
|
\ 'type': 'E',
|
2019-03-02 15:17:17 +00:00
|
|
|
\ 'end_col': 45,
|
2018-10-26 08:38:20 +00:00
|
|
|
\ 'col': 40,
|
|
|
|
\ 'text': 'this function takes 1 parameter but 0 were supplied: expected 1 parameter',
|
|
|
|
\ },
|
|
|
|
\ ],
|
|
|
|
\ ale#handlers#rust#HandleRustErrors(bufnr(''), [
|
|
|
|
\ '',
|
|
|
|
\ 'fn test(x: u8) -> u8 { x } fn main() { x(); }',
|
|
|
|
\ json_encode({
|
|
|
|
\ 'message': {
|
|
|
|
\ 'code': {
|
|
|
|
\ 'code': 'E0061',
|
|
|
|
\ 'explanation': 'Dummy explanation; not used'
|
|
|
|
\ },
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'this function takes 1 parameter but 0 were supplied',
|
|
|
|
\ 'spans': [
|
|
|
|
\ {
|
|
|
|
\ 'byte_end': 20,
|
|
|
|
\ 'byte_start': 0,
|
|
|
|
\ 'column_end': 21,
|
|
|
|
\ 'column_start': 1,
|
|
|
|
\ 'file_name': 'src/noerrors/mod.rs',
|
|
|
|
\ 'is_primary': v:false,
|
|
|
|
\ 'label': 'defined here',
|
|
|
|
\ 'line_end': 1,
|
|
|
|
\ 'line_start': 1,
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'byte_end': 45,
|
|
|
|
\ 'byte_start': 39,
|
|
|
|
\ 'column_end': 46,
|
|
|
|
\ 'column_start': 40,
|
|
|
|
\ 'file_name': '<anon>',
|
|
|
|
\ 'is_primary': v:true,
|
|
|
|
\ 'label': 'expected 1 parameter',
|
|
|
|
\ 'line_end': 1,
|
|
|
|
\ 'line_start': 1,
|
|
|
|
\ },
|
|
|
|
\ ]
|
|
|
|
\ },
|
|
|
|
\ }),
|
|
|
|
\ json_encode({
|
|
|
|
\ 'message': {
|
|
|
|
\ 'code': v:null,
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'aborting due to previous error',
|
|
|
|
\ 'spans': []
|
|
|
|
\ },
|
|
|
|
\ }),
|
|
|
|
\ json_encode({
|
|
|
|
\ 'message': {
|
|
|
|
\ 'code': v:null,
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'For more information about this error, try `rustc --explain E0061`.',
|
|
|
|
\ 'spans': []
|
|
|
|
\ },
|
|
|
|
\ }),
|
|
|
|
\ ])
|
|
|
|
|
|
|
|
let g:ale_rust_ignore_secondary_spans = 1
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 1,
|
|
|
|
\ 'end_lnum': 1,
|
|
|
|
\ 'type': 'E',
|
2019-03-02 15:17:17 +00:00
|
|
|
\ 'end_col': 45,
|
2018-10-26 08:38:20 +00:00
|
|
|
\ 'col': 40,
|
|
|
|
\ 'text': 'this function takes 1 parameter but 0 were supplied: expected 1 parameter',
|
|
|
|
\ },
|
|
|
|
\ ],
|
|
|
|
\ ale#handlers#rust#HandleRustErrors(bufnr(''), [
|
|
|
|
\ '',
|
|
|
|
\ 'fn test(x: u8) -> u8 { x } fn main() { x(); }',
|
|
|
|
\ json_encode({
|
|
|
|
\ 'message': {
|
|
|
|
\ 'code': {
|
|
|
|
\ 'code': 'E0061',
|
|
|
|
\ 'explanation': 'Dummy explanation; not used'
|
|
|
|
\ },
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'this function takes 1 parameter but 0 were supplied',
|
|
|
|
\ 'spans': [
|
|
|
|
\ {
|
|
|
|
\ 'byte_end': 20,
|
|
|
|
\ 'byte_start': 0,
|
|
|
|
\ 'column_end': 21,
|
|
|
|
\ 'column_start': 1,
|
|
|
|
\ 'file_name': 'src/noerrors/mod.rs',
|
|
|
|
\ 'is_primary': v:false,
|
|
|
|
\ 'label': 'defined here',
|
|
|
|
\ 'line_end': 1,
|
|
|
|
\ 'line_start': 1,
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'byte_end': 45,
|
|
|
|
\ 'byte_start': 39,
|
|
|
|
\ 'column_end': 46,
|
|
|
|
\ 'column_start': 40,
|
|
|
|
\ 'file_name': '<anon>',
|
|
|
|
\ 'is_primary': v:true,
|
|
|
|
\ 'label': 'expected 1 parameter',
|
|
|
|
\ 'line_end': 1,
|
|
|
|
\ 'line_start': 1,
|
|
|
|
\ },
|
|
|
|
\ ]
|
|
|
|
\ },
|
|
|
|
\ }),
|
|
|
|
\ json_encode({
|
|
|
|
\ 'message': {
|
|
|
|
\ 'code': v:null,
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'aborting due to previous error',
|
|
|
|
\ 'spans': []
|
|
|
|
\ },
|
|
|
|
\ }),
|
|
|
|
\ json_encode({
|
|
|
|
\ 'message': {
|
|
|
|
\ 'code': v:null,
|
|
|
|
\ 'level': 'error',
|
|
|
|
\ 'message': 'For more information about this error, try `rustc --explain E0061`.',
|
|
|
|
\ 'spans': []
|
|
|
|
\ },
|
|
|
|
\ }),
|
|
|
|
\ ])
|