expression
TOML duplicate keys and invalid input
A TOML key must not be defined twice in the same table. Reject invalid documents instead of silently choosing one setting. This example uses external crates; see the staged Cargo manifest. Expected stdout (not executed): true Common mistake: Assuming later entries automatically override earlier keys inside the same TOML document.
Formal Syntax & Structure
rust syntaxrust
toml::from_str::<toml::Table>(text).is_err()Working Example
Example Snippetrust
fn main() { let input = "limit = 10\nlimit = 20"; println!("{}", toml::from_str::<toml::Table>(input).is_err());}