Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
11
third-party/vendor/codespan-reporting/tests/snapshots/term__empty__medium_color.snap
vendored
Normal file
11
third-party/vendor/codespan-reporting/tests/snapshots/term__empty__medium_color.snap
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
{fg:Red bold bright}bug{bold bright}: {/}
|
||||
{fg:Red bold bright}error{bold bright}: {/}
|
||||
{fg:Yellow bold bright}warning{bold bright}: {/}
|
||||
{fg:Green bold bright}note{bold bright}: {/}
|
||||
{fg:Cyan bold bright}help{bold bright}: {/}
|
||||
{fg:Red bold bright}bug{bold bright}: {/}
|
||||
|
||||
11
third-party/vendor/codespan-reporting/tests/snapshots/term__empty__medium_no_color.snap
vendored
Normal file
11
third-party/vendor/codespan-reporting/tests/snapshots/term__empty__medium_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
bug:
|
||||
error:
|
||||
warning:
|
||||
note:
|
||||
help:
|
||||
bug:
|
||||
|
||||
17
third-party/vendor/codespan-reporting/tests/snapshots/term__empty__rich_ascii_no_color.snap
vendored
Normal file
17
third-party/vendor/codespan-reporting/tests/snapshots/term__empty__rich_ascii_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
bug:
|
||||
|
||||
error:
|
||||
|
||||
warning:
|
||||
|
||||
note:
|
||||
|
||||
help:
|
||||
|
||||
bug:
|
||||
|
||||
|
||||
17
third-party/vendor/codespan-reporting/tests/snapshots/term__empty__rich_color.snap
vendored
Normal file
17
third-party/vendor/codespan-reporting/tests/snapshots/term__empty__rich_color.snap
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
{fg:Red bold bright}bug{bold bright}: {/}
|
||||
|
||||
{fg:Red bold bright}error{bold bright}: {/}
|
||||
|
||||
{fg:Yellow bold bright}warning{bold bright}: {/}
|
||||
|
||||
{fg:Green bold bright}note{bold bright}: {/}
|
||||
|
||||
{fg:Cyan bold bright}help{bold bright}: {/}
|
||||
|
||||
{fg:Red bold bright}bug{bold bright}: {/}
|
||||
|
||||
|
||||
17
third-party/vendor/codespan-reporting/tests/snapshots/term__empty__rich_no_color.snap
vendored
Normal file
17
third-party/vendor/codespan-reporting/tests/snapshots/term__empty__rich_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
bug:
|
||||
|
||||
error:
|
||||
|
||||
warning:
|
||||
|
||||
note:
|
||||
|
||||
help:
|
||||
|
||||
bug:
|
||||
|
||||
|
||||
11
third-party/vendor/codespan-reporting/tests/snapshots/term__empty__short_color.snap
vendored
Normal file
11
third-party/vendor/codespan-reporting/tests/snapshots/term__empty__short_color.snap
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
{fg:Red bold bright}bug{bold bright}: {/}
|
||||
{fg:Red bold bright}error{bold bright}: {/}
|
||||
{fg:Yellow bold bright}warning{bold bright}: {/}
|
||||
{fg:Green bold bright}note{bold bright}: {/}
|
||||
{fg:Cyan bold bright}help{bold bright}: {/}
|
||||
{fg:Red bold bright}bug{bold bright}: {/}
|
||||
|
||||
11
third-party/vendor/codespan-reporting/tests/snapshots/term__empty__short_no_color.snap
vendored
Normal file
11
third-party/vendor/codespan-reporting/tests/snapshots/term__empty__short_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
bug:
|
||||
error:
|
||||
warning:
|
||||
note:
|
||||
help:
|
||||
bug:
|
||||
|
||||
9
third-party/vendor/codespan-reporting/tests/snapshots/term__empty_ranges__medium_color.snap
vendored
Normal file
9
third-party/vendor/codespan-reporting/tests/snapshots/term__empty_ranges__medium_color.snap
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
hello:1:7: {fg:Green bold bright}note{bold bright}: middle{/}
|
||||
hello:1:13: {fg:Green bold bright}note{bold bright}: end of line{/}
|
||||
hello:2:11: {fg:Green bold bright}note{bold bright}: end of line{/}
|
||||
hello:3:4: {fg:Green bold bright}note{bold bright}: end of file{/}
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
hello:1:7: note: middle
|
||||
hello:1:13: note: end of line
|
||||
hello:2:11: note: end of line
|
||||
hello:3:4: note: end of file
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
note: middle
|
||||
--> hello:1:7
|
||||
|
|
||||
1 | Hello world!
|
||||
| ^ middle
|
||||
|
||||
note: end of line
|
||||
--> hello:1:13
|
||||
|
|
||||
1 | Hello world!
|
||||
| ^ end of line
|
||||
|
||||
note: end of line
|
||||
--> hello:2:11
|
||||
|
|
||||
2 | Bye world!
|
||||
| ^ end of line
|
||||
|
||||
note: end of file
|
||||
--> hello:3:4
|
||||
|
|
||||
3 |
|
||||
| ^ end of file
|
||||
|
||||
|
||||
29
third-party/vendor/codespan-reporting/tests/snapshots/term__empty_ranges__rich_color.snap
vendored
Normal file
29
third-party/vendor/codespan-reporting/tests/snapshots/term__empty_ranges__rich_color.snap
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
{fg:Green bold bright}note{bold bright}: middle{/}
|
||||
{fg:Blue}┌─{/} hello:1:7
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}1{/} {fg:Blue}│{/} Hello {fg:Green}w{/}orld!
|
||||
{fg:Blue}│{/} {fg:Green}^{/} {fg:Green}middle{/}
|
||||
|
||||
{fg:Green bold bright}note{bold bright}: end of line{/}
|
||||
{fg:Blue}┌─{/} hello:1:13
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}1{/} {fg:Blue}│{/} Hello world!
|
||||
{fg:Blue}│{/} {fg:Green}^{/} {fg:Green}end of line{/}
|
||||
|
||||
{fg:Green bold bright}note{bold bright}: end of line{/}
|
||||
{fg:Blue}┌─{/} hello:2:11
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}2{/} {fg:Blue}│{/} Bye world!
|
||||
{fg:Blue}│{/} {fg:Green}^{/} {fg:Green}end of line{/}
|
||||
|
||||
{fg:Green bold bright}note{bold bright}: end of file{/}
|
||||
{fg:Blue}┌─{/} hello:3:4
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}3{/} {fg:Blue}│{/}
|
||||
{fg:Blue}│{/} {fg:Green}^{/} {fg:Green}end of file{/}
|
||||
|
||||
|
||||
29
third-party/vendor/codespan-reporting/tests/snapshots/term__empty_ranges__rich_no_color.snap
vendored
Normal file
29
third-party/vendor/codespan-reporting/tests/snapshots/term__empty_ranges__rich_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
note: middle
|
||||
┌─ hello:1:7
|
||||
│
|
||||
1 │ Hello world!
|
||||
│ ^ middle
|
||||
|
||||
note: end of line
|
||||
┌─ hello:1:13
|
||||
│
|
||||
1 │ Hello world!
|
||||
│ ^ end of line
|
||||
|
||||
note: end of line
|
||||
┌─ hello:2:11
|
||||
│
|
||||
2 │ Bye world!
|
||||
│ ^ end of line
|
||||
|
||||
note: end of file
|
||||
┌─ hello:3:4
|
||||
│
|
||||
3 │
|
||||
│ ^ end of file
|
||||
|
||||
|
||||
9
third-party/vendor/codespan-reporting/tests/snapshots/term__empty_ranges__short_color.snap
vendored
Normal file
9
third-party/vendor/codespan-reporting/tests/snapshots/term__empty_ranges__short_color.snap
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
hello:1:7: {fg:Green bold bright}note{bold bright}: middle{/}
|
||||
hello:1:13: {fg:Green bold bright}note{bold bright}: end of line{/}
|
||||
hello:2:11: {fg:Green bold bright}note{bold bright}: end of line{/}
|
||||
hello:3:4: {fg:Green bold bright}note{bold bright}: end of file{/}
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
hello:1:7: note: middle
|
||||
hello:1:13: note: end of line
|
||||
hello:2:11: note: end of line
|
||||
hello:3:4: note: end of file
|
||||
|
||||
11
third-party/vendor/codespan-reporting/tests/snapshots/term__fizz_buzz__medium_color.snap
vendored
Normal file
11
third-party/vendor/codespan-reporting/tests/snapshots/term__fizz_buzz__medium_color.snap
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
FizzBuzz.fun:8:12: {fg:Red bold bright}error[E0308]{bold bright}: `case` clauses have incompatible types{/}
|
||||
{fg:Blue}={/} expected type `String`
|
||||
found type `Nat`
|
||||
FizzBuzz.fun:16:16: {fg:Red bold bright}error[E0308]{bold bright}: `case` clauses have incompatible types{/}
|
||||
{fg:Blue}={/} expected type `String`
|
||||
found type `Nat`
|
||||
|
||||
11
third-party/vendor/codespan-reporting/tests/snapshots/term__fizz_buzz__medium_no_color.snap
vendored
Normal file
11
third-party/vendor/codespan-reporting/tests/snapshots/term__fizz_buzz__medium_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
FizzBuzz.fun:8:12: error[E0308]: `case` clauses have incompatible types
|
||||
= expected type `String`
|
||||
found type `Nat`
|
||||
FizzBuzz.fun:16:16: error[E0308]: `case` clauses have incompatible types
|
||||
= expected type `String`
|
||||
found type `Nat`
|
||||
|
||||
42
third-party/vendor/codespan-reporting/tests/snapshots/term__fizz_buzz__rich_ascii_no_color.snap
vendored
Normal file
42
third-party/vendor/codespan-reporting/tests/snapshots/term__fizz_buzz__rich_ascii_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error[E0308]: `case` clauses have incompatible types
|
||||
--> FizzBuzz.fun:8:12
|
||||
|
|
||||
3 | fizz₁ : Nat → String
|
||||
| ------ expected type `String` found here
|
||||
4 | fizz₁ num = case (mod num 5) (mod num 3) of
|
||||
| /-------------'
|
||||
5 | | 0 0 => "FizzBuzz"
|
||||
6 | | 0 _ => "Fizz"
|
||||
7 | | _ 0 => "Buzz"
|
||||
8 | | _ _ => num
|
||||
| | ^^^ expected `String`, found `Nat`
|
||||
| \--------------' `case` clauses have incompatible types
|
||||
|
|
||||
= expected type `String`
|
||||
found type `Nat`
|
||||
|
||||
error[E0308]: `case` clauses have incompatible types
|
||||
--> FizzBuzz.fun:16:16
|
||||
|
|
||||
10 | fizz₂ : Nat → String
|
||||
| ------ expected type `String` found here
|
||||
11 | fizz₂ num =
|
||||
12 | / case (mod num 5) (mod num 3) of
|
||||
13 | | 0 0 => "FizzBuzz"
|
||||
| | ---------- this is found to be of type `String`
|
||||
14 | | 0 _ => "Fizz"
|
||||
| | ------ this is found to be of type `String`
|
||||
15 | | _ 0 => "Buzz"
|
||||
| | ------ this is found to be of type `String`
|
||||
16 | | _ _ => num
|
||||
| | ^^^ expected `String`, found `Nat`
|
||||
| \------------------' `case` clauses have incompatible types
|
||||
|
|
||||
= expected type `String`
|
||||
found type `Nat`
|
||||
|
||||
|
||||
42
third-party/vendor/codespan-reporting/tests/snapshots/term__fizz_buzz__rich_color.snap
vendored
Normal file
42
third-party/vendor/codespan-reporting/tests/snapshots/term__fizz_buzz__rich_color.snap
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
{fg:Red bold bright}error[E0308]{bold bright}: `case` clauses have incompatible types{/}
|
||||
{fg:Blue}┌─{/} FizzBuzz.fun:8:12
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}3{/} {fg:Blue}│{/} fizz₁ : Nat → String
|
||||
{fg:Blue}│{/} {fg:Blue}------{/} {fg:Blue}expected type `String` found here{/}
|
||||
{fg:Blue}4{/} {fg:Blue}│{/} fizz₁ num = case (mod num 5) (mod num 3) of
|
||||
{fg:Blue}│{/} {fg:Blue}╭{/}{fg:Blue}─────────────'{/}
|
||||
{fg:Blue}5{/} {fg:Blue}│{/} {fg:Blue}│{/} 0 0 => "FizzBuzz"
|
||||
{fg:Blue}6{/} {fg:Blue}│{/} {fg:Blue}│{/} 0 _ => "Fizz"
|
||||
{fg:Blue}7{/} {fg:Blue}│{/} {fg:Blue}│{/} _ 0 => "Buzz"
|
||||
{fg:Blue}8{/} {fg:Blue}│{/} {fg:Blue}│{/} _ _ => {fg:Red}num{/}
|
||||
{fg:Blue}│{/} {fg:Blue}│{/} {fg:Red}^^^{/} {fg:Red}expected `String`, found `Nat`{/}
|
||||
{fg:Blue}│{/} {fg:Blue}╰{/}{fg:Blue}──────────────' `case` clauses have incompatible types{/}
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}={/} expected type `String`
|
||||
found type `Nat`
|
||||
|
||||
{fg:Red bold bright}error[E0308]{bold bright}: `case` clauses have incompatible types{/}
|
||||
{fg:Blue}┌─{/} FizzBuzz.fun:16:16
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}10{/} {fg:Blue}│{/} fizz₂ : Nat → String
|
||||
{fg:Blue}│{/} {fg:Blue}------{/} {fg:Blue}expected type `String` found here{/}
|
||||
{fg:Blue}11{/} {fg:Blue}│{/} fizz₂ num =
|
||||
{fg:Blue}12{/} {fg:Blue}│{/} {fg:Blue}╭{/} case (mod num 5) (mod num 3) of
|
||||
{fg:Blue}13{/} {fg:Blue}│{/} {fg:Blue}│{/} 0 0 => "FizzBuzz"
|
||||
{fg:Blue}│{/} {fg:Blue}│{/} {fg:Blue}----------{/} {fg:Blue}this is found to be of type `String`{/}
|
||||
{fg:Blue}14{/} {fg:Blue}│{/} {fg:Blue}│{/} 0 _ => "Fizz"
|
||||
{fg:Blue}│{/} {fg:Blue}│{/} {fg:Blue}------{/} {fg:Blue}this is found to be of type `String`{/}
|
||||
{fg:Blue}15{/} {fg:Blue}│{/} {fg:Blue}│{/} _ 0 => "Buzz"
|
||||
{fg:Blue}│{/} {fg:Blue}│{/} {fg:Blue}------{/} {fg:Blue}this is found to be of type `String`{/}
|
||||
{fg:Blue}16{/} {fg:Blue}│{/} {fg:Blue}│{/} _ _ => {fg:Red}num{/}
|
||||
{fg:Blue}│{/} {fg:Blue}│{/} {fg:Red}^^^{/} {fg:Red}expected `String`, found `Nat`{/}
|
||||
{fg:Blue}│{/} {fg:Blue}╰{/}{fg:Blue}──────────────────' `case` clauses have incompatible types{/}
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}={/} expected type `String`
|
||||
found type `Nat`
|
||||
|
||||
|
||||
42
third-party/vendor/codespan-reporting/tests/snapshots/term__fizz_buzz__rich_no_color.snap
vendored
Normal file
42
third-party/vendor/codespan-reporting/tests/snapshots/term__fizz_buzz__rich_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error[E0308]: `case` clauses have incompatible types
|
||||
┌─ FizzBuzz.fun:8:12
|
||||
│
|
||||
3 │ fizz₁ : Nat → String
|
||||
│ ------ expected type `String` found here
|
||||
4 │ fizz₁ num = case (mod num 5) (mod num 3) of
|
||||
│ ╭─────────────'
|
||||
5 │ │ 0 0 => "FizzBuzz"
|
||||
6 │ │ 0 _ => "Fizz"
|
||||
7 │ │ _ 0 => "Buzz"
|
||||
8 │ │ _ _ => num
|
||||
│ │ ^^^ expected `String`, found `Nat`
|
||||
│ ╰──────────────' `case` clauses have incompatible types
|
||||
│
|
||||
= expected type `String`
|
||||
found type `Nat`
|
||||
|
||||
error[E0308]: `case` clauses have incompatible types
|
||||
┌─ FizzBuzz.fun:16:16
|
||||
│
|
||||
10 │ fizz₂ : Nat → String
|
||||
│ ------ expected type `String` found here
|
||||
11 │ fizz₂ num =
|
||||
12 │ ╭ case (mod num 5) (mod num 3) of
|
||||
13 │ │ 0 0 => "FizzBuzz"
|
||||
│ │ ---------- this is found to be of type `String`
|
||||
14 │ │ 0 _ => "Fizz"
|
||||
│ │ ------ this is found to be of type `String`
|
||||
15 │ │ _ 0 => "Buzz"
|
||||
│ │ ------ this is found to be of type `String`
|
||||
16 │ │ _ _ => num
|
||||
│ │ ^^^ expected `String`, found `Nat`
|
||||
│ ╰──────────────────' `case` clauses have incompatible types
|
||||
│
|
||||
= expected type `String`
|
||||
found type `Nat`
|
||||
|
||||
|
||||
7
third-party/vendor/codespan-reporting/tests/snapshots/term__fizz_buzz__short_color.snap
vendored
Normal file
7
third-party/vendor/codespan-reporting/tests/snapshots/term__fizz_buzz__short_color.snap
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
FizzBuzz.fun:8:12: {fg:Red bold bright}error[E0308]{bold bright}: `case` clauses have incompatible types{/}
|
||||
FizzBuzz.fun:16:16: {fg:Red bold bright}error[E0308]{bold bright}: `case` clauses have incompatible types{/}
|
||||
|
||||
7
third-party/vendor/codespan-reporting/tests/snapshots/term__fizz_buzz__short_no_color.snap
vendored
Normal file
7
third-party/vendor/codespan-reporting/tests/snapshots/term__fizz_buzz__short_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
FizzBuzz.fun:8:12: error[E0308]: `case` clauses have incompatible types
|
||||
FizzBuzz.fun:16:16: error[E0308]: `case` clauses have incompatible types
|
||||
|
||||
9
third-party/vendor/codespan-reporting/tests/snapshots/term__message__medium_color.snap
vendored
Normal file
9
third-party/vendor/codespan-reporting/tests/snapshots/term__message__medium_color.snap
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
{fg:Red bold bright}error{bold bright}: a message{/}
|
||||
{fg:Yellow bold bright}warning{bold bright}: a message{/}
|
||||
{fg:Green bold bright}note{bold bright}: a message{/}
|
||||
{fg:Cyan bold bright}help{bold bright}: a message{/}
|
||||
|
||||
9
third-party/vendor/codespan-reporting/tests/snapshots/term__message__medium_no_color.snap
vendored
Normal file
9
third-party/vendor/codespan-reporting/tests/snapshots/term__message__medium_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error: a message
|
||||
warning: a message
|
||||
note: a message
|
||||
help: a message
|
||||
|
||||
13
third-party/vendor/codespan-reporting/tests/snapshots/term__message__rich_ascii_no_color.snap
vendored
Normal file
13
third-party/vendor/codespan-reporting/tests/snapshots/term__message__rich_ascii_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error: a message
|
||||
|
||||
warning: a message
|
||||
|
||||
note: a message
|
||||
|
||||
help: a message
|
||||
|
||||
|
||||
13
third-party/vendor/codespan-reporting/tests/snapshots/term__message__rich_color.snap
vendored
Normal file
13
third-party/vendor/codespan-reporting/tests/snapshots/term__message__rich_color.snap
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
{fg:Red bold bright}error{bold bright}: a message{/}
|
||||
|
||||
{fg:Yellow bold bright}warning{bold bright}: a message{/}
|
||||
|
||||
{fg:Green bold bright}note{bold bright}: a message{/}
|
||||
|
||||
{fg:Cyan bold bright}help{bold bright}: a message{/}
|
||||
|
||||
|
||||
13
third-party/vendor/codespan-reporting/tests/snapshots/term__message__rich_no_color.snap
vendored
Normal file
13
third-party/vendor/codespan-reporting/tests/snapshots/term__message__rich_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error: a message
|
||||
|
||||
warning: a message
|
||||
|
||||
note: a message
|
||||
|
||||
help: a message
|
||||
|
||||
|
||||
9
third-party/vendor/codespan-reporting/tests/snapshots/term__message__short_color.snap
vendored
Normal file
9
third-party/vendor/codespan-reporting/tests/snapshots/term__message__short_color.snap
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
{fg:Red bold bright}error{bold bright}: a message{/}
|
||||
{fg:Yellow bold bright}warning{bold bright}: a message{/}
|
||||
{fg:Green bold bright}note{bold bright}: a message{/}
|
||||
{fg:Cyan bold bright}help{bold bright}: a message{/}
|
||||
|
||||
9
third-party/vendor/codespan-reporting/tests/snapshots/term__message__short_no_color.snap
vendored
Normal file
9
third-party/vendor/codespan-reporting/tests/snapshots/term__message__short_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error: a message
|
||||
warning: a message
|
||||
note: a message
|
||||
help: a message
|
||||
|
||||
13
third-party/vendor/codespan-reporting/tests/snapshots/term__message_and_notes__medium_color.snap
vendored
Normal file
13
third-party/vendor/codespan-reporting/tests/snapshots/term__message_and_notes__medium_color.snap
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
{fg:Red bold bright}error{bold bright}: a message{/}
|
||||
{fg:Blue}={/} a note
|
||||
{fg:Yellow bold bright}warning{bold bright}: a message{/}
|
||||
{fg:Blue}={/} a note
|
||||
{fg:Green bold bright}note{bold bright}: a message{/}
|
||||
{fg:Blue}={/} a note
|
||||
{fg:Cyan bold bright}help{bold bright}: a message{/}
|
||||
{fg:Blue}={/} a note
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error: a message
|
||||
= a note
|
||||
warning: a message
|
||||
= a note
|
||||
note: a message
|
||||
= a note
|
||||
help: a message
|
||||
= a note
|
||||
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error: a message
|
||||
= a note
|
||||
|
||||
warning: a message
|
||||
= a note
|
||||
|
||||
note: a message
|
||||
= a note
|
||||
|
||||
help: a message
|
||||
= a note
|
||||
|
||||
|
||||
17
third-party/vendor/codespan-reporting/tests/snapshots/term__message_and_notes__rich_color.snap
vendored
Normal file
17
third-party/vendor/codespan-reporting/tests/snapshots/term__message_and_notes__rich_color.snap
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
{fg:Red bold bright}error{bold bright}: a message{/}
|
||||
{fg:Blue}={/} a note
|
||||
|
||||
{fg:Yellow bold bright}warning{bold bright}: a message{/}
|
||||
{fg:Blue}={/} a note
|
||||
|
||||
{fg:Green bold bright}note{bold bright}: a message{/}
|
||||
{fg:Blue}={/} a note
|
||||
|
||||
{fg:Cyan bold bright}help{bold bright}: a message{/}
|
||||
{fg:Blue}={/} a note
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error: a message
|
||||
= a note
|
||||
|
||||
warning: a message
|
||||
= a note
|
||||
|
||||
note: a message
|
||||
= a note
|
||||
|
||||
help: a message
|
||||
= a note
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
{fg:Red bold bright}error{bold bright}: a message{/}
|
||||
{fg:Yellow bold bright}warning{bold bright}: a message{/}
|
||||
{fg:Green bold bright}note{bold bright}: a message{/}
|
||||
{fg:Cyan bold bright}help{bold bright}: a message{/}
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error: a message
|
||||
warning: a message
|
||||
note: a message
|
||||
help: a message
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error[E0001]: a message
|
||||
|
||||
warning[W001]: a message
|
||||
|
||||
note[N0815]: a message
|
||||
|
||||
help[H4711]: a message
|
||||
|
||||
error: where did my errorcode go?
|
||||
|
||||
warning: where did my errorcode go?
|
||||
|
||||
note: where did my errorcode go?
|
||||
|
||||
help: where did my errorcode go?
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error[E0001]: a message
|
||||
|
||||
warning[W001]: a message
|
||||
|
||||
note[N0815]: a message
|
||||
|
||||
help[H4711]: a message
|
||||
|
||||
error: where did my errorcode go?
|
||||
|
||||
warning: where did my errorcode go?
|
||||
|
||||
note: where did my errorcode go?
|
||||
|
||||
help: where did my errorcode go?
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error[E0001]: a message
|
||||
warning[W001]: a message
|
||||
note[N0815]: a message
|
||||
help[H4711]: a message
|
||||
error: where did my errorcode go?
|
||||
warning: where did my errorcode go?
|
||||
note: where did my errorcode go?
|
||||
help: where did my errorcode go?
|
||||
|
||||
12
third-party/vendor/codespan-reporting/tests/snapshots/term__multifile__medium_color.snap
vendored
Normal file
12
third-party/vendor/codespan-reporting/tests/snapshots/term__multifile__medium_color.snap
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
Data/Nat.fun:7:13: {fg:Red bold bright}error{bold bright}: unknown builtin: `NATRAL`{/}
|
||||
{fg:Blue}={/} there is a builtin with a similar name: `NATURAL`
|
||||
Data/Nat.fun:17:16: {fg:Yellow bold bright}warning{bold bright}: unused parameter pattern: `n₂`{/}
|
||||
{fg:Blue}={/} consider using a wildcard pattern: `_`
|
||||
Test.fun:4:11: {fg:Red bold bright}error[E0001]{bold bright}: unexpected type in application of `_+_`{/}
|
||||
{fg:Blue}={/} expected type `Nat`
|
||||
found type `String`
|
||||
|
||||
12
third-party/vendor/codespan-reporting/tests/snapshots/term__multifile__medium_no_color.snap
vendored
Normal file
12
third-party/vendor/codespan-reporting/tests/snapshots/term__multifile__medium_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
Data/Nat.fun:7:13: error: unknown builtin: `NATRAL`
|
||||
= there is a builtin with a similar name: `NATURAL`
|
||||
Data/Nat.fun:17:16: warning: unused parameter pattern: `n₂`
|
||||
= consider using a wildcard pattern: `_`
|
||||
Test.fun:4:11: error[E0001]: unexpected type in application of `_+_`
|
||||
= expected type `Nat`
|
||||
found type `String`
|
||||
|
||||
35
third-party/vendor/codespan-reporting/tests/snapshots/term__multifile__rich_ascii_no_color.snap
vendored
Normal file
35
third-party/vendor/codespan-reporting/tests/snapshots/term__multifile__rich_ascii_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error: unknown builtin: `NATRAL`
|
||||
--> Data/Nat.fun:7:13
|
||||
|
|
||||
7 | {-# BUILTIN NATRAL Nat #-}
|
||||
| ^^^^^^ unknown builtin
|
||||
|
|
||||
= there is a builtin with a similar name: `NATURAL`
|
||||
|
||||
warning: unused parameter pattern: `n₂`
|
||||
--> Data/Nat.fun:17:16
|
||||
|
|
||||
17 | zero - succ n₂ = zero
|
||||
| ^^ unused parameter
|
||||
|
|
||||
= consider using a wildcard pattern: `_`
|
||||
|
||||
error[E0001]: unexpected type in application of `_+_`
|
||||
--> Test.fun:4:11
|
||||
|
|
||||
4 | _ = 123 + "hello"
|
||||
| ^^^^^^^ expected `Nat`, found `String`
|
||||
|
|
||||
--> Data/Nat.fun:11:1
|
||||
|
|
||||
11 | _+_ : Nat → Nat → Nat
|
||||
| --------------------- based on the definition of `_+_`
|
||||
|
|
||||
= expected type `Nat`
|
||||
found type `String`
|
||||
|
||||
|
||||
35
third-party/vendor/codespan-reporting/tests/snapshots/term__multifile__rich_color.snap
vendored
Normal file
35
third-party/vendor/codespan-reporting/tests/snapshots/term__multifile__rich_color.snap
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
{fg:Red bold bright}error{bold bright}: unknown builtin: `NATRAL`{/}
|
||||
{fg:Blue}┌─{/} Data/Nat.fun:7:13
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}7{/} {fg:Blue}│{/} {-# BUILTIN {fg:Red}NATRAL{/} Nat #-}
|
||||
{fg:Blue}│{/} {fg:Red}^^^^^^{/} {fg:Red}unknown builtin{/}
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}={/} there is a builtin with a similar name: `NATURAL`
|
||||
|
||||
{fg:Yellow bold bright}warning{bold bright}: unused parameter pattern: `n₂`{/}
|
||||
{fg:Blue}┌─{/} Data/Nat.fun:17:16
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}17{/} {fg:Blue}│{/} zero - succ {fg:Yellow}n₂{/} = zero
|
||||
{fg:Blue}│{/} {fg:Yellow}^^{/} {fg:Yellow}unused parameter{/}
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}={/} consider using a wildcard pattern: `_`
|
||||
|
||||
{fg:Red bold bright}error[E0001]{bold bright}: unexpected type in application of `_+_`{/}
|
||||
{fg:Blue}┌─{/} Test.fun:4:11
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue} 4{/} {fg:Blue}│{/} _ = 123 + {fg:Red}"hello"{/}
|
||||
{fg:Blue}│{/} {fg:Red}^^^^^^^{/} {fg:Red}expected `Nat`, found `String`{/}
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}┌─{/} Data/Nat.fun:11:1
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}11{/} {fg:Blue}│{/} _+_ : Nat → Nat → Nat
|
||||
{fg:Blue}│{/} {fg:Blue}---------------------{/} {fg:Blue}based on the definition of `_+_`{/}
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}={/} expected type `Nat`
|
||||
found type `String`
|
||||
|
||||
|
||||
35
third-party/vendor/codespan-reporting/tests/snapshots/term__multifile__rich_no_color.snap
vendored
Normal file
35
third-party/vendor/codespan-reporting/tests/snapshots/term__multifile__rich_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error: unknown builtin: `NATRAL`
|
||||
┌─ Data/Nat.fun:7:13
|
||||
│
|
||||
7 │ {-# BUILTIN NATRAL Nat #-}
|
||||
│ ^^^^^^ unknown builtin
|
||||
│
|
||||
= there is a builtin with a similar name: `NATURAL`
|
||||
|
||||
warning: unused parameter pattern: `n₂`
|
||||
┌─ Data/Nat.fun:17:16
|
||||
│
|
||||
17 │ zero - succ n₂ = zero
|
||||
│ ^^ unused parameter
|
||||
│
|
||||
= consider using a wildcard pattern: `_`
|
||||
|
||||
error[E0001]: unexpected type in application of `_+_`
|
||||
┌─ Test.fun:4:11
|
||||
│
|
||||
4 │ _ = 123 + "hello"
|
||||
│ ^^^^^^^ expected `Nat`, found `String`
|
||||
│
|
||||
┌─ Data/Nat.fun:11:1
|
||||
│
|
||||
11 │ _+_ : Nat → Nat → Nat
|
||||
│ --------------------- based on the definition of `_+_`
|
||||
│
|
||||
= expected type `Nat`
|
||||
found type `String`
|
||||
|
||||
|
||||
8
third-party/vendor/codespan-reporting/tests/snapshots/term__multifile__short_color.snap
vendored
Normal file
8
third-party/vendor/codespan-reporting/tests/snapshots/term__multifile__short_color.snap
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
Data/Nat.fun:7:13: {fg:Red bold bright}error{bold bright}: unknown builtin: `NATRAL`{/}
|
||||
Data/Nat.fun:17:16: {fg:Yellow bold bright}warning{bold bright}: unused parameter pattern: `n₂`{/}
|
||||
Test.fun:4:11: {fg:Red bold bright}error[E0001]{bold bright}: unexpected type in application of `_+_`{/}
|
||||
|
||||
8
third-party/vendor/codespan-reporting/tests/snapshots/term__multifile__short_no_color.snap
vendored
Normal file
8
third-party/vendor/codespan-reporting/tests/snapshots/term__multifile__short_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
Data/Nat.fun:7:13: error: unknown builtin: `NATRAL`
|
||||
Data/Nat.fun:17:16: warning: unused parameter pattern: `n₂`
|
||||
Test.fun:4:11: error[E0001]: unexpected type in application of `_+_`
|
||||
|
||||
38
third-party/vendor/codespan-reporting/tests/snapshots/term__multiline_omit__rich_no_color.snap
vendored
Normal file
38
third-party/vendor/codespan-reporting/tests/snapshots/term__multiline_omit__rich_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error[empty_if]: empty elseif block
|
||||
┌─ empty_if_comments.lua:1:1
|
||||
│
|
||||
1 │ ╭ elseif 3 then
|
||||
2 │ │
|
||||
3 │ │ ╭
|
||||
4 │ │ │
|
||||
5 │ │ │
|
||||
· │ │
|
||||
8 │ │ │
|
||||
9 │ │ │
|
||||
│ │ ╰' content should be in here
|
||||
10 │ │ else
|
||||
│ ╰───^
|
||||
|
||||
error[E0308]: mismatched types
|
||||
┌─ src/lib.rs:2:6
|
||||
│
|
||||
2 │ 1
|
||||
│ ╭─────^
|
||||
3 │ │ + 1
|
||||
4 │ │ + 1
|
||||
· │
|
||||
7 │ │ +1
|
||||
│ │ - missing whitespace
|
||||
8 │ │ + 1
|
||||
9 │ │ + 1
|
||||
10 │ │ + 1
|
||||
│ ╰───────^ expected (), found integer
|
||||
│
|
||||
= note: expected type `()`
|
||||
found type `{integer}`
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
codespan/src/file.rs:4:34: {fg:Red bold bright}error[E0308]{bold bright}: match arms have incompatible types{/}
|
||||
{fg:Blue}={/} expected type `Result<ByteIndex, LineIndexOutOfBoundsError>`
|
||||
found type `LineIndexOutOfBoundsError`
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
codespan/src/file.rs:4:34: error[E0308]: match arms have incompatible types
|
||||
= expected type `Result<ByteIndex, LineIndexOutOfBoundsError>`
|
||||
found type `LineIndexOutOfBoundsError`
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error[E0308]: match arms have incompatible types
|
||||
--> codespan/src/file.rs:4:34
|
||||
|
|
||||
1 | / match line_index.compare(self.last_line_index()) {
|
||||
2 | | Ordering::Less => Ok(self.line_starts()[line_index.to_usize()]),
|
||||
| | --------------------------------------------- this is found to be of type `Result<ByteIndex, LineIndexOutOfBoundsError>`
|
||||
3 | | Ordering::Equal => Ok(self.source_span().end()),
|
||||
| | ---------------------------- this is found to be of type `Result<ByteIndex, LineIndexOutOfBoundsError>`
|
||||
4 | | Ordering::Greater => LineIndexOutOfBoundsError {
|
||||
| /-|----------------------------------^
|
||||
5 | | | given: line_index,
|
||||
6 | | | max: self.last_line_index(),
|
||||
7 | | | },
|
||||
| \-|-------------^ expected enum `Result`, found struct `LineIndexOutOfBoundsError`
|
||||
8 | | }
|
||||
| \---------' `match` arms have incompatible types
|
||||
|
|
||||
= expected type `Result<ByteIndex, LineIndexOutOfBoundsError>`
|
||||
found type `LineIndexOutOfBoundsError`
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
{fg:Red bold bright}error[E0308]{bold bright}: match arms have incompatible types{/}
|
||||
{fg:Blue}┌─{/} codespan/src/file.rs:4:34
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}1{/} {fg:Blue}│{/} {fg:Blue}╭{/} match line_index.compare(self.last_line_index()) {
|
||||
{fg:Blue}2{/} {fg:Blue}│{/} {fg:Blue}│{/} Ordering::Less => Ok(self.line_starts()[line_index.to_usize()]),
|
||||
{fg:Blue}│{/} {fg:Blue}│{/} {fg:Blue}---------------------------------------------{/} {fg:Blue}this is found to be of type `Result<ByteIndex, LineIndexOutOfBoundsError>`{/}
|
||||
{fg:Blue}3{/} {fg:Blue}│{/} {fg:Blue}│{/} Ordering::Equal => Ok(self.source_span().end()),
|
||||
{fg:Blue}│{/} {fg:Blue}│{/} {fg:Blue}----------------------------{/} {fg:Blue}this is found to be of type `Result<ByteIndex, LineIndexOutOfBoundsError>`{/}
|
||||
{fg:Blue}4{/} {fg:Blue}│{/} {fg:Blue}│{/} Ordering::Greater => {fg:Red}LineIndexOutOfBoundsError {{/}
|
||||
{fg:Blue}│{/} {fg:Red}╭{/}{fg:Red}─{/}{fg:Blue}│{/}{fg:Red}──────────────────────────────────^{/}
|
||||
{fg:Blue}5{/} {fg:Blue}│{/} {fg:Red}│{/} {fg:Blue}│{/} {fg:Red} given: line_index,{/}
|
||||
{fg:Blue}6{/} {fg:Blue}│{/} {fg:Red}│{/} {fg:Blue}│{/} {fg:Red} max: self.last_line_index(),{/}
|
||||
{fg:Blue}7{/} {fg:Blue}│{/} {fg:Red}│{/} {fg:Blue}│{/} {fg:Red} }{/},
|
||||
{fg:Blue}│{/} {fg:Red}╰{/}{fg:Red}─{/}{fg:Blue}│{/}{fg:Red}─────────────^ expected enum `Result`, found struct `LineIndexOutOfBoundsError`{/}
|
||||
{fg:Blue}8{/} {fg:Blue}│{/} {fg:Blue}│{/} }
|
||||
{fg:Blue}│{/} {fg:Blue}╰{/}{fg:Blue}─────────' `match` arms have incompatible types{/}
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}={/} expected type `Result<ByteIndex, LineIndexOutOfBoundsError>`
|
||||
found type `LineIndexOutOfBoundsError`
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error[E0308]: match arms have incompatible types
|
||||
┌─ codespan/src/file.rs:4:34
|
||||
│
|
||||
1 │ ╭ match line_index.compare(self.last_line_index()) {
|
||||
2 │ │ Ordering::Less => Ok(self.line_starts()[line_index.to_usize()]),
|
||||
│ │ --------------------------------------------- this is found to be of type `Result<ByteIndex, LineIndexOutOfBoundsError>`
|
||||
3 │ │ Ordering::Equal => Ok(self.source_span().end()),
|
||||
│ │ ---------------------------- this is found to be of type `Result<ByteIndex, LineIndexOutOfBoundsError>`
|
||||
4 │ │ Ordering::Greater => LineIndexOutOfBoundsError {
|
||||
│ ╭─│──────────────────────────────────^
|
||||
5 │ │ │ given: line_index,
|
||||
6 │ │ │ max: self.last_line_index(),
|
||||
7 │ │ │ },
|
||||
│ ╰─│─────────────^ expected enum `Result`, found struct `LineIndexOutOfBoundsError`
|
||||
8 │ │ }
|
||||
│ ╰─────────' `match` arms have incompatible types
|
||||
│
|
||||
= expected type `Result<ByteIndex, LineIndexOutOfBoundsError>`
|
||||
found type `LineIndexOutOfBoundsError`
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
codespan/src/file.rs:4:34: {fg:Red bold bright}error[E0308]{bold bright}: match arms have incompatible types{/}
|
||||
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
codespan/src/file.rs:4:34: error[E0308]: match arms have incompatible types
|
||||
|
||||
17
third-party/vendor/codespan-reporting/tests/snapshots/term__overlapping__medium_color.snap
vendored
Normal file
17
third-party/vendor/codespan-reporting/tests/snapshots/term__overlapping__medium_color.snap
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
nested_impl_trait.rs:5:56: {fg:Red bold bright}error[E0666]{bold bright}: nested `impl Trait` is not allowed{/}
|
||||
typeck_type_placeholder_item.rs:1:18: {fg:Red bold bright}error[E0121]{bold bright}: the type placeholder `_` is not allowed within types on item signatures{/}
|
||||
typeck_type_placeholder_item.rs:2:25: {fg:Red bold bright}error[E0121]{bold bright}: the type placeholder `_` is not allowed within types on item signatures{/}
|
||||
typeck_type_placeholder_item.rs:2:28: {fg:Red bold bright}error[E0121]{bold bright}: the type placeholder `_` is not allowed within types on item signatures{/}
|
||||
no_send_res_ports.rs:25:5: {fg:Red bold bright}error[E0277]{bold bright}: `std::rc::Rc<()>` cannot be sent between threads safely{/}
|
||||
{fg:Blue}={/} help: within `[closure@no_send_res_ports.rs:29:19: 33:6 x:main::Foo]`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>`
|
||||
{fg:Blue}={/} note: required because it appears within the type `Port<()>`
|
||||
{fg:Blue}={/} note: required because it appears within the type `main::Foo`
|
||||
{fg:Blue}={/} note: required because it appears within the type `[closure@no_send_res_ports.rs:29:19: 33:6 x:main::Foo]`
|
||||
{fg:Red bold bright}error{bold bright}: aborting due 5 previous errors{/}
|
||||
{fg:Blue}={/} Some errors have detailed explanations: E0121, E0277, E0666.
|
||||
{fg:Blue}={/} For more information about an error, try `rustc --explain E0121`.
|
||||
|
||||
17
third-party/vendor/codespan-reporting/tests/snapshots/term__overlapping__medium_no_color.snap
vendored
Normal file
17
third-party/vendor/codespan-reporting/tests/snapshots/term__overlapping__medium_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
nested_impl_trait.rs:5:56: error[E0666]: nested `impl Trait` is not allowed
|
||||
typeck_type_placeholder_item.rs:1:18: error[E0121]: the type placeholder `_` is not allowed within types on item signatures
|
||||
typeck_type_placeholder_item.rs:2:25: error[E0121]: the type placeholder `_` is not allowed within types on item signatures
|
||||
typeck_type_placeholder_item.rs:2:28: error[E0121]: the type placeholder `_` is not allowed within types on item signatures
|
||||
no_send_res_ports.rs:25:5: error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely
|
||||
= help: within `[closure@no_send_res_ports.rs:29:19: 33:6 x:main::Foo]`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>`
|
||||
= note: required because it appears within the type `Port<()>`
|
||||
= note: required because it appears within the type `main::Foo`
|
||||
= note: required because it appears within the type `[closure@no_send_res_ports.rs:29:19: 33:6 x:main::Foo]`
|
||||
error: aborting due 5 previous errors
|
||||
= Some errors have detailed explanations: E0121, E0277, E0666.
|
||||
= For more information about an error, try `rustc --explain E0121`.
|
||||
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error[E0666]: nested `impl Trait` is not allowed
|
||||
--> nested_impl_trait.rs:5:56
|
||||
|
|
||||
5 | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
|
||||
| ----------^^^^^^^^^^-
|
||||
| | |
|
||||
| | nested `impl Trait` here
|
||||
| outer `impl Trait`
|
||||
|
||||
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
|
||||
--> typeck_type_placeholder_item.rs:1:18
|
||||
|
|
||||
1 | fn fn_test1() -> _ { 5 }
|
||||
| ^
|
||||
| |
|
||||
| not allowed in type signatures
|
||||
| help: replace with the correct return type: `i32`
|
||||
|
||||
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
|
||||
--> typeck_type_placeholder_item.rs:2:25
|
||||
|
|
||||
2 | fn fn_test2(x: i32) -> (_, _) { (x, x) }
|
||||
| -^--^-
|
||||
| || |
|
||||
| || not allowed in type signatures
|
||||
| |not allowed in type signatures
|
||||
| help: replace with the correct return type: `(i32, i32)`
|
||||
|
||||
error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely
|
||||
--> no_send_res_ports.rs:25:5
|
||||
|
|
||||
25 | thread::spawn(move|| {
|
||||
| ^^^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely
|
||||
| /-------------------'
|
||||
26 | | let y = x;
|
||||
27 | | println!("{:?}", y);
|
||||
28 | | });
|
||||
| \------' within this `[closure@no_send_res_ports.rs:29:19: 33:6 x:main::Foo]`
|
||||
|
|
||||
--> libstd/thread/mod.rs:5:8
|
||||
|
|
||||
5 | F: Send + 'static,
|
||||
| ---- required by this bound in `std::thread::spawn`
|
||||
|
|
||||
= help: within `[closure@no_send_res_ports.rs:29:19: 33:6 x:main::Foo]`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>`
|
||||
= note: required because it appears within the type `Port<()>`
|
||||
= note: required because it appears within the type `main::Foo`
|
||||
= note: required because it appears within the type `[closure@no_send_res_ports.rs:29:19: 33:6 x:main::Foo]`
|
||||
|
||||
error: aborting due 5 previous errors
|
||||
= Some errors have detailed explanations: E0121, E0277, E0666.
|
||||
= For more information about an error, try `rustc --explain E0121`.
|
||||
|
||||
|
||||
58
third-party/vendor/codespan-reporting/tests/snapshots/term__overlapping__rich_color.snap
vendored
Normal file
58
third-party/vendor/codespan-reporting/tests/snapshots/term__overlapping__rich_color.snap
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
{fg:Red bold bright}error[E0666]{bold bright}: nested `impl Trait` is not allowed{/}
|
||||
{fg:Blue}┌─{/} nested_impl_trait.rs:5:56
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}5{/} {fg:Blue}│{/} fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<{fg:Red}impl Debug{/}> { x }
|
||||
{fg:Blue}│{/} {fg:Blue}----------{fg:Red}^^^^^^^^^^{fg:Blue}-{/}
|
||||
{fg:Blue}│{/} {fg:Blue}│{/} {fg:Red}│{/}
|
||||
{fg:Blue}│{/} {fg:Blue}│{/} {fg:Red}nested `impl Trait` here{/}
|
||||
{fg:Blue}│{/} {fg:Blue}outer `impl Trait`{/}
|
||||
|
||||
{fg:Red bold bright}error[E0121]{bold bright}: the type placeholder `_` is not allowed within types on item signatures{/}
|
||||
{fg:Blue}┌─{/} typeck_type_placeholder_item.rs:1:18
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}1{/} {fg:Blue}│{/} fn fn_test1() -> {fg:Red}_{/} { 5 }
|
||||
{fg:Blue}│{/} {fg:Red}^{/}
|
||||
{fg:Blue}│{/} {fg:Red}│{/}
|
||||
{fg:Blue}│{/} {fg:Red}not allowed in type signatures{/}
|
||||
{fg:Blue}│{/} {fg:Blue}help: replace with the correct return type: `i32`{/}
|
||||
|
||||
{fg:Red bold bright}error[E0121]{bold bright}: the type placeholder `_` is not allowed within types on item signatures{/}
|
||||
{fg:Blue}┌─{/} typeck_type_placeholder_item.rs:2:25
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}2{/} {fg:Blue}│{/} fn fn_test2(x: i32) -> ({fg:Red}_{/}, {fg:Red}_{/}) { (x, x) }
|
||||
{fg:Blue}│{/} {fg:Blue}-{fg:Red}^{fg:Blue}--{fg:Red}^{fg:Blue}-{/}
|
||||
{fg:Blue}│{/} {fg:Blue}│{/}{fg:Red}│{/} {fg:Red}│{/}
|
||||
{fg:Blue}│{/} {fg:Blue}│{/}{fg:Red}│{/} {fg:Red}not allowed in type signatures{/}
|
||||
{fg:Blue}│{/} {fg:Blue}│{/}{fg:Red}not allowed in type signatures{/}
|
||||
{fg:Blue}│{/} {fg:Blue}help: replace with the correct return type: `(i32, i32)`{/}
|
||||
|
||||
{fg:Red bold bright}error[E0277]{bold bright}: `std::rc::Rc<()>` cannot be sent between threads safely{/}
|
||||
{fg:Blue}┌─{/} no_send_res_ports.rs:25:5
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}25{/} {fg:Blue}│{/} {fg:Red}thread::spawn{/}(move|| {
|
||||
{fg:Blue}│{/} {fg:Red}^^^^^^^^^^^^^{/} {fg:Red}`std::rc::Rc<()>` cannot be sent between threads safely{/}
|
||||
{fg:Blue}│{/} {fg:Blue}╭{/}{fg:Blue}───────────────────'{/}
|
||||
{fg:Blue}26{/} {fg:Blue}│{/} {fg:Blue}│{/} let y = x;
|
||||
{fg:Blue}27{/} {fg:Blue}│{/} {fg:Blue}│{/} println!("{:?}", y);
|
||||
{fg:Blue}28{/} {fg:Blue}│{/} {fg:Blue}│{/} });
|
||||
{fg:Blue}│{/} {fg:Blue}╰{/}{fg:Blue}──────' within this `[closure@no_send_res_ports.rs:29:19: 33:6 x:main::Foo]`{/}
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}┌─{/} libstd/thread/mod.rs:5:8
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue} 5{/} {fg:Blue}│{/} F: Send + 'static,
|
||||
{fg:Blue}│{/} {fg:Blue}----{/} {fg:Blue}required by this bound in `std::thread::spawn`{/}
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}={/} help: within `[closure@no_send_res_ports.rs:29:19: 33:6 x:main::Foo]`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>`
|
||||
{fg:Blue}={/} note: required because it appears within the type `Port<()>`
|
||||
{fg:Blue}={/} note: required because it appears within the type `main::Foo`
|
||||
{fg:Blue}={/} note: required because it appears within the type `[closure@no_send_res_ports.rs:29:19: 33:6 x:main::Foo]`
|
||||
|
||||
{fg:Red bold bright}error{bold bright}: aborting due 5 previous errors{/}
|
||||
{fg:Blue}={/} Some errors have detailed explanations: E0121, E0277, E0666.
|
||||
{fg:Blue}={/} For more information about an error, try `rustc --explain E0121`.
|
||||
|
||||
|
||||
58
third-party/vendor/codespan-reporting/tests/snapshots/term__overlapping__rich_no_color.snap
vendored
Normal file
58
third-party/vendor/codespan-reporting/tests/snapshots/term__overlapping__rich_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error[E0666]: nested `impl Trait` is not allowed
|
||||
┌─ nested_impl_trait.rs:5:56
|
||||
│
|
||||
5 │ fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
|
||||
│ ----------^^^^^^^^^^-
|
||||
│ │ │
|
||||
│ │ nested `impl Trait` here
|
||||
│ outer `impl Trait`
|
||||
|
||||
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
|
||||
┌─ typeck_type_placeholder_item.rs:1:18
|
||||
│
|
||||
1 │ fn fn_test1() -> _ { 5 }
|
||||
│ ^
|
||||
│ │
|
||||
│ not allowed in type signatures
|
||||
│ help: replace with the correct return type: `i32`
|
||||
|
||||
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
|
||||
┌─ typeck_type_placeholder_item.rs:2:25
|
||||
│
|
||||
2 │ fn fn_test2(x: i32) -> (_, _) { (x, x) }
|
||||
│ -^--^-
|
||||
│ ││ │
|
||||
│ ││ not allowed in type signatures
|
||||
│ │not allowed in type signatures
|
||||
│ help: replace with the correct return type: `(i32, i32)`
|
||||
|
||||
error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely
|
||||
┌─ no_send_res_ports.rs:25:5
|
||||
│
|
||||
25 │ thread::spawn(move|| {
|
||||
│ ^^^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely
|
||||
│ ╭───────────────────'
|
||||
26 │ │ let y = x;
|
||||
27 │ │ println!("{:?}", y);
|
||||
28 │ │ });
|
||||
│ ╰──────' within this `[closure@no_send_res_ports.rs:29:19: 33:6 x:main::Foo]`
|
||||
│
|
||||
┌─ libstd/thread/mod.rs:5:8
|
||||
│
|
||||
5 │ F: Send + 'static,
|
||||
│ ---- required by this bound in `std::thread::spawn`
|
||||
│
|
||||
= help: within `[closure@no_send_res_ports.rs:29:19: 33:6 x:main::Foo]`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>`
|
||||
= note: required because it appears within the type `Port<()>`
|
||||
= note: required because it appears within the type `main::Foo`
|
||||
= note: required because it appears within the type `[closure@no_send_res_ports.rs:29:19: 33:6 x:main::Foo]`
|
||||
|
||||
error: aborting due 5 previous errors
|
||||
= Some errors have detailed explanations: E0121, E0277, E0666.
|
||||
= For more information about an error, try `rustc --explain E0121`.
|
||||
|
||||
|
||||
11
third-party/vendor/codespan-reporting/tests/snapshots/term__overlapping__short_color.snap
vendored
Normal file
11
third-party/vendor/codespan-reporting/tests/snapshots/term__overlapping__short_color.snap
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
nested_impl_trait.rs:5:56: {fg:Red bold bright}error[E0666]{bold bright}: nested `impl Trait` is not allowed{/}
|
||||
typeck_type_placeholder_item.rs:1:18: {fg:Red bold bright}error[E0121]{bold bright}: the type placeholder `_` is not allowed within types on item signatures{/}
|
||||
typeck_type_placeholder_item.rs:2:25: {fg:Red bold bright}error[E0121]{bold bright}: the type placeholder `_` is not allowed within types on item signatures{/}
|
||||
typeck_type_placeholder_item.rs:2:28: {fg:Red bold bright}error[E0121]{bold bright}: the type placeholder `_` is not allowed within types on item signatures{/}
|
||||
no_send_res_ports.rs:25:5: {fg:Red bold bright}error[E0277]{bold bright}: `std::rc::Rc<()>` cannot be sent between threads safely{/}
|
||||
{fg:Red bold bright}error{bold bright}: aborting due 5 previous errors{/}
|
||||
|
||||
11
third-party/vendor/codespan-reporting/tests/snapshots/term__overlapping__short_no_color.snap
vendored
Normal file
11
third-party/vendor/codespan-reporting/tests/snapshots/term__overlapping__short_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
nested_impl_trait.rs:5:56: error[E0666]: nested `impl Trait` is not allowed
|
||||
typeck_type_placeholder_item.rs:1:18: error[E0121]: the type placeholder `_` is not allowed within types on item signatures
|
||||
typeck_type_placeholder_item.rs:2:25: error[E0121]: the type placeholder `_` is not allowed within types on item signatures
|
||||
typeck_type_placeholder_item.rs:2:28: error[E0121]: the type placeholder `_` is not allowed within types on item signatures
|
||||
no_send_res_ports.rs:25:5: error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely
|
||||
error: aborting due 5 previous errors
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
tests/main.js:4:3: warning[ParserWarning]: The strict mode declaration in the body of function `foo` is redundant, as the outer scope is already in strict mode
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
warning[ParserWarning]: The strict mode declaration in the body of function `foo` is redundant, as the outer scope is already in strict mode
|
||||
--> tests/main.js:4:3
|
||||
|
|
||||
1 | "use strict";
|
||||
| ------------ Strict mode is first declared here
|
||||
.
|
||||
4 | "use strict";
|
||||
| ^^^^^^^^^^^^ This strict mode declaration is redundant
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
warning[ParserWarning]: The strict mode declaration in the body of function `foo` is redundant, as the outer scope is already in strict mode
|
||||
┌─ tests/main.js:4:3
|
||||
│
|
||||
1 │ "use strict";
|
||||
│ ------------ Strict mode is first declared here
|
||||
·
|
||||
4 │ "use strict";
|
||||
│ ^^^^^^^^^^^^ This strict mode declaration is redundant
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
tests/main.js:4:3: warning[ParserWarning]: The strict mode declaration in the body of function `foo` is redundant, as the outer scope is already in strict mode
|
||||
|
||||
8
third-party/vendor/codespan-reporting/tests/snapshots/term__same_line__medium_color.snap
vendored
Normal file
8
third-party/vendor/codespan-reporting/tests/snapshots/term__same_line__medium_color.snap
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
one_line.rs:3:12: {fg:Red bold bright}error[E0499]{bold bright}: cannot borrow `v` as mutable more than once at a time{/}
|
||||
{fg:Red bold bright}error{bold bright}: aborting due to previous error{/}
|
||||
{fg:Blue}={/} For more information about this error, try `rustc --explain E0499`.
|
||||
|
||||
8
third-party/vendor/codespan-reporting/tests/snapshots/term__same_line__medium_no_color.snap
vendored
Normal file
8
third-party/vendor/codespan-reporting/tests/snapshots/term__same_line__medium_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
one_line.rs:3:12: error[E0499]: cannot borrow `v` as mutable more than once at a time
|
||||
error: aborting due to previous error
|
||||
= For more information about this error, try `rustc --explain E0499`.
|
||||
|
||||
17
third-party/vendor/codespan-reporting/tests/snapshots/term__same_line__rich_ascii_no_color.snap
vendored
Normal file
17
third-party/vendor/codespan-reporting/tests/snapshots/term__same_line__rich_ascii_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error[E0499]: cannot borrow `v` as mutable more than once at a time
|
||||
--> one_line.rs:3:12
|
||||
|
|
||||
3 | v.push(v.pop().unwrap());
|
||||
| - ---- ^ second mutable borrow occurs here
|
||||
| | |
|
||||
| | first mutable borrow occurs here
|
||||
| first borrow later used by call
|
||||
|
||||
error: aborting due to previous error
|
||||
= For more information about this error, try `rustc --explain E0499`.
|
||||
|
||||
|
||||
17
third-party/vendor/codespan-reporting/tests/snapshots/term__same_line__rich_color.snap
vendored
Normal file
17
third-party/vendor/codespan-reporting/tests/snapshots/term__same_line__rich_color.snap
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
{fg:Red bold bright}error[E0499]{bold bright}: cannot borrow `v` as mutable more than once at a time{/}
|
||||
{fg:Blue}┌─{/} one_line.rs:3:12
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}3{/} {fg:Blue}│{/} v.push({fg:Red}v{/}.pop().unwrap());
|
||||
{fg:Blue}│{/} {fg:Blue}-{/} {fg:Blue}----{/} {fg:Red}^{/} {fg:Red}second mutable borrow occurs here{/}
|
||||
{fg:Blue}│{/} {fg:Blue}│{/} {fg:Blue}│{/}
|
||||
{fg:Blue}│{/} {fg:Blue}│{/} {fg:Blue}first mutable borrow occurs here{/}
|
||||
{fg:Blue}│{/} {fg:Blue}first borrow later used by call{/}
|
||||
|
||||
{fg:Red bold bright}error{bold bright}: aborting due to previous error{/}
|
||||
{fg:Blue}={/} For more information about this error, try `rustc --explain E0499`.
|
||||
|
||||
|
||||
17
third-party/vendor/codespan-reporting/tests/snapshots/term__same_line__rich_no_color.snap
vendored
Normal file
17
third-party/vendor/codespan-reporting/tests/snapshots/term__same_line__rich_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error[E0499]: cannot borrow `v` as mutable more than once at a time
|
||||
┌─ one_line.rs:3:12
|
||||
│
|
||||
3 │ v.push(v.pop().unwrap());
|
||||
│ - ---- ^ second mutable borrow occurs here
|
||||
│ │ │
|
||||
│ │ first mutable borrow occurs here
|
||||
│ first borrow later used by call
|
||||
|
||||
error: aborting due to previous error
|
||||
= For more information about this error, try `rustc --explain E0499`.
|
||||
|
||||
|
||||
7
third-party/vendor/codespan-reporting/tests/snapshots/term__same_line__short_color.snap
vendored
Normal file
7
third-party/vendor/codespan-reporting/tests/snapshots/term__same_line__short_color.snap
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
one_line.rs:3:12: {fg:Red bold bright}error[E0499]{bold bright}: cannot borrow `v` as mutable more than once at a time{/}
|
||||
{fg:Red bold bright}error{bold bright}: aborting due to previous error{/}
|
||||
|
||||
7
third-party/vendor/codespan-reporting/tests/snapshots/term__same_line__short_no_color.snap
vendored
Normal file
7
third-party/vendor/codespan-reporting/tests/snapshots/term__same_line__short_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
one_line.rs:3:12: error[E0499]: cannot borrow `v` as mutable more than once at a time
|
||||
error: aborting due to previous error
|
||||
|
||||
7
third-party/vendor/codespan-reporting/tests/snapshots/term__same_ranges__medium_color.snap
vendored
Normal file
7
third-party/vendor/codespan-reporting/tests/snapshots/term__same_ranges__medium_color.snap
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
same_range:1:5: {fg:Red bold bright}error{bold bright}: Unexpected token{/}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
same_range:1:5: error: Unexpected token
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error: Unexpected token
|
||||
--> same_range:1:5
|
||||
|
|
||||
1 | ::S { }
|
||||
| ^
|
||||
| |
|
||||
| Unexpected '{'
|
||||
| Expected '('
|
||||
|
||||
|
||||
14
third-party/vendor/codespan-reporting/tests/snapshots/term__same_ranges__rich_color.snap
vendored
Normal file
14
third-party/vendor/codespan-reporting/tests/snapshots/term__same_ranges__rich_color.snap
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
{fg:Red bold bright}error{bold bright}: Unexpected token{/}
|
||||
{fg:Blue}┌─{/} same_range:1:5
|
||||
{fg:Blue}│{/}
|
||||
{fg:Blue}1{/} {fg:Blue}│{/} ::S {fg:Red}{{/} }
|
||||
{fg:Blue}│{/} {fg:Red}^{/}
|
||||
{fg:Blue}│{/} {fg:Red}│{/}
|
||||
{fg:Blue}│{/} {fg:Red}Unexpected '{'{/}
|
||||
{fg:Blue}│{/} {fg:Blue}Expected '('{/}
|
||||
|
||||
|
||||
14
third-party/vendor/codespan-reporting/tests/snapshots/term__same_ranges__rich_no_color.snap
vendored
Normal file
14
third-party/vendor/codespan-reporting/tests/snapshots/term__same_ranges__rich_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error: Unexpected token
|
||||
┌─ same_range:1:5
|
||||
│
|
||||
1 │ ::S { }
|
||||
│ ^
|
||||
│ │
|
||||
│ Unexpected '{'
|
||||
│ Expected '('
|
||||
|
||||
|
||||
6
third-party/vendor/codespan-reporting/tests/snapshots/term__same_ranges__short_color.snap
vendored
Normal file
6
third-party/vendor/codespan-reporting/tests/snapshots/term__same_ranges__short_color.snap
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_color(&config)
|
||||
---
|
||||
same_range:1:5: {fg:Red bold bright}error{bold bright}: Unexpected token{/}
|
||||
|
||||
6
third-party/vendor/codespan-reporting/tests/snapshots/term__same_ranges__short_no_color.snap
vendored
Normal file
6
third-party/vendor/codespan-reporting/tests/snapshots/term__same_ranges__short_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
same_range:1:5: error: Unexpected token
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
warning: tab test
|
||||
┌─ tab_columns:1:2
|
||||
│
|
||||
1 │ hello
|
||||
│ ^^^^^
|
||||
2 │ ∙ hello
|
||||
│ ^^^^^
|
||||
3 │ ∙∙ hello
|
||||
│ ^^^^^
|
||||
4 │ ∙∙∙ hello
|
||||
│ ^^^^^
|
||||
5 │ ∙∙∙∙ hello
|
||||
│ ^^^^^
|
||||
6 │ ∙∙∙∙∙ hello
|
||||
│ ^^^^^
|
||||
7 │ ∙∙∙∙∙∙ hello
|
||||
│ ^^^^^
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
warning: tab test
|
||||
┌─ tab_columns:1:2
|
||||
│
|
||||
1 │ hello
|
||||
│ ^^^^^
|
||||
2 │ ∙ hello
|
||||
│ ^^^^^
|
||||
3 │ ∙∙ hello
|
||||
│ ^^^^^
|
||||
4 │ ∙∙∙ hello
|
||||
│ ^^^^^
|
||||
5 │ ∙∙∙∙ hello
|
||||
│ ^^^^^
|
||||
6 │ ∙∙∙∙∙ hello
|
||||
│ ^^^^^
|
||||
7 │ ∙∙∙∙∙∙ hello
|
||||
│ ^^^^^
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
warning: tab test
|
||||
┌─ tab_columns:1:2
|
||||
│
|
||||
1 │ hello
|
||||
│ ^^^^^
|
||||
2 │ ∙ hello
|
||||
│ ^^^^^
|
||||
3 │ ∙∙ hello
|
||||
│ ^^^^^
|
||||
4 │ ∙∙∙ hello
|
||||
│ ^^^^^
|
||||
5 │ ∙∙∙∙ hello
|
||||
│ ^^^^^
|
||||
6 │ ∙∙∙∙∙ hello
|
||||
│ ^^^^^
|
||||
7 │ ∙∙∙∙∙∙ hello
|
||||
│ ^^^^^
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
warning: tab test
|
||||
┌─ tab_columns:1:2
|
||||
│
|
||||
1 │ hello
|
||||
│ ^^^^^
|
||||
2 │ ∙ hello
|
||||
│ ^^^^^
|
||||
3 │ ∙∙ hello
|
||||
│ ^^^^^
|
||||
4 │ ∙∙∙ hello
|
||||
│ ^^^^^
|
||||
5 │ ∙∙∙∙ hello
|
||||
│ ^^^^^
|
||||
6 │ ∙∙∙∙∙ hello
|
||||
│ ^^^^^
|
||||
7 │ ∙∙∙∙∙∙ hello
|
||||
│ ^^^^^
|
||||
|
||||
|
||||
23
third-party/vendor/codespan-reporting/tests/snapshots/term__tabbed__tab_width_3_no_color.snap
vendored
Normal file
23
third-party/vendor/codespan-reporting/tests/snapshots/term__tabbed__tab_width_3_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
warning: unknown weapon `DogJaw`
|
||||
┌─ tabbed:3:11
|
||||
│
|
||||
3 │ Weapon: DogJaw
|
||||
│ ^^^^^^ the weapon
|
||||
|
||||
warning: unknown condition `attack-cooldown`
|
||||
┌─ tabbed:4:23
|
||||
│
|
||||
4 │ ReloadingCondition: attack-cooldown
|
||||
│ ^^^^^^^^^^^^^^^ the condition
|
||||
|
||||
warning: unknown field `Foo`
|
||||
┌─ tabbed:5:2
|
||||
│
|
||||
5 │ Foo: Bar
|
||||
│ ^^^ the field
|
||||
|
||||
|
||||
23
third-party/vendor/codespan-reporting/tests/snapshots/term__tabbed__tab_width_6_no_color.snap
vendored
Normal file
23
third-party/vendor/codespan-reporting/tests/snapshots/term__tabbed__tab_width_6_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
warning: unknown weapon `DogJaw`
|
||||
┌─ tabbed:3:11
|
||||
│
|
||||
3 │ Weapon: DogJaw
|
||||
│ ^^^^^^ the weapon
|
||||
|
||||
warning: unknown condition `attack-cooldown`
|
||||
┌─ tabbed:4:23
|
||||
│
|
||||
4 │ ReloadingCondition: attack-cooldown
|
||||
│ ^^^^^^^^^^^^^^^ the condition
|
||||
|
||||
warning: unknown field `Foo`
|
||||
┌─ tabbed:5:2
|
||||
│
|
||||
5 │ Foo: Bar
|
||||
│ ^^^ the field
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
warning: unknown weapon `DogJaw`
|
||||
┌─ tabbed:3:11
|
||||
│
|
||||
3 │ Weapon: DogJaw
|
||||
│ ^^^^^^ the weapon
|
||||
|
||||
warning: unknown condition `attack-cooldown`
|
||||
┌─ tabbed:4:23
|
||||
│
|
||||
4 │ ReloadingCondition: attack-cooldown
|
||||
│ ^^^^^^^^^^^^^^^ the condition
|
||||
|
||||
warning: unknown field `Foo`
|
||||
┌─ tabbed:5:2
|
||||
│
|
||||
5 │ Foo: Bar
|
||||
│ ^^^ the field
|
||||
|
||||
|
||||
29
third-party/vendor/codespan-reporting/tests/snapshots/term__unicode__medium_no_color.snap
vendored
Normal file
29
third-party/vendor/codespan-reporting/tests/snapshots/term__unicode__medium_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
unicode.rs:1:8: error[E0703]: invalid ABI: found `路濫狼á́́`
|
||||
= valid ABIs:
|
||||
- aapcs
|
||||
- amdgpu-kernel
|
||||
- C
|
||||
- cdecl
|
||||
- efiapi
|
||||
- fastcall
|
||||
- msp430-interrupt
|
||||
- platform-intrinsic
|
||||
- ptx-kernel
|
||||
- Rust
|
||||
- rust-call
|
||||
- rust-intrinsic
|
||||
- stdcall
|
||||
- system
|
||||
- sysv64
|
||||
- thiscall
|
||||
- unadjusted
|
||||
- vectorcall
|
||||
- win64
|
||||
- x86-interrupt
|
||||
error: aborting due to previous error
|
||||
= For more information about this error, try `rustc --explain E0703`.
|
||||
|
||||
36
third-party/vendor/codespan-reporting/tests/snapshots/term__unicode__rich_no_color.snap
vendored
Normal file
36
third-party/vendor/codespan-reporting/tests/snapshots/term__unicode__rich_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error[E0703]: invalid ABI: found `路濫狼á́́`
|
||||
┌─ unicode.rs:1:8
|
||||
│
|
||||
1 │ extern "路濫狼á́́" fn foo() {}
|
||||
│ ^^^^^^^^^ invalid ABI
|
||||
│
|
||||
= valid ABIs:
|
||||
- aapcs
|
||||
- amdgpu-kernel
|
||||
- C
|
||||
- cdecl
|
||||
- efiapi
|
||||
- fastcall
|
||||
- msp430-interrupt
|
||||
- platform-intrinsic
|
||||
- ptx-kernel
|
||||
- Rust
|
||||
- rust-call
|
||||
- rust-intrinsic
|
||||
- stdcall
|
||||
- system
|
||||
- sysv64
|
||||
- thiscall
|
||||
- unadjusted
|
||||
- vectorcall
|
||||
- win64
|
||||
- x86-interrupt
|
||||
|
||||
error: aborting due to previous error
|
||||
= For more information about this error, try `rustc --explain E0703`.
|
||||
|
||||
|
||||
7
third-party/vendor/codespan-reporting/tests/snapshots/term__unicode__short_no_color.snap
vendored
Normal file
7
third-party/vendor/codespan-reporting/tests/snapshots/term__unicode__short_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
unicode.rs:1:8: error[E0703]: invalid ABI: found `路濫狼á́́`
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
moon_jump.rs:1:1: error[E01]: cow may not jump during new moon.
|
||||
note: invalid unicode range
|
||||
note: invalid unicode range
|
||||
note: invalid unicode range
|
||||
|
||||
29
third-party/vendor/codespan-reporting/tests/snapshots/term__unicode_spans__rich_no_color.snap
vendored
Normal file
29
third-party/vendor/codespan-reporting/tests/snapshots/term__unicode_spans__rich_no_color.snap
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error[E01]: cow may not jump during new moon.
|
||||
┌─ moon_jump.rs:1:1
|
||||
│
|
||||
1 │ 🐄🌑🐄🌒🐄🌓🐄🌔🐄🌕🐄🌖🐄🌗🐄🌘🐄
|
||||
│ ^^ Invalid jump
|
||||
|
||||
note: invalid unicode range
|
||||
┌─ moon_jump.rs:1:1
|
||||
│
|
||||
1 │ 🐄🌑🐄🌒🐄🌓🐄🌔🐄🌕🐄🌖🐄🌗🐄🌘🐄
|
||||
│ -- Cow range does not start at boundary.
|
||||
|
||||
note: invalid unicode range
|
||||
┌─ moon_jump.rs:1:3
|
||||
│
|
||||
1 │ 🐄🌑🐄🌒🐄🌓🐄🌔🐄🌕🐄🌖🐄🌗🐄🌘🐄
|
||||
│ -- Cow range does not end at boundary.
|
||||
|
||||
note: invalid unicode range
|
||||
┌─ moon_jump.rs:1:1
|
||||
│
|
||||
1 │ 🐄🌑🐄🌒🐄🌓🐄🌔🐄🌕🐄🌖🐄🌗🐄🌘🐄
|
||||
│ ------ Cow does not start or end at boundary.
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
moon_jump.rs:1:1: error[E01]: cow may not jump during new moon.
|
||||
note: invalid unicode range
|
||||
note: invalid unicode range
|
||||
note: invalid unicode range
|
||||
|
||||
137
third-party/vendor/codespan-reporting/tests/support/color_buffer.rs
vendored
Normal file
137
third-party/vendor/codespan-reporting/tests/support/color_buffer.rs
vendored
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
use std::io;
|
||||
use std::io::prelude::*;
|
||||
use termcolor::{ColorSpec, WriteColor};
|
||||
|
||||
// Color tester from:
|
||||
// https://github.com/wycats/language-reporting/blob/b021c87e0d4916b5f32756151bf215c220eee52d/crates/render-tree/src/stylesheet/accumulator.rs
|
||||
|
||||
/// A facility for creating visually inspectable representations of colored output
|
||||
/// so they can be easily tested.
|
||||
///
|
||||
/// A new color is represented as `{style}` and a reset is represented by `{/}`.
|
||||
///
|
||||
/// Attributes are printed in this order:
|
||||
///
|
||||
/// - Foreground color as `fg:Color`
|
||||
/// - Background color as `bg:Color`
|
||||
/// - Bold as `bold`
|
||||
/// - Underline as `underline`
|
||||
/// - Intense as `bright`
|
||||
///
|
||||
/// For example, the style "intense, bold red foreground" would be printed as:
|
||||
///
|
||||
/// ```text
|
||||
/// {fg:Red bold intense}
|
||||
/// ```
|
||||
///
|
||||
/// Since this implementation attempts to make it possible to faithfully
|
||||
/// understand what real WriteColor implementations would do, it tries
|
||||
/// to approximate the contract in the WriteColor trait: "Subsequent
|
||||
/// writes to this write will use these settings until either reset is
|
||||
/// called or new color settings are set.")
|
||||
///
|
||||
/// - If set_color is called with a style, `{...}` is emitted containing the
|
||||
/// color attributes.
|
||||
/// - If set_color is called with no style, `{/}` is emitted
|
||||
/// - If reset is called, `{/}` is emitted.
|
||||
pub struct ColorBuffer {
|
||||
buf: Vec<u8>,
|
||||
color: ColorSpec,
|
||||
}
|
||||
|
||||
impl ColorBuffer {
|
||||
pub fn new() -> ColorBuffer {
|
||||
ColorBuffer {
|
||||
buf: Vec::new(),
|
||||
color: ColorSpec::new(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn into_string(self) -> String {
|
||||
String::from_utf8(self.buf).unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
impl io::Write for ColorBuffer {
|
||||
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||
self.buf.extend(buf);
|
||||
Ok(buf.len())
|
||||
}
|
||||
|
||||
fn flush(&mut self) -> io::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl WriteColor for ColorBuffer {
|
||||
fn supports_color(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn set_color(&mut self, spec: &ColorSpec) -> io::Result<()> {
|
||||
#![allow(unused_assignments)]
|
||||
|
||||
if self.color == *spec {
|
||||
return Ok(());
|
||||
} else {
|
||||
self.color = spec.clone();
|
||||
}
|
||||
|
||||
if spec.is_none() {
|
||||
write!(self, "{{/}}")?;
|
||||
return Ok(());
|
||||
} else {
|
||||
write!(self, "{{")?;
|
||||
}
|
||||
|
||||
let mut first = true;
|
||||
|
||||
fn write_first(first: bool, write: &mut ColorBuffer) -> io::Result<bool> {
|
||||
if !first {
|
||||
write!(write, " ")?;
|
||||
}
|
||||
|
||||
Ok(false)
|
||||
};
|
||||
|
||||
if let Some(fg) = spec.fg() {
|
||||
first = write_first(first, self)?;
|
||||
write!(self, "fg:{:?}", fg)?;
|
||||
}
|
||||
|
||||
if let Some(bg) = spec.bg() {
|
||||
first = write_first(first, self)?;
|
||||
write!(self, "bg:{:?}", bg)?;
|
||||
}
|
||||
|
||||
if spec.bold() {
|
||||
first = write_first(first, self)?;
|
||||
write!(self, "bold")?;
|
||||
}
|
||||
|
||||
if spec.underline() {
|
||||
first = write_first(first, self)?;
|
||||
write!(self, "underline")?;
|
||||
}
|
||||
|
||||
if spec.intense() {
|
||||
first = write_first(first, self)?;
|
||||
write!(self, "bright")?;
|
||||
}
|
||||
|
||||
write!(self, "}}")?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn reset(&mut self) -> io::Result<()> {
|
||||
let color = self.color.clone();
|
||||
|
||||
if color != ColorSpec::new() {
|
||||
write!(self, "{{/}}")?;
|
||||
self.color = ColorSpec::new();
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
31
third-party/vendor/codespan-reporting/tests/support/mod.rs
vendored
Normal file
31
third-party/vendor/codespan-reporting/tests/support/mod.rs
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
use codespan_reporting::diagnostic::Diagnostic;
|
||||
use codespan_reporting::files::Files;
|
||||
use codespan_reporting::term::{emit, Config};
|
||||
use termcolor::{Buffer, WriteColor};
|
||||
|
||||
mod color_buffer;
|
||||
|
||||
use self::color_buffer::ColorBuffer;
|
||||
|
||||
pub struct TestData<'files, F: Files<'files>> {
|
||||
pub files: F,
|
||||
pub diagnostics: Vec<Diagnostic<F::FileId>>,
|
||||
}
|
||||
|
||||
impl<'files, F: Files<'files>> TestData<'files, F> {
|
||||
fn emit<W: WriteColor>(&'files self, mut writer: W, config: &Config) -> W {
|
||||
for diagnostic in &self.diagnostics {
|
||||
emit(&mut writer, config, &self.files, &diagnostic).unwrap();
|
||||
}
|
||||
writer
|
||||
}
|
||||
|
||||
pub fn emit_color(&'files self, config: &Config) -> String {
|
||||
self.emit(ColorBuffer::new(), &config).into_string()
|
||||
}
|
||||
|
||||
pub fn emit_no_color(&'files self, config: &Config) -> String {
|
||||
let buffer = self.emit(Buffer::no_color(), &config);
|
||||
String::from_utf8_lossy(buffer.as_slice()).into_owned()
|
||||
}
|
||||
}
|
||||
1053
third-party/vendor/codespan-reporting/tests/term.rs
vendored
Normal file
1053
third-party/vendor/codespan-reporting/tests/term.rs
vendored
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue