Skip to main content

convert

Function convert 

Source
pub(crate) fn convert(bytes: &[u8]) -> Result<Converted, ConvertError>
Expand description

Convert cargo JSON lines into diagnostics.

Only lines with the reason compiler-message count. The level error and warning map to themselves and every other level is a note. The location is the primary span. The final N warnings emitted and aborting due to messages of rustc are dropped, because they repeat the counts.

ยงErrors

Returns an error when the input is not UTF-8 or a line is not a valid cargo message.