From bd6b4a9b14eda7e555ac48c91bb4586e70530e58 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 31 Jan 2024 10:42:58 -0600 Subject: [PATCH] fix(toml): Improve map/sequence error message This is a follow up to #13375 --- Cargo.lock | 12 ++++++------ Cargo.toml | 4 ++-- tests/testsuite/diagnostics.rs | 8 +++++--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9dd43effcb5..410409cd12c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3036,9 +3036,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -3354,9 +3354,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "toml" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" +checksum = "c6a4b9e8023eb94392d3dca65d717c53abc5dad49c07cb65bb8fcd87115fa325" dependencies = [ "serde", "serde_spanned", @@ -3375,9 +3375,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap", "serde", diff --git a/Cargo.toml b/Cargo.toml index 0a62314f057..5e216220f97 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -96,8 +96,8 @@ tar = { version = "0.4.40", default-features = false } tempfile = "3.9.0" thiserror = "1.0.56" time = { version = "0.3", features = ["parsing", "formatting", "serde"] } -toml = "0.8.8" -toml_edit = { version = "0.21.0", features = ["serde"] } +toml = "0.8.9" +toml_edit = { version = "0.21.1", features = ["serde"] } tracing = "0.1.37" # be compatible with rustc_log: https://github.com/rust-lang/rust/blob/e51e98dde6a/compiler/rustc_log/Cargo.toml#L9 tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } unicase = "2.7.0" diff --git a/tests/testsuite/diagnostics.rs b/tests/testsuite/diagnostics.rs index 2de841825f2..98a9f421cbb 100644 --- a/tests/testsuite/diagnostics.rs +++ b/tests/testsuite/diagnostics.rs @@ -21,9 +21,11 @@ edition = "2021" .with_stderr( "\ error: invalid type: map, expected a sequence ---> Cargo.toml:1:1 - | - | + --> Cargo.toml:6:3 + | +6 | [[bench.foo]] + | ^^^^^ + | ", ) .run();