rustdoc: where clause adjustment to fix tests
- add spaces to output so stripping lines and breaking spaces renders the same - add commas to where clauses in rustdoc tests to match the new output
This commit is contained in:
parent
36bc448c00
commit
ae0e45c028
5 changed files with 14 additions and 11 deletions
|
|
@ -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 {}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue