not-fl3 / nanoserde

Serialisation library with zero dependencies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unexpected data after end of the struct

Eason0729 opened this issue · comments

commented
proc-macro derive panicked
message: Unexpected data after end of the struct rustc[Click](rust-analyzer-diagnostics-view:/diagnostic%20message?1#file...graph.rs)

Here is the code that cause macro panic.

#[derive(Clone, DeBin, SerBin)]
pub struct Graph<V, E>
where
    V: Ord,
{
    edges: Vec<Vec<Edge<E>>>,
    values: BTreeMap<V, usize>
}

I personally fork nanoserde and add impl for BTreeMap, and I think the problem is not the impl.
After digging into code of parser, I found that maybe trait bound parsing,where V: Ord, is missing in derive/src/parser

yes, I believe where is not supported