Skip to content
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

Improve rustdoc formatting of long function names #34926

Closed
moosingin3space opened this issue Jul 19, 2016 · 4 comments
Closed

Improve rustdoc formatting of long function names #34926

moosingin3space opened this issue Jul 19, 2016 · 4 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@moosingin3space
Copy link
Contributor

This could integrate with rustfmt to make long function names easier to read.

In particular, http://tailhook.github.io/unshare/nix/sys/socket/fn.recvmsg.html
would be easier to read as:

pub fn recvmsg<'a, T>(fd: RawFd, 
                      iov: &[IoVec<&mut [u8]>], 
                      cmsg_buffer: Option<&'a mut CmsgSpace<T>>, 
                      flags: SockMessageFlags) 
               -> Result<RecvMsg<'a>>
@steveklabnik
Copy link
Member

I would assume that rustfmt integration is the only way to go here; otherwise, we have to re-hash all of its decisions.

@steveklabnik steveklabnik added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 19, 2016
@nagisa
Copy link
Member

nagisa commented Jul 19, 2016

What it really should do is just reuse the formatting of the declaration/definition as in source, with some leading spaces removed.

@QuietMisdreavus
Copy link
Member

It's not quite "run it through rustfmt" or "use the source formatting", but with #36679 (and pending #37190), would this be alleviated?

@steveklabnik steveklabnik added T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. and removed T-tools labels May 18, 2017
@QuietMisdreavus
Copy link
Member

Closing via #41084, which renders fn signatures according to style RFCs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. 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

5 participants