From 8e0868057ae179ff8a4a9b723e5b3d42caab15c2 Mon Sep 17 00:00:00 2001
From: Ed Page <eopage@gmail.com>
Date: Tue, 26 Apr 2022 10:16:26 -0500
Subject: [PATCH 1/2] chore: Upgrade toml_edit

---
 Cargo.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Cargo.toml b/Cargo.toml
index e5b9144506a..7851d070735 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -58,7 +58,7 @@ strip-ansi-escapes = "0.1.0"
 tar = { version = "0.4.36", default-features = false }
 tempfile = "3.0"
 termcolor = "1.1"
-toml_edit =  { version = "0.13.4", features = ["serde", "easy"] }
+toml_edit =  { version = "0.14.3", features = ["serde", "easy", "perf"] }
 unicode-xid = "0.2.0"
 url = "2.2.2"
 walkdir = "2.2"

From de77eb1909b709a3a9cc4cb19391df5373ea78f2 Mon Sep 17 00:00:00 2001
From: Ed Page <eopage@gmail.com>
Date: Tue, 26 Apr 2022 10:17:35 -0500
Subject: [PATCH 2/2] feat(toml): Expose toml_edit errors

This officially adds `toml_edit` to the public API but this will let RLS
use these errors and stay up-to-date without manual intervention.
---
 src/cargo/util/toml/mod.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/cargo/util/toml/mod.rs b/src/cargo/util/toml/mod.rs
index 987dcbae489..c925474ad27 100644
--- a/src/cargo/util/toml/mod.rs
+++ b/src/cargo/util/toml/mod.rs
@@ -36,6 +36,9 @@ use crate::util::{
 mod targets;
 use self::targets::targets;
 
+pub use toml_edit::de::Error as TomlDeError;
+pub use toml_edit::TomlError as TomlEditError;
+
 /// Loads a `Cargo.toml` from a file on disk.
 ///
 /// This could result in a real or virtual manifest being returned.