Skip to content

Rustdoc missing where-clause for <*const T>::offset #45389

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
dtolnay opened this issue Oct 19, 2017 · 2 comments
Closed

Rustdoc missing where-clause for <*const T>::offset #45389

dtolnay opened this issue Oct 19, 2017 · 2 comments
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@dtolnay
Copy link
Member

dtolnay commented Oct 19, 2017

https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.offset

The implementation looks like:

pub unsafe fn offset(self, count: isize) -> *const T where T: Sized

But rustdoc only shows:

unsafe fn offset(self, count: isize) -> *const T

I tried to reproduce this with a struct type, but rustdoc seemed to do the right thing for this case.

pub struct Ptr<T: ?Sized>(*const T);

impl<T: ?Sized> Ptr<T> {
    pub fn offset(self, count: isize) -> Ptr<T> where T: Sized {
        unimplemented!()
    }
}
@kennytm kennytm added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-bug Category: This is a bug. T-dev-tools-rustdoc labels Oct 19, 2017
@ollie27
Copy link
Member

ollie27 commented Oct 19, 2017

I believe this is a duplicate of #24183.

@dtolnay
Copy link
Member Author

dtolnay commented Oct 19, 2017

Indeed, thank you.

@dtolnay dtolnay closed this as completed Oct 19, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants