rustdoc: Clean up some htmldocck tests

Fix #21740
This commit is contained in:
Tom Jakubowski 2015-02-05 23:54:11 -08:00
parent 189930fcae
commit 43b8503568
3 changed files with 16 additions and 16 deletions

View File

@ -32,5 +32,4 @@
pub fn foo() {}
// @!has foo/fn.foo.html invisible
// @matches - //pre '#.*\[.*derive.*\(.*Eq.*\).*\].*//.*Bar'
// @matches - //pre "#\[derive\(PartialEq\)\] // Bar"

View File

@ -15,8 +15,8 @@ pub struct Alpha;
// @matches foo/struct.Bravo.html '//pre' "pub struct Bravo<B>"
pub struct Bravo<B>;
// @matches foo/struct.Alpha.html '//*[@class="impl"]//code' "impl !.*Send.* for .*Alpha"
// @matches foo/struct.Alpha.html '//*[@class="impl"]//code' "impl !Send for Alpha"
impl !Send for Alpha {}
// @matches foo/struct.Bravo.html '//*[@class="impl"]//code' "impl<B> !.*Send.* for .*Bravo.*<B>"
// @matches foo/struct.Bravo.html '//*[@class="impl"]//code' "impl<B> !Send for Bravo<B>"
impl<B> !Send for Bravo<B> {}

View File

@ -10,29 +10,30 @@
pub trait MyTrait {}
// @matches foo/struct.Alpha.html '//pre' "Alpha.*where.*A:.*MyTrait"
// @has foo/struct.Alpha.html '//pre' "pub struct Alpha<A> where A: MyTrait"
pub struct Alpha<A> where A: MyTrait;
// @matches foo/trait.Bravo.html '//pre' "Bravo.*where.*B:.*MyTrait"
// @has foo/trait.Bravo.html '//pre' "pub trait Bravo<B> where B: MyTrait"
pub trait Bravo<B> where B: MyTrait {}
// @matches foo/fn.charlie.html '//pre' "charlie.*where.*C:.*MyTrait"
// @has foo/fn.charlie.html '//pre' "pub fn charlie<C>() where C: MyTrait"
pub fn charlie<C>() where C: MyTrait {}
pub struct Delta<D>;
// @matches foo/struct.Delta.html '//*[@class="impl"]//code' "impl.*Delta.*where.*D:.*MyTrait"
// @has foo/struct.Delta.html '//*[@class="impl"]//code' \
// "impl<D> Delta<D> where D: MyTrait"
impl<D> Delta<D> where D: MyTrait {
pub fn delta() {}
}
pub struct Echo<E>;
// @matches foo/struct.Echo.html '//*[@class="impl"]//code' \
// "impl.*MyTrait.*for.*Echo.*where.*E:.*MyTrait"
// @matches foo/trait.MyTrait.html '//*[@id="implementors-list"]//code' \
// "impl.*MyTrait.*for.*Echo.*where.*E:.*MyTrait"
// @has foo/struct.Echo.html '//*[@class="impl"]//code' \
// "impl<E> MyTrait for Echo<E> where E: MyTrait"
// @has foo/trait.MyTrait.html '//*[@id="implementors-list"]//code' \
// "impl<E> MyTrait for Echo<E> where E: MyTrait"
impl<E> MyTrait for Echo<E> where E: MyTrait {}
pub enum Foxtrot<F> {}
// @matches foo/enum.Foxtrot.html '//*[@class="impl"]//code' \
// "impl.*MyTrait.*for.*Foxtrot.*where.*F:.*MyTrait"
// @matches foo/trait.MyTrait.html '//*[@id="implementors-list"]//code' \
// "impl.*MyTrait.*for.*Foxtrot.*where.*F:.*MyTrait"
// @has foo/enum.Foxtrot.html '//*[@class="impl"]//code' \
// "impl<F> MyTrait for Foxtrot<F> where F: MyTrait"
// @has foo/trait.MyTrait.html '//*[@id="implementors-list"]//code' \
// "impl<F> MyTrait for Foxtrot<F> where F: MyTrait"
impl<F> MyTrait for Foxtrot<F> where F: MyTrait {}