-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Generate documentation for type aliases/definitions #113727
Comments
Hi, I assume this can be either directly answered by folks more versed with rustdoc, or has to be moved to the rust-lang/rust repo where rustdoc issues are kept. cc @Nemo157 @GuillaumeGomez ? |
You need to make |
Hey, sorry for reporting to the wrong place. I found out that what happened is that the wrapper is private but the type alias is public: mod wrapper {
#[repr(transparent)]
pub struct Wrapper<T>(T);
impl<T> Wrapper<T> {
/// Common method
pub fn common() {}
}
}
pub mod a {
use crate::wrapper::Wrapper;
pub struct A;
pub type WA = Wrapper<A>;
impl WA {
/// Type specific method
pub fn method_a() {}
}
} The code compiles without any error and warning (See rust playground). Yet, if you run |
For the missing impl on the type alias, I made #112429 but we needed to revert it because it introduced some bugs. We'll need to wait for the trait system rewrite to be done before I can put back the fix again. |
Fixed by #115201, right? |
I'm facing similar problem to this stack overflow question.
Specifically, I made a wrapper class that wraps around an FFI object and creates common functionality like
from_ffi
, etc.Then, I implemented different methods based on the FFI type:
Yet, rust doc generate item and doc for
type A = FfiWrapper<FfiA>
, but not forfn method_a
. How can I let the items in the specific implementation show up in docs?The text was updated successfully, but these errors were encountered: