rust-lang / futures-rs

Zero-cost asynchronous programming in Rust
https://rust-lang.github.io/futures-rs/
Apache License 2.0
5.34k stars 616 forks source link

futures-util: Allow `missing_debug_implementations` on `WakerToHandle` #2743

Closed zjijz closed 1 year ago

zjijz commented 1 year ago

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:

taiki-e commented 1 year ago

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

zjijz commented 1 year ago

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 commented 1 year ago

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.