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

Documentation sprint: Terminfo documentation strings #12948

Merged
merged 1 commit into from
Mar 24, 2014

Conversation

olleolleolle
Copy link
Contributor

Rust doc sprint: adding doc strings to the Terminfo library.

This is my very first Rust repository PR, so please do not hold back any formatting, nit-picky commentary. I need it.

@@ -106,6 +110,7 @@ fn cap_for_attr(attr: attr::Attr) -> &'static str {
}
}

#[doc(hidden)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this hidden? I thought this was one of the main exports of this library?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not know how to do explain the "all the fields of this are priv", yet the main thing is not, so a very short docstring, like Wraps an output stream and its terminal settings may do the trick.

Thanks for picking this piece of lint.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This structure is one of the main exports of this library, just because its fields are private doesn't mean that it's a useless structure. The HashMap structure, for example, has no public fields.

Documentation on structs normally explains what it's used for and why, accompanied with an example or two of its usage.

@alexcrichton
Copy link
Member

A good check would be to put #[deny(missing_doc)]; in lib.rs, and the compiler will check to make sure that everything is documented.

@brson
Copy link
Contributor

brson commented Mar 21, 2014

@alexcrichton is this ready to go yet?

@alexcrichton
Copy link
Member

Not quite, I still have some comments that I would like addressed

@olleolleolle
Copy link
Contributor Author

  1. "Things have been crazy here", so I haven't had given this the Rust-love it deserves
  2. I agree with all of Alex's kind and helpful comments.

@olleolleolle
Copy link
Contributor Author

And, now it also built green. @alexcrichton @brson Would this suffice?

@@ -20,6 +20,8 @@
html_root_url = "http://static.rust-lang.org/doc/master")];

#[feature(macro_rules)];
#[allow(deprecated_owned_vector)]; // NOTE: remove after stage0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new snapshot was created today, this line could go away already.

@flaper87
Copy link
Contributor

@olleolleolle would you mind squashing the commits?

@olleolleolle
Copy link
Contributor Author

@flaper87 Thanks for picking that up. 🍰

@olleolleolle
Copy link
Contributor Author

(Darned thing stopped, "no output for 10 minutes" error.)

@olleolleolle
Copy link
Contributor Author

Thanks, @kud1ing for noting Markdown deficiency.

bors added a commit that referenced this pull request Mar 24, 2014
Rust doc sprint: adding doc strings to the Terminfo library.

This is my very first Rust repository PR, so please do not hold back any formatting, nit-picky commentary. I need it.
@bors bors closed this Mar 24, 2014
@bors bors merged commit a6c14dd into rust-lang:master Mar 24, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Aug 9, 2022
feat: Handle operators like their trait functions in the IDE

Allows hover and goto implementation to work on `?`, indexing brackets, binary operators, prefix operators and `await`. Regarding `await`, hover will continue to show the keyword docs while goto implementation will bring the user to the `poll` function of the `Future` implementation.
![Code_CJmZ3FGFVn](https://user-images.githubusercontent.com/3757771/183076683-c9899bd6-60d3-461b-965f-0c0f9745e2e8.gif)

Fixes rust-lang/rust-analyzer#12810
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants