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

futures-util: Allow missing_debug_implementations on WakerToHandle #2743

Closed
wants to merge 1 commit into from

Conversation

zjijz
Copy link

@zjijz zjijz commented May 9, 2023

Fixes this error on ToT:

error: type does not implement `Debug`; consider adding `#[derive(Debug)]` or a manual implementation
   --> futures-util/src/compat/compat01as03.rs:325:1
    |
325 | struct WakerToHandle<'a>(&'a task03::Waker);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `-D missing-debug-implementations` implied by `-D warnings`

Tested:

  • cargo fmt.
  • cargo doc.
  • cargo test --all-features.

@taiki-e
Copy link
Member

taiki-e commented May 9, 2023

Thanks for the PR. This is rustc bug (rust-lang/rust#111359), so I prefer to use #[allow(...)] with a link to the bug report rather than follow the buggy lint.

@zjijz zjijz force-pushed the zjijz/fix-missing-debug-error branch from c72e229 to 55144d2 Compare May 9, 2023 05:58
@zjijz zjijz changed the title futures-util: Add derive(Debug) to WakerToHandle futures-util: Allow missing_debug_implementations on WakerToHandle May 9, 2023
@zjijz zjijz changed the title futures-util: Allow missing_debug_implementations on WakerToHandle futures-util: Allow missing_debug_implementations on WakerToHandle May 9, 2023
Fixes this error on ToT:
```
error: type does not implement `Debug`; consider adding `#[derive(Debug)]` or a manual implementation
   --> futures-util/src/compat/compat01as03.rs:325:1
    |
325 | struct WakerToHandle<'a>(&'a task03::Waker);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `-D missing-debug-implementations` implied by `-D warnings`
```

Tested:
- `cargo fmt`.
- `cargo doc`.
- `cargo test`.
@zjijz zjijz force-pushed the zjijz/fix-missing-debug-error branch from 55144d2 to ce0e7c9 Compare May 9, 2023 06:02
@zjijz
Copy link
Author

zjijz commented May 9, 2023

Changed the fix to use #[allow(missing_debug_implementations)] and added a link to the above issue. Let me know if it's good to go!

@taiki-e
Copy link
Member

taiki-e commented Jun 8, 2023

The rustc commit that caused the issue has been reverted and this issue is now fixed as well, so I'm going to close this.

Thanks for the PR anyway.

@taiki-e taiki-e closed this Jun 8, 2023
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.

2 participants