diff options
| author | bors <bors@rust-lang.org> | 2017-04-09 17:51:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-04-09 17:51:32 +0000 |
| commit | d616f47cd03a65fed13be2ee5527f24f6a4f7f92 (patch) | |
| tree | a3af2cda894abde784d405b75e4f8f0db4996a71 /src/test | |
| parent | fa332c901575da70ac7a612609a26b752b1adc65 (diff) | |
| parent | 8dd4c44ef6c851afcc9651c9b32df005e35d0d1d (diff) | |
| download | rust-d616f47cd03a65fed13be2ee5527f24f6a4f7f92.tar.gz rust-d616f47cd03a65fed13be2ee5527f24f6a4f7f92.zip | |
Auto merge of #41084 - QuietMisdreavus:rustdoc-format-redux, r=frewsxcxv,GuillaumeGomez
rustdoc: update formatting of fn signatures and where clauses to match style rfcs Recent updates to style RFCs ([where clauses](https://github.com/rust-lang-nursery/fmt-rfcs/issues/38), [function definitions](https://github.com/rust-lang-nursery/fmt-rfcs/issues/39)) changed the "canonical" style for these items, so this is a rustdoc update to make it emit that style where necessary. This is mainly a conversion from visual indent to block indent, which helps out in situations where there was excessive indent causing lines to wrap regardless. Samples:        fixes #41025 and #40687 r? @rust-lang/docs
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/rustdoc/impl-parts.rs | 4 | ||||
| -rw-r--r-- | src/test/rustdoc/issue-20727-4.rs | 4 | ||||
| -rw-r--r-- | src/test/rustdoc/where.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/test/rustdoc/impl-parts.rs b/src/test/rustdoc/impl-parts.rs index 89c5e60e343..48ef4b6be66 100644 --- a/src/test/rustdoc/impl-parts.rs +++ b/src/test/rustdoc/impl-parts.rs @@ -17,7 +17,7 @@ impl AnOibit for .. {} pub struct Foo<T> { field: T } // @has impl_parts/struct.Foo.html '//*[@class="impl"]//code' \ -// "impl<T: Clone> !AnOibit for Foo<T> where T: Sync" +// "impl<T: Clone> !AnOibit for Foo<T> where T: Sync," // @has impl_parts/trait.AnOibit.html '//*[@class="item-list"]//code' \ -// "impl<T: Clone> !AnOibit for Foo<T> where T: Sync" +// "impl<T: Clone> !AnOibit for Foo<T> where T: Sync," impl<T: Clone> !AnOibit for Foo<T> where T: Sync {} diff --git a/src/test/rustdoc/issue-20727-4.rs b/src/test/rustdoc/issue-20727-4.rs index 9ebd1c448ee..960e40b0709 100644 --- a/src/test/rustdoc/issue-20727-4.rs +++ b/src/test/rustdoc/issue-20727-4.rs @@ -35,7 +35,7 @@ pub trait IndexMut<Idx: ?Sized>: Index<Idx> { pub mod reexport { // @has issue_20727_4/reexport/trait.Index.html - // @has - '//*[@class="rust trait"]' 'trait Index<Idx> where Idx: ?Sized {' + // @has - '//*[@class="rust trait"]' 'trait Index<Idx> where Idx: ?Sized, {' // @has - '//*[@class="rust trait"]' 'type Output: ?Sized' // @has - '//*[@class="rust trait"]' \ // 'fn index(&self, index: Idx) -> &Self::Output' @@ -43,7 +43,7 @@ pub mod reexport { // @has issue_20727_4/reexport/trait.IndexMut.html // @has - '//*[@class="rust trait"]' \ - // 'trait IndexMut<Idx>: Index<Idx> where Idx: ?Sized {' + // 'trait IndexMut<Idx>: Index<Idx> where Idx: ?Sized, {' // @has - '//*[@class="rust trait"]' \ // 'fn index_mut(&mut self, index: Idx) -> &mut Self::Output;' pub use issue_20727::IndexMut; diff --git a/src/test/rustdoc/where.rs b/src/test/rustdoc/where.rs index d8dc115abf9..e691f7c5bea 100644 --- a/src/test/rustdoc/where.rs +++ b/src/test/rustdoc/where.rs @@ -44,5 +44,5 @@ pub enum Foxtrot<F> { Foxtrot1(F) } impl<F> MyTrait for Foxtrot<F> where F: MyTrait {} // @has foo/type.Golf.html '//pre[@class="rust typedef"]' \ -// "type Golf<T> where T: Clone = (T, T)" +// "type Golf<T> where T: Clone, = (T, T)" pub type Golf<T> where T: Clone = (T, T); |
