Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade syn crate to 2.0.45 version #341

Merged
merged 2 commits into from
Mar 15, 2024
Merged

Upgrade syn crate to 2.0.45 version #341

merged 2 commits into from
Mar 15, 2024

Conversation

tyranron
Copy link
Collaborator

@tyranron tyranron commented Mar 15, 2024

Related to #301

Synopsis

syn 2.0.45 fixes the #301 issue:

Otherwise this would not work:

#[derive(derive_more::Debug)]
enum Enum {
    A = if cfg!(unix) { 2 } else { 3 },
}
error: proc-macro derive panicked
 --> src/main.rs:1:10
  |
1 | #[derive(derive_more::Debug)]
  |          ^^^^^^^^^^^^^^^^^^
  |
  = help: message: called `Result::unwrap()` on an `Err` value: Error("unsupported expression; enable syn's features=[\"full\"]")

Solution

Upgrade minimal version of syn up to 2.0.45 version and cover the use case with tests for future regressions.

Checklist

  • Documentation is updated (not required)
  • Tests are added/updated
  • CHANGELOG entry is added (not required)

@tyranron tyranron self-assigned this Mar 15, 2024
@tyranron tyranron linked an issue Mar 15, 2024 that may be closed by this pull request
@tyranron tyranron added this to the 1.0.0 milestone Mar 15, 2024
@tyranron tyranron marked this pull request as ready for review March 15, 2024 10:33
@tyranron tyranron requested a review from JelteF March 15, 2024 10:33
@tyranron tyranron merged commit 2a001d6 into master Mar 15, 2024
17 checks passed
@tyranron tyranron deleted the 301-upgrade-syn branch March 15, 2024 11:01
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.

Consider depending on syn.features=["full"]
2 participants