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

Support const fn new #84

Open
mcarton opened this issue Jan 11, 2021 · 0 comments
Open

Support const fn new #84

mcarton opened this issue Jan 11, 2021 · 0 comments
Labels
feature-attribute Feature request: new attribute

Comments

@mcarton
Copy link
Owner

mcarton commented Jan 11, 2021

const traits aren't stable yet, but we could make the new function we optionally generate with derivative(Debug) const.

We wouldn't be able to use Default::default() for each field though, so it might not work for that many things.

@mcarton mcarton added the feature-attribute Feature request: new attribute label Jan 11, 2021
bors bot added a commit to comit-network/comit-rs that referenced this issue Mar 17, 2021
3541: Bump derivative from 2.1.3 to 2.2.0 r=mergify[bot] a=dependabot[bot]

Bumps [derivative](https://github.com/mcarton/rust-derivative) from 2.1.3 to 2.2.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/mcarton/rust-derivative/blob/master/CHANGELOG.md">derivative's changelog</a>.</em></p>
<blockquote>
<h2>2.2.0</h2>
<ul>
<li>Add support for deriving traits on <code>repr(packed)</code> types (<a href="https://github.com/mcarton/rust-derivative/issues/84">#84</a>).</li>
<li>Fix bug with <code>Debug</code> bounds (<a href="https://github.com/mcarton/rust-derivative/issues/83">#83</a>).</li>
<li>Migrate documentation to <code>mdbook</code> and fix issues found in examples (<a href="https://github.com/mcarton/rust-derivative/issues/83">#83</a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/mcarton/rust-derivative/commits/v2.2.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=derivative&package-manager=cargo&previous-version=2.1.3&new-version=2.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-attribute Feature request: new attribute
Projects
None yet
Development

No branches or pull requests

1 participant