diff --git a/Cargo.toml b/Cargo.toml index 994fbf30..69393bd8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/examples/calc/ir.rs b/examples/calc/ir.rs index 8767cc6f..9a5017ff 100644 --- a/examples/calc/ir.rs +++ b/examples/calc/ir.rs @@ -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")), ), ) diff --git a/examples/calc/type_check.rs b/examples/calc/type_check.rs index d73a552c..a1489fb3 100644 --- a/examples/calc/type_check.rs +++ b/examples/calc/type_check.rs @@ -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 | |"#]], &[( "