diff --git a/Cargo.lock b/Cargo.lock index a686b02..226775f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,6 +21,7 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" name = "annotate-snippets" version = "0.11.4" dependencies = [ + "annotate-snippets", "anstream 0.6.15", "anstyle", "criterion", diff --git a/Cargo.toml b/Cargo.toml index 62ab387..d323686 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,6 +28,7 @@ anstyle = "1.0.4" unicode-width = "0.1.11" [dev-dependencies] +annotate-snippets = { path = ".", features = ["testing-colors"] } anstream = "0.6.13" criterion = "0.5.1" difference = "2.0.0" diff --git a/tests/fixtures/color/ann_eof.svg b/tests/fixtures/color/ann_eof.svg new file mode 100644 index 0000000..bb12aec --- /dev/null +++ b/tests/fixtures/color/ann_eof.svg @@ -0,0 +1,36 @@ + + + + + + + error: expected `.`, `=` + + --> Cargo.toml:1:5 + + | + + 1 | asdf + + | ^ + + | + + + + diff --git a/tests/fixtures/no-color/ann_eof.toml b/tests/fixtures/color/ann_eof.toml similarity index 89% rename from tests/fixtures/no-color/ann_eof.toml rename to tests/fixtures/color/ann_eof.toml index 313d220..cee5f0f 100644 --- a/tests/fixtures/no-color/ann_eof.toml +++ b/tests/fixtures/color/ann_eof.toml @@ -10,3 +10,6 @@ origin = "Cargo.toml" label = "" level = "Error" range = [4, 4] + +[renderer] +color = true diff --git a/tests/fixtures/color/ann_insertion.svg b/tests/fixtures/color/ann_insertion.svg new file mode 100644 index 0000000..1f4b6a2 --- /dev/null +++ b/tests/fixtures/color/ann_insertion.svg @@ -0,0 +1,36 @@ + + + + + + + error: expected `.`, `=` + + --> Cargo.toml:1:3 + + | + + 1 | asf + + | ^ 'd' belongs here + + | + + + + diff --git a/tests/fixtures/no-color/ann_insertion.toml b/tests/fixtures/color/ann_insertion.toml similarity index 89% rename from tests/fixtures/no-color/ann_insertion.toml rename to tests/fixtures/color/ann_insertion.toml index ffd2140..bf7411e 100644 --- a/tests/fixtures/no-color/ann_insertion.toml +++ b/tests/fixtures/color/ann_insertion.toml @@ -10,3 +10,6 @@ origin = "Cargo.toml" label = "'d' belongs here" level = "Error" range = [2, 2] + +[renderer] +color = true diff --git a/tests/fixtures/color/ann_multiline.svg b/tests/fixtures/color/ann_multiline.svg new file mode 100644 index 0000000..9130691 --- /dev/null +++ b/tests/fixtures/color/ann_multiline.svg @@ -0,0 +1,42 @@ + + + + + + + error[E0027]: pattern does not mention fields `lineno`, `content` + + --> src/display_list.rs:139:32 + + | + + 139 | if let DisplayLine::Source { + + | ________________________________^ + + 140 | | ref mut inline_marks, + + 141 | | } = body[body_idx] + + | |_________________________^ missing fields `lineno`, `content` + + | + + + + diff --git a/tests/fixtures/no-color/ann_multiline.toml b/tests/fixtures/color/ann_multiline.toml similarity index 94% rename from tests/fixtures/no-color/ann_multiline.toml rename to tests/fixtures/color/ann_multiline.toml index 671b534..9d8c30f 100644 --- a/tests/fixtures/no-color/ann_multiline.toml +++ b/tests/fixtures/color/ann_multiline.toml @@ -16,3 +16,6 @@ fold = false label = "missing fields `lineno`, `content`" level = "Error" range = [31, 128] + +[renderer] +color = true diff --git a/tests/fixtures/color/ann_multiline2.svg b/tests/fixtures/color/ann_multiline2.svg new file mode 100644 index 0000000..97948a4 --- /dev/null +++ b/tests/fixtures/color/ann_multiline2.svg @@ -0,0 +1,40 @@ + + + + + + + error[E####]: spacing error found + + --> foo.txt:26:12 + + | + + 26 | This is an example + + | ^^^^^^^ this should not be on separate lines + + 27 | of an edge case of an annotation overflowing + + 28 | to exactly one character on next line. + + | + + + + diff --git a/tests/fixtures/no-color/ann_multiline2.toml b/tests/fixtures/color/ann_multiline2.toml similarity index 93% rename from tests/fixtures/no-color/ann_multiline2.toml rename to tests/fixtures/color/ann_multiline2.toml index afb3aa9..259d94b 100644 --- a/tests/fixtures/no-color/ann_multiline2.toml +++ b/tests/fixtures/color/ann_multiline2.toml @@ -16,3 +16,6 @@ fold = false label = "this should not be on separate lines" level = "Error" range = [11, 19] + +[renderer] +color = true diff --git a/tests/fixtures/color/ann_removed_nl.svg b/tests/fixtures/color/ann_removed_nl.svg new file mode 100644 index 0000000..bb12aec --- /dev/null +++ b/tests/fixtures/color/ann_removed_nl.svg @@ -0,0 +1,36 @@ + + + + + + + error: expected `.`, `=` + + --> Cargo.toml:1:5 + + | + + 1 | asdf + + | ^ + + | + + + + diff --git a/tests/fixtures/no-color/ann_removed_nl.toml b/tests/fixtures/color/ann_removed_nl.toml similarity index 89% rename from tests/fixtures/no-color/ann_removed_nl.toml rename to tests/fixtures/color/ann_removed_nl.toml index b681c29..36f74ef 100644 --- a/tests/fixtures/no-color/ann_removed_nl.toml +++ b/tests/fixtures/color/ann_removed_nl.toml @@ -10,3 +10,6 @@ origin = "Cargo.toml" label = "" level = "Error" range = [4, 5] + +[renderer] +color = true diff --git a/tests/fixtures/color/ensure-emoji-highlight-width.svg b/tests/fixtures/color/ensure-emoji-highlight-width.svg new file mode 100644 index 0000000..e5646e6 --- /dev/null +++ b/tests/fixtures/color/ensure-emoji-highlight-width.svg @@ -0,0 +1,36 @@ + + + + + + + error: invalid character ` ` in package name: `haha this isn't a valid name 🐛`, characters must be Unicode XID characters (numbers, `-`, `_`, or most letters) + + --> <file>:7:1 + + | + + 7 | "haha this isn't a valid name 🐛" = { package = "libc", version = "0.1" } + + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + | + + + + diff --git a/tests/fixtures/no-color/ensure-emoji-highlight-width.toml b/tests/fixtures/color/ensure-emoji-highlight-width.toml similarity index 94% rename from tests/fixtures/no-color/ensure-emoji-highlight-width.toml rename to tests/fixtures/color/ensure-emoji-highlight-width.toml index 7af05ff..52168b4 100644 --- a/tests/fixtures/no-color/ensure-emoji-highlight-width.toml +++ b/tests/fixtures/color/ensure-emoji-highlight-width.toml @@ -13,3 +13,6 @@ origin = "" label = "" level = "Error" range = [0, 35] + +[renderer] +color = true diff --git a/tests/fixtures/color/fold_ann_multiline.svg b/tests/fixtures/color/fold_ann_multiline.svg new file mode 100644 index 0000000..6a89c4f --- /dev/null +++ b/tests/fixtures/color/fold_ann_multiline.svg @@ -0,0 +1,49 @@ + + + + + + + error[E0308]: mismatched types + + --> src/format.rs:51:6 + + | + + 51 | ) -> Option<String> { + + | -------------- expected `std::option::Option<std::string::String>` because of return type + + 52 | / for ann in annotations { + + 53 | | match (ann.range.0, ann.range.1) { + + ... | + + 71 | | } + + 72 | | } + + | |_____^ expected enum `std::option::Option`, found () + + | + + + + diff --git a/tests/fixtures/no-color/fold_ann_multiline.toml b/tests/fixtures/color/fold_ann_multiline.toml similarity index 97% rename from tests/fixtures/no-color/fold_ann_multiline.toml rename to tests/fixtures/color/fold_ann_multiline.toml index 09fc7d4..80edfb5 100644 --- a/tests/fixtures/no-color/fold_ann_multiline.toml +++ b/tests/fixtures/color/fold_ann_multiline.toml @@ -39,3 +39,6 @@ range = [5, 19] label = "expected enum `std::option::Option`, found ()" level = "Error" range = [22, 766] + +[renderer] +color = true diff --git a/tests/fixtures/color/fold_bad_origin_line.svg b/tests/fixtures/color/fold_bad_origin_line.svg new file mode 100644 index 0000000..23f1b64 --- /dev/null +++ b/tests/fixtures/color/fold_bad_origin_line.svg @@ -0,0 +1,37 @@ + + + + + + + error + + --> path/to/error.rs:3:1 + + | + + 3 | invalid syntax + + | -------------- error here + + | + + + + diff --git a/tests/fixtures/no-color/fold_bad_origin_line.toml b/tests/fixtures/color/fold_bad_origin_line.toml similarity index 90% rename from tests/fixtures/no-color/fold_bad_origin_line.toml rename to tests/fixtures/color/fold_bad_origin_line.toml index 1e81a71..3e40137 100644 --- a/tests/fixtures/no-color/fold_bad_origin_line.toml +++ b/tests/fixtures/color/fold_bad_origin_line.toml @@ -15,3 +15,6 @@ fold = true label = "error here" level = "Warning" range = [2,16] + +[renderer] +color = true diff --git a/tests/fixtures/color/fold_leading.svg b/tests/fixtures/color/fold_leading.svg new file mode 100644 index 0000000..e69965e --- /dev/null +++ b/tests/fixtures/color/fold_leading.svg @@ -0,0 +1,36 @@ + + + + + + + error[E0308]: invalid type: integer `20`, expected a bool + + --> Cargo.toml:11:13 + + | + + 11 | workspace = 20 + + | ^^ + + | + + + + diff --git a/tests/fixtures/no-color/fold_leading.toml b/tests/fixtures/color/fold_leading.toml similarity index 94% rename from tests/fixtures/no-color/fold_leading.toml rename to tests/fixtures/color/fold_leading.toml index e3fc696..90c6c8c 100644 --- a/tests/fixtures/no-color/fold_leading.toml +++ b/tests/fixtures/color/fold_leading.toml @@ -24,3 +24,6 @@ fold = true label = "" level = "Error" range = [132, 134] + +[renderer] +color = true diff --git a/tests/fixtures/color/fold_trailing.svg b/tests/fixtures/color/fold_trailing.svg new file mode 100644 index 0000000..41bf7c7 --- /dev/null +++ b/tests/fixtures/color/fold_trailing.svg @@ -0,0 +1,36 @@ + + + + + + + error[E0308]: invalid type: integer `20`, expected a lints table + + --> Cargo.toml:1:9 + + | + + 1 | lints = 20 + + | ^^ + + | + + + + diff --git a/tests/fixtures/no-color/fold_trailing.toml b/tests/fixtures/color/fold_trailing.toml similarity index 93% rename from tests/fixtures/no-color/fold_trailing.toml rename to tests/fixtures/color/fold_trailing.toml index 8ee4c05..10b2240 100644 --- a/tests/fixtures/no-color/fold_trailing.toml +++ b/tests/fixtures/color/fold_trailing.toml @@ -23,3 +23,6 @@ fold = true label = "" level = "Error" range = [8, 10] + +[renderer] +color = true diff --git a/tests/fixtures/color/issue_9.svg b/tests/fixtures/color/issue_9.svg new file mode 100644 index 0000000..80b891e --- /dev/null +++ b/tests/fixtures/color/issue_9.svg @@ -0,0 +1,49 @@ + + + + + + + error: expected one of `.`, `;`, `?`, or an operator, found `for` + + --> /code/rust/src/test/ui/annotate-snippet/suggestion.rs:4:5 + + | + + 4 | let x = vec![1]; + + | - move occurs because `x` has type `std::vec::Vec<i32>`, which does not implement the `Copy` trait + + | + + 7 | let y = x; + + | - value moved here + + | + + 9 | x; + + | ^ value used here after move + + | + + + + diff --git a/tests/fixtures/no-color/issue_9.toml b/tests/fixtures/color/issue_9.toml similarity index 96% rename from tests/fixtures/no-color/issue_9.toml rename to tests/fixtures/color/issue_9.toml index 1f35243..9de1753 100644 --- a/tests/fixtures/no-color/issue_9.toml +++ b/tests/fixtures/color/issue_9.toml @@ -26,3 +26,6 @@ line_start = 9 label = "value used here after move" level = "Error" range = [0, 1] + +[renderer] +color = true diff --git a/tests/fixtures/color/multiple_annotations.svg b/tests/fixtures/color/multiple_annotations.svg new file mode 100644 index 0000000..84f4749 --- /dev/null +++ b/tests/fixtures/color/multiple_annotations.svg @@ -0,0 +1,54 @@ + + + + + + + error + + | + + 96 | fn add_title_line(result: &mut Vec<String>, main_annotation: Option<&Annotation>) { + + 97 | if let Some(annotation) = main_annotation { + + | ^^^^^^^^^^ Variable defined here + + 98 | result.push(format_title_line( + + 99 | &annotation.annotation_type, + + | ^^^^^^^^^^ Referenced here + + 100 | None, + + 101 | &annotation.label, + + | ^^^^^^^^^^ Referenced again here + + 102 | )); + + 103 | } + + 104 | } + + | + + + + diff --git a/tests/fixtures/no-color/multiple_annotations.toml b/tests/fixtures/color/multiple_annotations.toml similarity index 96% rename from tests/fixtures/no-color/multiple_annotations.toml rename to tests/fixtures/color/multiple_annotations.toml index 842b137..824c530 100644 --- a/tests/fixtures/no-color/multiple_annotations.toml +++ b/tests/fixtures/color/multiple_annotations.toml @@ -27,3 +27,6 @@ range = [184, 194] label = "Referenced again here" level = "Error" range = [243, 253] + +[renderer] +color = true diff --git a/tests/fixtures/color/simple.svg b/tests/fixtures/color/simple.svg new file mode 100644 index 0000000..7b92d23 --- /dev/null +++ b/tests/fixtures/color/simple.svg @@ -0,0 +1,43 @@ + + + + + + + error: expected one of `.`, `;`, `?`, or an operator, found `for` + + --> src/format_color.rs:171:9 + + | + + 169 | }) + + | - expected one of `.`, `;`, `?`, or an operator here + + 170 | + + 171 | for line in &self.body { + + | ^^^ unexpected token + + | + + + + diff --git a/tests/fixtures/no-color/simple.toml b/tests/fixtures/color/simple.toml similarity index 94% rename from tests/fixtures/no-color/simple.toml rename to tests/fixtures/color/simple.toml index 76b5bac..2e6969f 100644 --- a/tests/fixtures/no-color/simple.toml +++ b/tests/fixtures/color/simple.toml @@ -17,3 +17,6 @@ range = [20, 23] label = "expected one of `.`, `;`, `?`, or an operator here" level = "Warning" range = [10, 11] + +[renderer] +color = true diff --git a/tests/fixtures/color/strip_line.svg b/tests/fixtures/color/strip_line.svg new file mode 100644 index 0000000..9da24fe --- /dev/null +++ b/tests/fixtures/color/strip_line.svg @@ -0,0 +1,36 @@ + + + + + + + error[E0308]: mismatched types + + --> $DIR/whitespace-trimming.rs:4:193 + + | + + LL | ... let _: () = 42; + + | ^^ expected (), found integer + + | + + + + diff --git a/tests/fixtures/no-color/strip_line.toml b/tests/fixtures/color/strip_line.toml similarity index 97% rename from tests/fixtures/no-color/strip_line.toml rename to tests/fixtures/color/strip_line.toml index 459cbe1..546c96a 100644 --- a/tests/fixtures/no-color/strip_line.toml +++ b/tests/fixtures/color/strip_line.toml @@ -14,5 +14,5 @@ level = "Error" range = [192, 194] [renderer] -color = false +color = true anonymized_line_numbers = true diff --git a/tests/fixtures/color/strip_line_char.svg b/tests/fixtures/color/strip_line_char.svg new file mode 100644 index 0000000..cbafc78 --- /dev/null +++ b/tests/fixtures/color/strip_line_char.svg @@ -0,0 +1,36 @@ + + + + + + + error[E0308]: mismatched types + + --> $DIR/whitespace-trimming.rs:4:193 + + | + + LL | ... let _: () = 42ñ + + | ^^ expected (), found integer + + | + + + + diff --git a/tests/fixtures/no-color/strip_line_char.toml b/tests/fixtures/color/strip_line_char.toml similarity index 97% rename from tests/fixtures/no-color/strip_line_char.toml rename to tests/fixtures/color/strip_line_char.toml index dedefd5..863abb3 100644 --- a/tests/fixtures/no-color/strip_line_char.toml +++ b/tests/fixtures/color/strip_line_char.toml @@ -14,5 +14,5 @@ level = "Error" range = [192, 194] [renderer] -color = false +color = true anonymized_line_numbers = true diff --git a/tests/fixtures/color/strip_line_non_ws.svg b/tests/fixtures/color/strip_line_non_ws.svg new file mode 100644 index 0000000..e4f8a85 --- /dev/null +++ b/tests/fixtures/color/strip_line_non_ws.svg @@ -0,0 +1,40 @@ + + + + + + + error[E0308]: mismatched types + + --> $DIR/non-whitespace-trimming.rs:4:242 + + | + + LL | ... = (); let _: () = (); let _: () = (); let _: () = 42; let _: () = (); let _: () = (); let _: () = (); let _: () = (); let _: () ... + + | ^^ ^^ expected `()`, found integer + + | | + + | expected due to this + + | + + + + diff --git a/tests/fixtures/no-color/strip_line_non_ws.toml b/tests/fixtures/color/strip_line_non_ws.toml similarity index 98% rename from tests/fixtures/no-color/strip_line_non_ws.toml rename to tests/fixtures/color/strip_line_non_ws.toml index 06ecad8..c6573ff 100644 --- a/tests/fixtures/no-color/strip_line_non_ws.toml +++ b/tests/fixtures/color/strip_line_non_ws.toml @@ -23,3 +23,4 @@ range = [236, 238] [renderer] anonymized_line_numbers = true +color = true diff --git a/tests/fixtures/deserialize.rs b/tests/fixtures/deserialize.rs index 3ddef79..a38a88e 100644 --- a/tests/fixtures/deserialize.rs +++ b/tests/fixtures/deserialize.rs @@ -151,6 +151,8 @@ pub struct RendererDef { anonymized_line_numbers: bool, #[serde(default)] term_width: Option, + #[serde(default)] + color: bool, } impl From for Renderer { @@ -158,8 +160,15 @@ impl From for Renderer { let RendererDef { anonymized_line_numbers, term_width, + color, } = val; - Renderer::plain() + + let renderer = if color { + Renderer::styled() + } else { + Renderer::plain() + }; + renderer .anonymized_line_numbers(anonymized_line_numbers) .term_width(term_width.unwrap_or(DEFAULT_TERM_WIDTH)) } diff --git a/tests/fixtures/no-color/ann_eof.svg b/tests/fixtures/no-color/ann_eof.svg deleted file mode 100644 index c8900d0..0000000 --- a/tests/fixtures/no-color/ann_eof.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - error: expected `.`, `=` - - --> Cargo.toml:1:5 - - | - - 1 | asdf - - | ^ - - | - - - - diff --git a/tests/fixtures/no-color/ann_insertion.svg b/tests/fixtures/no-color/ann_insertion.svg deleted file mode 100644 index b15b81b..0000000 --- a/tests/fixtures/no-color/ann_insertion.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - error: expected `.`, `=` - - --> Cargo.toml:1:3 - - | - - 1 | asf - - | ^ 'd' belongs here - - | - - - - diff --git a/tests/fixtures/no-color/ann_multiline.svg b/tests/fixtures/no-color/ann_multiline.svg deleted file mode 100644 index f4b4433..0000000 --- a/tests/fixtures/no-color/ann_multiline.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - error[E0027]: pattern does not mention fields `lineno`, `content` - - --> src/display_list.rs:139:32 - - | - - 139 | if let DisplayLine::Source { - - | ________________________________^ - - 140 | | ref mut inline_marks, - - 141 | | } = body[body_idx] - - | |_________________________^ missing fields `lineno`, `content` - - | - - - - diff --git a/tests/fixtures/no-color/ann_multiline2.svg b/tests/fixtures/no-color/ann_multiline2.svg deleted file mode 100644 index 49c2c4b..0000000 --- a/tests/fixtures/no-color/ann_multiline2.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - error[E####]: spacing error found - - --> foo.txt:26:12 - - | - - 26 | This is an example - - | ^^^^^^^ this should not be on separate lines - - 27 | of an edge case of an annotation overflowing - - 28 | to exactly one character on next line. - - | - - - - diff --git a/tests/fixtures/no-color/ann_removed_nl.svg b/tests/fixtures/no-color/ann_removed_nl.svg deleted file mode 100644 index c8900d0..0000000 --- a/tests/fixtures/no-color/ann_removed_nl.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - error: expected `.`, `=` - - --> Cargo.toml:1:5 - - | - - 1 | asdf - - | ^ - - | - - - - diff --git a/tests/fixtures/no-color/ensure-emoji-highlight-width.svg b/tests/fixtures/no-color/ensure-emoji-highlight-width.svg deleted file mode 100644 index 0840805..0000000 --- a/tests/fixtures/no-color/ensure-emoji-highlight-width.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - error: invalid character ` ` in package name: `haha this isn't a valid name 🐛`, characters must be Unicode XID characters (numbers, `-`, `_`, or most letters) - - --> <file>:7:1 - - | - - 7 | "haha this isn't a valid name 🐛" = { package = "libc", version = "0.1" } - - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - | - - - - diff --git a/tests/fixtures/no-color/fold_ann_multiline.svg b/tests/fixtures/no-color/fold_ann_multiline.svg deleted file mode 100644 index f82fe25..0000000 --- a/tests/fixtures/no-color/fold_ann_multiline.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - error[E0308]: mismatched types - - --> src/format.rs:51:6 - - | - - 51 | ) -> Option<String> { - - | -------------- expected `std::option::Option<std::string::String>` because of return type - - 52 | / for ann in annotations { - - 53 | | match (ann.range.0, ann.range.1) { - - ... | - - 71 | | } - - 72 | | } - - | |_____^ expected enum `std::option::Option`, found () - - | - - - - diff --git a/tests/fixtures/no-color/fold_bad_origin_line.svg b/tests/fixtures/no-color/fold_bad_origin_line.svg deleted file mode 100644 index 13a0834..0000000 --- a/tests/fixtures/no-color/fold_bad_origin_line.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - error - - --> path/to/error.rs:3:1 - - | - - 3 | invalid syntax - - | -------------- error here - - | - - - - diff --git a/tests/fixtures/no-color/fold_leading.svg b/tests/fixtures/no-color/fold_leading.svg deleted file mode 100644 index 72887a2..0000000 --- a/tests/fixtures/no-color/fold_leading.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - error[E0308]: invalid type: integer `20`, expected a bool - - --> Cargo.toml:11:13 - - | - - 11 | workspace = 20 - - | ^^ - - | - - - - diff --git a/tests/fixtures/no-color/fold_trailing.svg b/tests/fixtures/no-color/fold_trailing.svg deleted file mode 100644 index 15c9850..0000000 --- a/tests/fixtures/no-color/fold_trailing.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - error[E0308]: invalid type: integer `20`, expected a lints table - - --> Cargo.toml:1:9 - - | - - 1 | lints = 20 - - | ^^ - - | - - - - diff --git a/tests/fixtures/no-color/issue_9.svg b/tests/fixtures/no-color/issue_9.svg deleted file mode 100644 index af22d82..0000000 --- a/tests/fixtures/no-color/issue_9.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - error: expected one of `.`, `;`, `?`, or an operator, found `for` - - --> /code/rust/src/test/ui/annotate-snippet/suggestion.rs:4:5 - - | - - 4 | let x = vec![1]; - - | - move occurs because `x` has type `std::vec::Vec<i32>`, which does not implement the `Copy` trait - - | - - 7 | let y = x; - - | - value moved here - - | - - 9 | x; - - | ^ value used here after move - - | - - - - diff --git a/tests/fixtures/no-color/multiple_annotations.svg b/tests/fixtures/no-color/multiple_annotations.svg deleted file mode 100644 index 18bca93..0000000 --- a/tests/fixtures/no-color/multiple_annotations.svg +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - error - - | - - 96 | fn add_title_line(result: &mut Vec<String>, main_annotation: Option<&Annotation>) { - - 97 | if let Some(annotation) = main_annotation { - - | ^^^^^^^^^^ Variable defined here - - 98 | result.push(format_title_line( - - 99 | &annotation.annotation_type, - - | ^^^^^^^^^^ Referenced here - - 100 | None, - - 101 | &annotation.label, - - | ^^^^^^^^^^ Referenced again here - - 102 | )); - - 103 | } - - 104 | } - - | - - - - diff --git a/tests/fixtures/no-color/simple.svg b/tests/fixtures/no-color/simple.svg deleted file mode 100644 index ae7b03c..0000000 --- a/tests/fixtures/no-color/simple.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - error: expected one of `.`, `;`, `?`, or an operator, found `for` - - --> src/format_color.rs:171:9 - - | - - 169 | }) - - | - expected one of `.`, `;`, `?`, or an operator here - - 170 | - - 171 | for line in &self.body { - - | ^^^ unexpected token - - | - - - - diff --git a/tests/fixtures/no-color/strip_line.svg b/tests/fixtures/no-color/strip_line.svg deleted file mode 100644 index b1fd8a6..0000000 --- a/tests/fixtures/no-color/strip_line.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - error[E0308]: mismatched types - - --> $DIR/whitespace-trimming.rs:4:193 - - | - - LL | ... let _: () = 42; - - | ^^ expected (), found integer - - | - - - - diff --git a/tests/fixtures/no-color/strip_line_char.svg b/tests/fixtures/no-color/strip_line_char.svg deleted file mode 100644 index 15296a1..0000000 --- a/tests/fixtures/no-color/strip_line_char.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - error[E0308]: mismatched types - - --> $DIR/whitespace-trimming.rs:4:193 - - | - - LL | ... let _: () = 42ñ - - | ^^ expected (), found integer - - | - - - - diff --git a/tests/fixtures/no-color/strip_line_non_ws.svg b/tests/fixtures/no-color/strip_line_non_ws.svg deleted file mode 100644 index f1977dc..0000000 --- a/tests/fixtures/no-color/strip_line_non_ws.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - error[E0308]: mismatched types - - --> $DIR/non-whitespace-trimming.rs:4:242 - - | - - LL | ... = (); let _: () = (); let _: () = (); let _: () = 42; let _: () = (); let _: () = (); let _: () = (); let _: () = (); let _: () ... - - | ^^ ^^ expected `()`, found integer - - | | - - | expected due to this - - | - - - -