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

Delete replacement of elided lifetimes in impl heading #239

Merged
merged 2 commits into from Mar 4, 2023
Merged

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Mar 4, 2023

This reverts PR #107. The code from that PR is no longer necessary for 2 reasons.

  1. As of Normalize projections under binders rust-lang/rust#85499 in Rust 1.56.0, the problem described in Translation of lifetimes in Fn trait input parameters #106 involving FnOnce(&Self::ThreadPool) vs FnOnce(&<&P as ProcessPool>::ThreadPool) does not occur. These two trait bounds mean the same thing to sufficiently new versions of Rust.

  2. As of Transform blocks into async move for more compatibility #143 in async-trait 0.1.43 we no longer replace FnOnce(&Self::ThreadPool) to FnOnce(&<&P as ProcessPool>::ThreadPool) in generated code, so even with old rustc, the old problem does not occur.

Fixes #238.

Currently fails:

    error: lifetime parameter `'impl0` only used once
        --> tests/test.rs:1603:20
         |
    1603 |     impl Trait for &Struct {
         |                    ^
         |                    |
         |                    this lifetime...
         |                    ...is used only here
         |
    note: the lint level is defined here
        --> tests/test.rs:1591:13
         |
    1591 |     #![deny(single_use_lifetimes)]
         |             ^^^^^^^^^^^^^^^^^^^^
    help: elide the single-use lifetime
         |
    1602 ~
    1603 ~     impl Trait for Struct {
         |
@dtolnay dtolnay merged commit 7eea88b into master Mar 4, 2023
@dtolnay dtolnay deleted the singleuse branch March 4, 2023 06:56
crapStone added a commit to Calciumdibromid/CaBr2 that referenced this pull request Mar 6, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [async-trait](https://github.com/dtolnay/async-trait) | dependencies | patch | `0.1.64` -> `0.1.66` |

---

### Release Notes

<details>
<summary>dtolnay/async-trait</summary>

### [`v0.1.66`](https://github.com/dtolnay/async-trait/releases/tag/0.1.66)

[Compare Source](dtolnay/async-trait@0.1.65...0.1.66)

-   Set html_root_url attribute

### [`v0.1.65`](https://github.com/dtolnay/async-trait/releases/tag/0.1.65)

[Compare Source](dtolnay/async-trait@0.1.64...0.1.65)

-   Fix interaction with rustc's single_use_lifetimes lint ([#&#8203;238](dtolnay/async-trait#238), [#&#8203;239](dtolnay/async-trait#239))

</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:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNTQuNiIsInVwZGF0ZWRJblZlciI6IjM0LjE1Ny4wIn0=-->

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Co-authored-by: crapStone <crapstone01@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1805
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Weird interaction with single_use_lifetimes
1 participant