Commit 55d8c281 authored by Qinxuan Chen's avatar Qinxuan Chen

Fix parse_from_attr

Signed-off-by: Qinxuan Chen's avatarkoushiro <koushiro.cqx@gmail.com>
parent e0242269
Pipeline #56514 failed with stages
in 23 seconds
......@@ -115,9 +115,14 @@ impl ast::ItemEnvTypesMeta {
let first_segment = attr
.path
.segments
.first()
.expect("paths have at least one segment");
let ident = first_segment.ident.clone();
.pairs()
.next()
.expect("paths have at least one segment")
.into_tuple();
if let Some(colon) = first_segment.1 {
return Err(syn::Error::new(colon.spans[0], "expected meta value"))
}
let ident = first_segment.0.ident.clone();
let parser = |input: ParseStream<'_>| {
let eq_token = input.parse()?;
let ty = input.parse()?;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment