mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-22 12:56:33 +00:00
commit
b0cc7dc73c
3 changed files with 3 additions and 12 deletions
|
@ -25,10 +25,10 @@ lazy_static = "1"
|
|||
rayon = "1.10.0"
|
||||
|
||||
[dev-dependencies]
|
||||
annotate-snippets = "0.11.4"
|
||||
annotate-snippets = "0.11.5"
|
||||
derive-new = "0.6.0"
|
||||
codspeed-criterion-compat = { version = "2.6.0", default-features = false }
|
||||
expect-test = "1.4.0"
|
||||
expect-test = "1.5.0"
|
||||
eyre = "0.6.8"
|
||||
notify-debouncer-mini = "0.4.1"
|
||||
ordered-float = "4.2.1"
|
||||
|
|
|
@ -117,6 +117,7 @@ impl Diagnostic {
|
|||
Snippet::source(src.text(db))
|
||||
.line_start(line_start)
|
||||
.origin("input")
|
||||
.fold(true)
|
||||
.annotation(Level::Error.span(self.start..self.end).label("here")),
|
||||
),
|
||||
)
|
||||
|
|
|
@ -194,12 +194,10 @@ fn check_bad_variable_in_function() {
|
|||
error: the variable `b` is not declared
|
||||
--> input:4:33
|
||||
|
|
||||
3 |
|
||||
4 | fn add_one(a) = a + b
|
||||
| _________________________________^
|
||||
5 | | print add_one(22)
|
||||
| |____________^ here
|
||||
6 |
|
||||
|"#]],
|
||||
&[],
|
||||
);
|
||||
|
@ -216,21 +214,16 @@ fn check_bad_function_in_function() {
|
|||
error: the function `add_two` is not declared
|
||||
--> input:4:29
|
||||
|
|
||||
3 |
|
||||
4 | fn add_one(a) = add_two(a) + b
|
||||
| ^^^^^^^^^^ here
|
||||
5 | print add_one(22)
|
||||
6 |
|
||||
|
|
||||
error: the variable `b` is not declared
|
||||
--> input:4:42
|
||||
|
|
||||
3 |
|
||||
4 | fn add_one(a) = add_two(a) + b
|
||||
| __________________________________________^
|
||||
5 | | print add_one(22)
|
||||
| |____________^ here
|
||||
6 |
|
||||
|"#]],
|
||||
&[],
|
||||
);
|
||||
|
@ -248,13 +241,10 @@ fn fix_bad_variable_in_function() {
|
|||
error: the variable `b` is not declared
|
||||
--> input:4:32
|
||||
|
|
||||
3 |
|
||||
4 | fn double(a) = a * b
|
||||
| ________________________________^
|
||||
5 | | fn quadruple(a) = double(double(a))
|
||||
| |____________^ here
|
||||
6 | print quadruple(2)
|
||||
7 |
|
||||
|"#]],
|
||||
&[(
|
||||
"
|
||||
|
|
Loading…
Reference in a new issue