From 190e7fc3eaf06a5b1eac0d4ca20c4dacc862c862 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 ++++++------ tests/testsuite/diagnostics.rs | 8 +++++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9dd43effcb51..410409cd12c9 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/tests/testsuite/diagnostics.rs b/tests/testsuite/diagnostics.rs index 2de841825f25..98a9f421cbb0 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();