From 08f1eb7b4783cda298cb45b47566ef39892bdc86 Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Mon, 28 Oct 2024 22:35:55 +0000 Subject: [PATCH] Bumped version --- CHANGELOG.md | 6 ++++++ Cargo.toml | 2 +- README.md | 2 +- src/lib.rs | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca22025..c251687 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +# [0.5.0] - 2024-10-28 + +### Changed + +- Made `Report::build` accept a proper span, avoiding much type annotation trouble + # [0.4.1] - 2024-04-25 ### Added diff --git a/Cargo.toml b/Cargo.toml index 0c1b3de..7148e4f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ariadne" -version = "0.4.1" +version = "0.5.0" description = "A fancy diagnostics & reporting crate" authors = ["Joshua Barretto "] license = "MIT" diff --git a/README.md b/README.md index 0e89413..e5c332b 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ fn main() { let b = colors.next(); let out = Color::Fixed(81); - Report::build(ReportKind::Error, "sample.tao", 12) + Report::build(ReportKind::Error, ("sample.tao", 12..12)) .with_code(3) .with_message(format!("Incompatible types")) .with_label( diff --git a/src/lib.rs b/src/lib.rs index a4e9fbf..ededa5f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -211,6 +211,8 @@ pub struct Report<'a, S: Span = Range> { impl Report<'_, S> { /// Begin building a new [`Report`]. + /// + /// The span is the primary location at which the error should be reported. pub fn build(kind: ReportKind, span: S) -> ReportBuilder { ReportBuilder { kind,