Repository: rust
Issue: Rustdoc should not show impls with a `where` clause that is always false
Labels: T-rustdoc,A-trait-system,C-feature-request

`pin_project_lite` generates code that looks like this:

```rust
        impl <'__pin> ::pin_project_lite::__private::Unpin for Sleep<> where
         __Origin<'__pin>: ::pin_project_lite::__private::Unpin {
        }
```

<details><summary>Full output of <code>cargo expand</code></summary>

```
#![feature(prelude_import)]
#[prelude_import]
use std::prelude::v1::*;
#[macro_use]
extern crate std;
use pin_project_lite::pin_project;

struct TimerEntry {
}


// The link between the `Sleep` instance and the timer that drives it.
#[doc = r" Future returned by [`sleep`](sleep) and"]
#[doc = r" [`sleep_until`](sleep_until)."]
#[must_use = "futures do nothing unless you `.await` or poll them"]
pub struct Sleep {
    deadline: std::time::Duration,
    entry: TimerEntry,
}
#[automatically_derived]
#[allow(unused_qualifications)]
impl ::core::fmt::Debug for Sleep {
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match *self {
            Sleep { deadline: ref __self_0_0, entry: ref __self_0_1 } => {
                let mut debug_trait_builder = f.debug_struct("Sleep");
                let _ =
                    debug_trait_builder.field("deadline", &&(*__self_0_0));
                let _ = debug_trait_builder.field("entry", &&(*__self_0_1));
                debug_trait_builder.finish()
            }
        }
    }
}
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy :: redundant_pub_crate)]
#[allow(clippy :: used_underscore_binding)]
const _: () =
    {
        #[allow(dead_code)]
        #[allow(single_use_lifetimes)]
        #[allow(clippy :: mut_mut)]
        #[allow(clippy :: redundant_pub_crate)]
        #[allow(clippy :: type_repetition_in_bounds)]
        pub(crate) struct Projection<'__pin> where Sleep<>: '__pin {
            deadline: &'__pin mut (std::time::Duration),
            entry: ::pin_project_lite::__private::Pin<&'__pin mut (TimerEntry)>,
        }
        #[allow(dead_code)]
        #[allow(single_use_lifetimes)]
        #[allow(clippy :: mut_mut)]
        #[allow(clippy :: redundant_pub_crate)]
        #[allow(clippy :: type_repetition_in_bounds)]
        pub(crate) struct ProjectionRef<'__pin> where Sleep<>: '__pin {
            deadline: &'__pin (std::time::Duration),
            entry: ::pin_project_lite::__private::Pin<&'__pin (TimerEntry)>,
        }
        impl Sleep<> {
            pub(crate) fn project<'__pin>(self:
                                              ::pin_project_lite::__private::Pin<&'__pin mut Self>)
             -> Projection<'__pin> {
                unsafe {
                    let Self { deadline, entry } = self.get_unchecked_mut();
                    Projection{deadline: deadline,
                               entry:
                                   ::pin_project_lite::__private::Pin::new_unchecked(entry),}
                }
            }
            pub(crate) fn project_ref<'__pin>(self:
                                                  ::pin_project_lite::__private::Pin<&'__pin Self>)
             -> ProjectionRef<'__pin> {
                unsafe {
                    let Self { deadline, entry } = self.get_ref();
                    ProjectionRef{deadline: deadline,
                                  entry:
                                      ::pin_project_lite::__private::Pin::new_unchecked(entry),}
                }
            }
        }
        #[allow(non_snake_case)]
        pub struct __Origin<'__pin> {
            __dummy_lifetime: ::pin_project_lite::__private::PhantomData<&'__pin ()>,
            deadline: ::pin_project_lite::__private::AlwaysUnpin<std::time::Duration>,
            entry: TimerEntry,
        }
        impl <'__pin> ::pin_project_lite::__private::Unpin for Sleep<> where
         __Origin<'__pin>: ::pin_project_lite::__private::Unpin {
        }
        trait MustNotImplDrop { }
        #[allow(clippy :: drop_bounds, drop_bounds)]
        impl <T: ::pin_project_lite::__private::Drop> MustNotImplDrop for T {
        }
        impl MustNotImplDrop for Sleep<> { }
        #[forbid(safe_packed_borrows)]
        fn __assert_not_repr_packed(this: &Sleep<>) {
            let _ = &this.deadline;
            let _ = &this.entry;
        }
    };
```

</details>

Rustdoc in turn generates documentation like this:
```rust
impl<'__pin> Unpin for Sleep where
    __Origin<'__pin>: Unpin, 
```
![image](https://user-images.githubusercontent.com/23638587/103305582-813e3280-49d9-11eb-9a20-a157c73e9c1d.png)

This is really unfortunate, because `__Origin` does not in fact implement `Unpin`. Rustdoc shouldn't show trait implementations that can never be applied.

_Originally posted by @jyn514 in https://github.com/tokio-rs/tokio/issues/3330#issuecomment-751940935_