Skip to content

Commit

Permalink
impl FromMeta for syn::ExprPath
Browse files Browse the repository at this point in the history
Fixes #169
  • Loading branch information
TedDriggs committed Mar 30, 2022
1 parent fa9ccf8 commit dbe2311
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/src/from_meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ macro_rules! from_syn_parse {
from_syn_parse!(syn::Ident);
from_syn_parse!(syn::Expr);
from_syn_parse!(syn::ExprArray);
from_syn_parse!(syn::ExprPath);
from_syn_parse!(syn::Path);
from_syn_parse!(syn::WhereClause);

Expand Down Expand Up @@ -771,6 +772,13 @@ mod tests {
fm::<syn::Expr>(quote!(ignore = "{ a_statement(); in_a_block }"));
}

#[test]
fn test_expr_path() {
fm::<syn::ExprPath>(quote!(ignore = "std::mem::replace"));
fm::<syn::ExprPath>(quote!(ignore = "x"));
fm::<syn::ExprPath>(quote!(ignore = "example::<Test>"));
}

#[test]
fn test_number_array() {
assert_eq!(
Expand Down

0 comments on commit dbe2311

Please sign in to comment.