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

Update const_fn to 0.4.4 minimum #28

Merged
merged 1 commit into from
Jun 26, 2022
Merged

Update const_fn to 0.4.4 minimum #28

merged 1 commit into from
Jun 26, 2022

Conversation

b-n
Copy link
Contributor

@b-n b-n commented Jun 26, 2022

const_fn attribute with no arguments only added since 0.4.4: https://github.com/taiki-e/const_fn/blob/main/CHANGELOG.md#044---2020-11-02

This caused issues when using -minimal-versions as Cargo would attempt to use 0.4.2 which did not have this functionality

To replicate issue:

$ cargo generate-lockfile -Zminimal-versions
$ cargo check
...
error: expected one of: `nightly`, `cfg`, `feature`, string literal
 --> src/utils/const_fns.rs:9:31
  |
9 | #[cfg_attr(feature = "const", const_fn::const_fn)]
  |                               ^^^^^^^^^^^^^^^^^^
  |
  = note: this error originates in the attribute macro `const_fn::const_fn` (in Nightly builds, run with -Z macro-backtrace for more info)
...

With the fix in this PR:

$ cargo generate-lockfile -Zminimal-versions
    Updating crates.io index
$ cargo check                               
   Compiling const_fn v0.4.4
    Checking tz-rs v0.6.9 (/home/ben/Workspace/tz-rs)
    Finished dev [unoptimized + debuginfo] target(s) in 0.99s

This caused issues when using `-minimal-versions` as Cargo would attempt
to use 0.4.2 which did not have this functionality
@x-hgg-x x-hgg-x merged commit 948a93a into x-hgg-x:master Jun 26, 2022
lopopolo added a commit to artichoke/artichoke that referenced this pull request Jun 26, 2022
Addresses issues with minimum versions and removes an unused but load
bearing dependency on `const_fn`:

- x-hgg-x/tz-rs#28
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.

None yet

2 participants