-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error spans incorrect when using flatten
#589
Comments
Without debugging this, my best guess is that something in the way our code or serde is structured is preventing us from associating the |
I have the same issue with a #[derive(Clone, Debug, Default, Eq, PartialEq, Deserialize, Serialize)]
#[serde(rename_all = "kebab-case")]
pub struct TomlConfig {
#[serde(alias = "name")]
pub display_name: Option<String>,
pub signature: Option<String>,
pub signature_delim: Option<String>,
pub downloads_dir: Option<PathBuf>,
#[serde(flatten)]
pub accounts: HashMap<String, TomlAccountConfig>,
} [example]
backend = "imapp"
|
I ran into this as well. I think it has something to do with |
If I'm reading the
|
Indeed, looks like a know issue at |
I think keeping it open but blocked on serde will better help people discover it. |
flatten
Here's a link to my example/repro:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=5651e21bcb73e6fabf7e1d0ef67660d2
and inline for convenience:
produces:
I would expect the line number to be 3 rather than 1, and for the context in the error message to refer to the appropriate part of the file.
The text was updated successfully, but these errors were encountered: