Correct diagnostic for TomlDebugInfo

This is missing the friendly aliases introduced in 3dbb474c.
This commit is contained in:
Joe Birr-Pixton 2024-08-16 16:48:03 +01:00
parent 3293d22f00
commit b9fe71853e
2 changed files with 3 additions and 3 deletions

View File

@ -1088,7 +1088,7 @@ impl<'de> de::Deserialize<'de> for TomlDebugInfo {
D: de::Deserializer<'de>,
{
use serde::de::Error as _;
let expecting = "a boolean, 0, 1, 2, \"line-tables-only\", or \"line-directives-only\"";
let expecting = "a boolean, 0, 1, 2, \"none\", \"limited\", \"full\", \"line-tables-only\", or \"line-directives-only\"";
UntaggedEnumVisitor::new()
.expecting(expecting)
.bool(|value| {

View File

@ -2686,7 +2686,7 @@ fn bad_debuginfo() {
p.cargo("check")
.with_status(101)
.with_stderr_data(str![[r#"
[ERROR] invalid value: string "a", expected a boolean, 0, 1, 2, "line-tables-only", or "line-directives-only"
[ERROR] invalid value: string "a", expected a boolean, 0, 1, 2, "none", "limited", "full", "line-tables-only", or "line-directives-only"
--> Cargo.toml:9:25
|
9 | debug = 'a'
@ -2719,7 +2719,7 @@ fn bad_debuginfo2() {
p.cargo("check")
.with_status(101)
.with_stderr_data(str![[r#"
[ERROR] invalid type: floating point `3.6`, expected a boolean, 0, 1, 2, "line-tables-only", or "line-directives-only"
[ERROR] invalid type: floating point `3.6`, expected a boolean, 0, 1, 2, "none", "limited", "full", "line-tables-only", or "line-directives-only"
--> Cargo.toml:9:25
|
9 | debug = 3.6