Skip to content

proc-macro panicked: called Rust::unwrap() on an Err value: ParseFloatError #9795

Closed
@gleich

Description

@gleich

Hello rust-analyzer team! First of all, thank you for the work that you do here. I don't wanna waste your time so I'll cut right to the chase. I am getting the error proc macro returned error: proc-macro panicked: called `Result::unwrap()` on an `Err` value: ParseFloatError { kind: Invalid } on the following code:

use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Debug)]
pub struct Config {
	pub name: String,
	pub school_level: String,
	pub school_type: String,
}

This error is highlighted on the whole struct as well as the attribute. Below is some more information:

Name of the file: conf.rs.
File link: gleich/kiwi/src/conf.rs
Repo link: https://github.com/gleich/kiwi
Rust version: rustc 1.54.0 (a178d0322 2021-07-26)
RA version: 950efff 2021-08-05 nightly (tried with RA stable)

Because this error is a rust-analyzer problem running cargo check or cargo build doesn't have this error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macromacro expansion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions