-
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
Rustdoc considers *const T and *mut T different #24897
Comments
The bug here is that |
|
So, in attempting to recreate this bug, I first looked at https://doc.rust-lang.org/1.0.0/core/ptr/struct.Unique.html to see what it looked like when use std::ops::Deref;
pub struct Unique<T: ?Sized> {
pointer: *const T,
}
impl<T:?Sized> Deref for Unique<T> {
type Target = *mut T;
#[inline]
fn deref<'a>(&'a self) -> &'a *mut T {
unsafe { mem::transmute(&*self.pointer) }
}
} This gives with no methods at all! That seems... strange? |
I spent some time looking into this, and there are a couple of intertwined issues.
So it seems that the first issue to solve is to make rustdoc display Deref-inherited methods with by-value |
https://doc.rust-lang.org/core/ptr/struct.Unique.html
is_null
,offset
, andas_ref
are listed twice. This is confusing and makes the HTML invalid. I'm not sure what's going on here.The text was updated successfully, but these errors were encountered: