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

Add examples to `TyKind::FnDef` and `TyKind::FnPtr` docs #54781

Merged
merged 2 commits into from Oct 6, 2018

Conversation

Projects
None yet
4 participants
@phansch
Contributor

phansch commented Oct 3, 2018

This adds two examples to the docs of TyKind::FnDef and TyKind::FnPtr.

I found these two types a bit confusing when I learned about them and I think adding these examples might help others.

@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive Oct 3, 2018

Collaborator

r? @varkor

(rust_highfive has picked a reviewer for you, use r? to override)

Collaborator

rust-highfive commented Oct 3, 2018

r? @varkor

(rust_highfive has picked a reviewer for you, use r? to override)

@varkor

Thanks, I think this improves the readability! Just a couple of small comments to tweak it a little more.

Show outdated Hide outdated src/librustc/ty/sty.rs Outdated
Show outdated Hide outdated src/librustc/ty/sty.rs Outdated
@phansch

This comment has been minimized.

Show comment
Hide comment
@phansch

phansch Oct 4, 2018

Contributor

Thanks for the review, it should be good now 👍

Contributor

phansch commented Oct 4, 2018

Thanks for the review, it should be good now 👍

@varkor

This comment has been minimized.

Show comment
Hide comment
@varkor

varkor Oct 5, 2018

Contributor

Thanks!

@bors r+ rollup

Contributor

varkor commented Oct 5, 2018

Thanks!

@bors r+ rollup

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Oct 5, 2018

Contributor

📌 Commit 769b383 has been approved by varkor

Contributor

bors commented Oct 5, 2018

📌 Commit 769b383 has been approved by varkor

pietroalbini added a commit to pietroalbini/rust that referenced this pull request Oct 5, 2018

Rollup merge of rust-lang#54781 - phansch:master, r=varkor
Add examples to `TyKind::FnDef` and `TyKind::FnPtr` docs

This adds two examples to the docs of `TyKind::FnDef` and `TyKind::FnPtr`.

I found these two types a bit confusing when I learned about them and I think adding these examples might help others.

bors added a commit that referenced this pull request Oct 6, 2018

Auto merge of #54859 - pietroalbini:rollup, r=pietroalbini
Rollup of 11 pull requests

Successful merges:

 - #54078 (Expand the documentation for the `std::sync` module)
 - #54717 (Cleanup rustc/ty part 1)
 - #54781 (Add examples to `TyKind::FnDef` and `TyKind::FnPtr` docs)
 - #54787 (Only warn about unused `mut` in user-written code)
 - #54804 (add suggestion for inverted function parameters)
 - #54812 (Regression test for #32382.)
 - #54833 (make `Parser::parse_foreign_item()` return a foreign item or error)
 - #54834 (rustdoc: overflow:auto doesn't work nicely on small screens)
 - #54838 (Fix typo in src/libsyntax/parse/parser.rs)
 - #54851 (Fix a regression in 1.30 by reverting #53564)
 - #54853 (Remove unneccessary error from test, revealing NLL error.)

Failed merges:

r? @ghost

@bors bors merged commit 769b383 into rust-lang:master Oct 6, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment