Auto merge of #31596 - mitaa:rdoc_assoc_item, r=alexcrichton

This commit is contained in:
bors 2016-02-13 19:28:09 +00:00
commit c438802aa7
5 changed files with 11 additions and 13 deletions

View file

@ -20,7 +20,7 @@ pub trait Foo {
pub struct Bar;
impl Bar {
// @has assoc_consts/struct.Bar.html '//*[@id="assoc_const.BAR"]' \
// @has assoc_consts/struct.Bar.html '//*[@id="associatedconstant.BAR"]' \
// 'const BAR: usize = 3'
pub const BAR: usize = 3;
}

View file

@ -14,5 +14,5 @@
extern crate issue_21092;
// @has issue_21092/struct.Bar.html
// @has - '//*[@id="assoc_type.Bar"]' 'type Bar = i32'
// @has - '//*[@id="associatedtype.Bar"]' 'type Bar = i32'
pub use issue_21092::{Foo, Bar};

View file

@ -31,21 +31,21 @@ impl<T> Foo<T> {
}
impl<T> Bar for Foo<T> {
// @has - '//*[@id="assoc_type.Item"]//code' 'type Item = T'
// @has - '//*[@id="associatedtype.Item"]//code' 'type Item = T'
type Item=T;
// @has - '//*[@id="method.quux"]//code' 'fn quux(self)'
fn quux(self) {}
}
impl<'a, T> Bar for &'a Foo<T> {
// @has - '//*[@id="assoc_type.Item-1"]//code' "type Item = &'a T"
// @has - '//*[@id="associatedtype.Item-1"]//code' "type Item = &'a T"
type Item=&'a T;
// @has - '//*[@id="method.quux-1"]//code' 'fn quux(self)'
fn quux(self) {}
}
impl<'a, T> Bar for &'a mut Foo<T> {
// @has - '//*[@id="assoc_type.Item-2"]//code' "type Item = &'a mut T"
// @has - '//*[@id="associatedtype.Item-2"]//code' "type Item = &'a mut T"
type Item=&'a mut T;
// @has - '//*[@id="method.quux-2"]//code' 'fn quux(self)'