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

fix(iroh-net): Fix a compiler error with newer derive_more versions #2578

Merged
merged 2 commits into from
Aug 2, 2024

Conversation

matheus23
Copy link
Contributor

@matheus23 matheus23 commented Aug 2, 2024

Description

The #[derive(Debug)] used to generate an impl like this:

#[automatically_derived]
impl<'a> ::core::fmt::Debug for Accept<'a>
where
    quinn::Accept<'a>: ::core::fmt::Debug,
    Endpoint: ::core::fmt::Debug,
{
// ...
}

But quinn::Accept doesn't implement Debug.

Breaking Changes

None

Notes & open questions

I'm... Really stumped on what changed in derive_more. When I expand the macro, in both versions there's a Debug bound on quinn::Accept, which just can't be right... Anyhow.

Change checklist

  • Self-review.
  • [ ] Documentation updates following the style guide, if relevant.
  • [ ] Tests if relevant.
  • All breaking changes documented.

@matheus23 matheus23 self-assigned this Aug 2, 2024
Copy link

github-actions bot commented Aug 2, 2024

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/2578/docs/iroh/

Last updated: 2024-08-02T09:15:24Z

@matheus23 matheus23 enabled auto-merge August 2, 2024 09:18
@matheus23 matheus23 added this pull request to the merge queue Aug 2, 2024
Merged via the queue into main with commit 3f3fec5 Aug 2, 2024
27 of 28 checks passed
@ramfox ramfox deleted the matheus23/fix-accept-debug-print branch August 2, 2024 13:33
@link2xt
Copy link
Contributor

link2xt commented Aug 3, 2024

This is caused by JelteF/derive_more#371
We had this problem reported for deltachat core in https://support.delta.chat/t/rs-delta-chats-url/3211 and I git-bisected it in deltachat/deltachat-core-rust#5850

@link2xt
Copy link
Contributor

link2xt commented Aug 3, 2024

I opened an upstream issue JelteF/derive_more#392

matheus23 added a commit that referenced this pull request Nov 14, 2024
…#2578)

## Description

<!-- A summary of what this pull request achieves and a rough list of
changes. -->
The `#[derive(Debug)]` used to generate an impl like this:
```rust
#[automatically_derived]
impl<'a> ::core::fmt::Debug for Accept<'a>
where
    quinn::Accept<'a>: ::core::fmt::Debug,
    Endpoint: ::core::fmt::Debug,
{
// ...
}
```

But `quinn::Accept` doesn't implement `Debug`.

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
None

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->
I'm... Really stumped on what changed in `derive_more`. When I expand
the macro, in both versions there's a `Debug` bound on `quinn::Accept`,
which just can't be right... Anyhow.

## Change checklist

- [X] Self-review.
- ~~[ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.~~
- ~~[ ] Tests if relevant.~~
- [X] All breaking changes documented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants