Stranger6667 / jsonschema-rs

JSON Schema validation library
https://docs.rs/jsonschema
MIT License
482 stars 90 forks source link

Fix `unresolved import "syn::ItemFn"` when running tests #445

Closed OrangeTux closed 4 months ago

OrangeTux commented 6 months ago

cargo test fails with:

$ cargo test                                                                                                                                     master ✭
   Compiling json_schema_test_suite_proc_macro v0.3.0 (/home/auke/projects/jsonschema-rs/jsonschema-test-suite/proc_macro)
   Compiling jsonschema v0.17.1 (/home/auke/projects/jsonschema-rs/jsonschema)
error[E0432]: unresolved import `syn::ItemFn`
   --> /home/auke/projects/jsonschema-rs/jsonschema-test-suite/proc_macro/src/lib.rs:41:37
    |
41  | use syn::{parse_macro_input, Ident, ItemFn};
    |                                     ^^^^^^ no `ItemFn` in the root
    |
note: found an item that was configured out
   --> /home/auke/.cargo/registry/src/index.crates.io-6f17d22bba15001f/syn-1.0.109/src/lib.rs:365:32
    |
365 |     ItemEnum, ItemExternCrate, ItemFn, ItemForeignMod, ItemImpl, ItemMacro, ItemMacro2, ItemMod,
    |                                ^^^^^^
    = note: the item is gated behind the `full` feature

For more information about this error, try `rustc --explain E0432`.

This commit fixes the issue by applying the suggestion of the compiler.

Fixes #444

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (4461d0f) 79.56% compared to head (b159980) 79.48%. Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #445 +/- ## ========================================== - Coverage 79.56% 79.48% -0.09% ========================================== Files 56 56 Lines 5149 5122 -27 ========================================== - Hits 4097 4071 -26 + Misses 1052 1051 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.