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

Inlined documentation loses lifetime parameters on functions #14462

Closed
1 of 2 tasks
alexcrichton opened this issue May 27, 2014 · 11 comments
Closed
1 of 2 tasks

Inlined documentation loses lifetime parameters on functions #14462

alexcrichton opened this issue May 27, 2014 · 11 comments
Labels
C-bug Category: This is a bug. 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

@alexcrichton
Copy link
Member

Updated description

Lifetime parameters on functions are missing

Original description

Rustdoc inlining papercuts

There's still some papercuts with inlined documentation:

@emberian
Copy link
Member

It'd also be nice if it showed a little "reexported from" blurb.

@wycats
Copy link
Contributor

wycats commented May 27, 2014

Perhaps something like:

stdin re-exported from std::io::stdio

or:

Re-Exports:

stdin (from std::io::stdio)
stdout (from std::io::stdio)
...

alexcrichton added a commit to alexcrichton/rust that referenced this issue May 29, 2014
When inlining documentation across crates, primitive implementors of traits were
not shown. This commit tweaks the infrastructure to treat primitive and
Path-like impls the same way, displaying all implementors everywhere.

cc rust-lang#14462
alexcrichton added a commit to alexcrichton/rust that referenced this issue May 29, 2014
alexcrichton added a commit to alexcrichton/rust that referenced this issue May 30, 2014
When inlining documentation across crates, primitive implementors of traits were
not shown. This commit tweaks the infrastructure to treat primitive and
Path-like impls the same way, displaying all implementors everywhere.

cc rust-lang#14462
alexcrichton added a commit to alexcrichton/rust that referenced this issue May 30, 2014
alexcrichton added a commit to alexcrichton/rust that referenced this issue Jun 1, 2014
When inlining documentation across crates, primitive implementors of traits were
not shown. This commit tweaks the infrastructure to treat primitive and
Path-like impls the same way, displaying all implementors everywhere.

cc rust-lang#14462
alexcrichton added a commit to alexcrichton/rust that referenced this issue Jun 1, 2014
@alexcrichton alexcrichton changed the title Rustdoc inlining papercuts Inlined documentation loses lifetime parameters on functions Jun 9, 2014
@alexcrichton
Copy link
Member Author

Updated with what's left

@tomjakubowski
Copy link
Contributor

This can be closed (although we should probably add a test).

update: Erm, no, it can't; the parameter list is missing.

@steveklabnik
Copy link
Member

Currently:

steve@warmachine:~/tmp/foo$ cat src/lib.rs 
pub fn elided(r: &i32) -> &i32 { r }
pub fn not<'a>(r: &'a i32) -> &'a i32 { r }

shows

2016-03-04-125625_327x119_scrot
2016-03-04-125630_396x128_scrot

And the original method in the example doesn't exist anymore. I think I'm treating this one as "innocent until proven guilty"

@tomjakubowski
Copy link
Contributor

This issue was about inlined documentation, i.e. documentation for functions which are re-exported from another crate. A single-crate test case doesn't suffice to close this issue.

@tomjakubowski
Copy link
Contributor

Here's an example showing why this issue should still be open:

collections docs for String::from_utf8_lossy, includes the <'a> to declare the named lifetime:

http://doc.rust-lang.org/collections/string/struct.String.html#method.from_utf8_lossy

std docs for String::from_utf_8_lossy, doesn't include the<'a> to declare the named lifetime:

http://doc.rust-lang.org/std/string/struct.String.html#method.from_utf8_lossy

@steveklabnik steveklabnik reopened this Mar 5, 2016
@steveklabnik
Copy link
Member

Understood! Thanks for elaborating.

@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
@Mark-Simulacrum
Copy link
Member

Looking at collections on nightly, this appears to have regressed since beta -- even collections doesn't show the 'a lifetime now.

@kzys
Copy link
Contributor

kzys commented Sep 18, 2018

@Dylan-DPC-zz
Copy link

This looks to be resolved. Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. 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

8 participants