Skip to content

fix syn dependency features - #3

Open
markbt wants to merge 1 commit into
nytopop:masterfrom
markbt:syn-deps
Open

fix syn dependency features#3
markbt wants to merge 1 commit into
nytopop:masterfrom
markbt:syn-deps

Conversation

@markbt

@markbt markbt commented Jul 29, 2025

Copy link
Copy Markdown

quickcheck_async uses items from syn that are only available if the full feature is enabled, however it doesn't specify that in its dependency.

Often that isn't a problem, as many other things depend on syn and include that feature, and Cargo's feature unification means full gets enabled anyway. You can reproduce this by removing all the dev-dependencies and running cargo check.

error[E0432]: unresolved imports `syn::FnArg`, `syn::ItemFn`, `syn::Pat`
   --> src/lib.rs:13:84
    |
13  |     parse_macro_input, punctuated::Punctuated, token::Comma, AttributeArgs, Error, FnArg, ItemFn,
    |                                                                                    ^^^^^  ^^^^^^ no `ItemFn` in the root
    |                                                                                    |
    |                                                                                    no `FnArg` in the root
14  |     NestedMeta, Pat, Type,
    |                 ^^^
    |                 |
    |                 no `Pat` in the root
    |                 help: a similar name exists in the module: `Path`
    |
note: found an item that was configured out
   --> /Users/mbthomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-1.0.109/src/lib.rs:363:5
    |
363 |     FnArg, ForeignItem, ForeignItemFn, ForeignItemMacro, ForeignItemStatic, ForeignItemType,
    |     ^^^^^
note: the item is gated behind the `full` feature
   --> /Users/mbthomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-1.0.109/src/lib.rs:361:7
    |
361 | #[cfg(feature = "full")]
    |       ^^^^^^^^^^^^^^^^
note: found an item that was configured out
   --> /Users/mbthomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/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
   --> /Users/mbthomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-1.0.109/src/lib.rs:361:7
    |
361 | #[cfg(feature = "full")]
    |       ^^^^^^^^^^^^^^^^
note: found an item that was configured out
   --> /Users/mbthomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-1.0.109/src/lib.rs:417:15
    |
417 |     FieldPat, Pat, PatBox, PatIdent, PatLit, PatMacro, PatOr, PatPath, PatRange, PatReference,
    |               ^^^
note: the item is gated behind the `full` feature
   --> /Users/mbthomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-1.0.109/src/lib.rs:415:7
    |
415 | #[cfg(feature = "full")]
    |       ^^^^^^^^^^^^^^^^

This PR adds the feature to the syn dependency explicitly so it's always provided.

`quickcheck_async` uses items from `syn` that are only available if the `full` feature is enabled, however it doesn't specify that in its dependency.

Often that isn't a problem, as many other things depend on `syn` and include that feature, and Cargo's feature unification means `full` gets enabled anyway.  You can reproduce this by removing all the dev-dependencies and running `cargo check`.

Add the feature to the syn dependency explicitly so it's always provided.
facebook-github-bot pushed a commit to facebookexperimental/rust-shed that referenced this pull request Jul 30, 2025
Summary:
Upstream quickcheck_async depends on `syn` but doesn't include the correct features.  In some circumstances that means compilation fails with errors like:

```
error[E0432]: unresolved imports `syn::FnArg`, `syn::ItemFn`, `syn::Pat`
note: the item is gated behind the `full` feature
```

Upstream PR nytopop/quickcheck_async#3 fixes this.  Vendor that fix.

Reviewed By: dtolnay

Differential Revision: D79173248

fbshipit-source-id: e5dfad1a1db497622ae3a5544589edda8dc5055a
facebook-github-bot pushed a commit to facebook/sapling that referenced this pull request Jul 30, 2025
Summary:
Upstream quickcheck_async depends on `syn` but doesn't include the correct features.  In some circumstances that means compilation fails with errors like:

```
error[E0432]: unresolved imports `syn::FnArg`, `syn::ItemFn`, `syn::Pat`
note: the item is gated behind the `full` feature
```

Upstream PR nytopop/quickcheck_async#3 fixes this.  Vendor that fix.

Reviewed By: dtolnay

Differential Revision: D79173248

fbshipit-source-id: e5dfad1a1db497622ae3a5544589edda8dc5055a
@nikita-volkov

Copy link
Copy Markdown

@nytopop Ping

@nikita-volkov

Copy link
Copy Markdown

@nytopop This is a quick fix. Can you release this please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants