-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
Defaulted method with self: Arc<Self>
doesn't work
#210
Comments
self: Arc<Self>
don't workself: Arc<Self>
doesn't work
This was referenced Nov 29, 2022
crapStone
added a commit
to Calciumdibromid/CaBr2
that referenced
this issue
Dec 2, 2022
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [async-trait](https://github.com/dtolnay/async-trait) | dependencies | patch | `0.1.58` -> `0.1.59` | --- ### Release Notes <details> <summary>dtolnay/async-trait</summary> ### [`v0.1.59`](https://github.com/dtolnay/async-trait/releases/tag/0.1.59) [Compare Source](dtolnay/async-trait@0.1.58...0.1.59) - Support `self: Arc<Self>` async methods that have a default implementation provided by the trait ([#​210](dtolnay/async-trait#210)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC40MC4yIiwidXBkYXRlZEluVmVyIjoiMzQuNDcuMSJ9--> Co-authored-by: cabr2-bot <cabr2.help@gmail.com> Co-authored-by: crapStone <crapstone01@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1661 Reviewed-by: crapStone <crapstone@noreply.codeberg.org> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Arc
generates awhere Self: Send
bound, but forArc
it is not enough - it requires alsoT: Sync
to beSend
. This make the following code failing to compile:https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=add1c3d15459405538a453e3c9a504a6
Adding
Sync
as a supertrait works, but ideally the macro should also add aSelf: Sync
bound (even though I don't know how it can identifyArc
being used), or at least document that.The text was updated successfully, but these errors were encountered: