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

Support all variants of WherePredicate in clean/mod.rs #20180

Merged
merged 2 commits into from
Dec 25, 2014

Conversation

jroesch
Copy link
Member

@jroesch jroesch commented Dec 23, 2014

Add support for all variants of ast::WherePredicate in clean/mod.rs. Fixes #20048, but will need modification when EqualityPredicates are fully implemented in #20041.

@rust-highfive
Copy link
Collaborator

r? @huonw

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

Adds support for all variants of ast::WherePredicate in clean/mod.rs. Fixes rust-lang#20048, but will need modification when EqualityPredicates are fully implemented in rust-lang#20041.
@jroesch
Copy link
Member Author

jroesch commented Dec 23, 2014

cc @tomjakubowski

@tamird
Copy link
Contributor

tamird commented Dec 23, 2014

This needs a test case, yeah?

@tomjakubowski
Copy link
Contributor

It could have a test but rustdoc tests are pretty awful to write (the existing ones are Makefiles that call grep, pretty much).

let bounds = pred.bounds.as_slice();
try!(write!(f, "{}: {}", pred.ty, TyParamBounds(bounds)));
match pred {
&clean::WherePredicate::BoundPredicate {ref ty, ref bounds } => {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: should have a space between { and ref

@jroesch
Copy link
Member Author

jroesch commented Dec 24, 2014

@tomjakubowski @tamird I am always happy to have more tests if you think it is worth the time. I have plenty of downtime during compilation/debug cycles. I addressed your nit, and removed the commas between the match arms since they are just noise when using {}.

@tomjakubowski
Copy link
Contributor

@jroesch The tests that check rustdoc's output are in src/test/run-make/rustdoc-*/. I forgot there's already one for where clauses that can just be extended for these cases 👍

bors added a commit that referenced this pull request Dec 25, 2014
…hton

Add support for all variants of ast::WherePredicate in clean/mod.rs. Fixes #20048, but will need modification when EqualityPredicates are fully implemented in #20041.
@bors bors merged commit 1775292 into rust-lang:master Dec 25, 2014
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.

Add support for all variants of ast::WherePredicate in clean/mod.rs
7 participants