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

rustdoc search command #647

Closed
steveklabnik opened this issue Jan 21, 2015 · 3 comments
Closed

rustdoc search command #647

steveklabnik opened this issue Jan 21, 2015 · 3 comments
Labels
T-dev-tools Relevant to the development tools team, which will review and decide on the RFC.

Comments

@steveklabnik
Copy link
Member

Issue by brson
Saturday Apr 14, 2012 at 19:08 GMT

For earlier discussion, see rust-lang/rust#2207

This issue was labelled with: A-an-interesting-project, A-rustdoc, I-enhancement, P-low in the Rust repository


I want to be able to write rustdoc search vec::each and have rustdoc tell me the docs. It would use the following algorithm:

  • Locate all the source crates (.rc files) under the current path
  • Locate all the compiled crates used by those source crates
  • Scan the all the found source and compiled crates for matching items/methods/variants, etc
  • Generate the docs for all the matches
  • Maybe provide interactive selection when there are multiple matches

Requires #2206

@alexcrichton alexcrichton added the T-dev-tools Relevant to the development tools team, which will review and decide on the RFC. label May 18, 2015
@estebank
Copy link
Contributor

Even though the project is not an official part of rust-lang, racer's master now supports fetching the documentation string from any element it can find:

% racer complete-with-snippet std::fs::File                                                                                                                                                       
MATCH File;File;53;11;.../libstd/fs.rs;Struct;pub struct File;"A reference to an open file on the filesystem.\n\nAn instance of a `File` can be read and/or written depending on what options\nit was opened with. Files also implement `Seek` to alter the logical cursor\nthat the file contains internally.\n\n# Examples\n\n```no_run\nuse std::io::prelude::*\;\nuse std::fs::File\;\n\n# fn foo() -> std::io::Result<()> {\nlet mut f = try!(File::create(\"foo.txt\"))\;\ntry!(f.write_all(b\"Hello, world!\"))\;\n\nlet mut f = try!(File::open(\"foo.txt\"))\;\nlet mut s = String::new()\;\ntry!(f.read_to_string(&mut s))\;\nassert_eq!(s, \"Hello, world!\")\;\n# Ok(())\n# }\n```"
MATCH FileType;FileType;143;11;.../libstd/fs.rs;Struct;pub struct FileType(fs_imp::FileType)\;;"An structure representing a type of file with accessors for each file type."
%

@Ruin0x11
Copy link

Ruin0x11 commented Mar 8, 2017

Just letting people know that I'm currently working on such a tool, oxidoc. Feedback on the current design and contributions are highly encouraged.

@Centril
Copy link
Contributor

Centril commented Oct 7, 2018

Feels like racer / oxidoc suffices and there has been no movement for more than a year, so I'm closing this.

@Centril Centril closed this as completed Oct 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-dev-tools Relevant to the development tools team, which will review and decide on the RFC.
Projects
None yet
Development

No branches or pull requests

6 participants