-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Conversation
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.
9ee30b7
to
6948a2d
Compare
This needs a test case, yeah? |
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 } => { |
There was a problem hiding this comment.
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
@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 |
@jroesch The tests that check rustdoc's output are in |
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.