Skip to content

Inaccuracies in errors #1108

@chirizxc

Description

@chirizxc
use toml;

fn main() {
    let toml = "x = 42_hello";
    match toml::from_str::<toml::Value>(toml) {
        Ok(value) => println!("Parsed: {value:#?}"),
        Err(err) => eprintln!("Parse error: {err}"),
    }
}
Parse error: TOML parse error at line 1, column 8
  |
1 | x = 42_hello
  |        ^^^^^
invalid float, expected nothing

i think it should be an invalid integer here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions