You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #80653 methods from Deref targets were added to rustdoc output. However, it seems that trait bounds on these methods are not rendered.
I tried this code:
use std::ops::Deref;pubtraitFoo{}pubstructBar<T>(T);impl<T>Bar<T>{pubfngeneric(&self){}}impl<T>Bar<T>whereT:Foo,{pubfnwith_foo(&self){}}pubstructBaz(Bar<()>);implDerefforBaz{typeTarget = Bar<()>;fnderef(&self) -> &Self::Target{&self.0}}pubstructQux<T>(Bar<T>);impl<T>DerefforQux<T>{typeTarget = Bar<T>;fnderef(&self) -> &Self::Target{&self.0}}
I expected to see this happen:
The relevant methods added by the Deref impls on Baz and Qux are added to the output of rustdoc. For Baz this is generic, and for Qux this is generic and with_foo (including the trait bound).
Instead, this happened:
Both methods are visible in the documentation of Baz and Qux without a trait bound T: Foo on the with_foo method.
In #80653 methods from
Deref
targets were added torustdoc
output. However, it seems that trait bounds on these methods are not rendered.I tried this code:
I expected to see this happen:
The relevant methods added by the
Deref
impls onBaz
andQux
are added to the output ofrustdoc
. ForBaz
this isgeneric
, and forQux
this isgeneric
andwith_foo
(including the trait bound).Instead, this happened:
Both methods are visible in the documentation of
Baz
andQux
without a trait boundT: Foo
on thewith_foo
method.Meta
Tested with stable and nightly.
cargo rustc -- --version --verbose
:cargo +nightly rustc -- --version --verbose
:The text was updated successfully, but these errors were encountered: