Make rustdoc not include self-by-value methods from Deref target
This commit is contained in:
parent
5041b3bb3d
commit
32af136fb0
4 changed files with 14 additions and 13 deletions
|
|
@ -15,8 +15,8 @@ use std::ops::Deref;
|
|||
pub struct Foo;
|
||||
|
||||
impl Deref for Foo {
|
||||
type Target = i32;
|
||||
fn deref(&self) -> &i32 { loop {} }
|
||||
type Target = String;
|
||||
fn deref(&self) -> &String { loop {} }
|
||||
}
|
||||
|
||||
pub struct Bar;
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ use std::ops::Deref;
|
|||
pub struct Bar;
|
||||
|
||||
impl Deref for Bar {
|
||||
type Target = i32;
|
||||
fn deref(&self) -> &i32 { loop {} }
|
||||
type Target = String;
|
||||
fn deref(&self) -> &String { loop {} }
|
||||
}
|
||||
|
||||
// @has issue_19190_2/struct.Bar.html
|
||||
// @has - '//*[@id="method.count_ones"]' 'fn count_ones(self) -> u32'
|
||||
// @!has - '//*[@id="method.min_value"]' 'fn min_value() -> i32'
|
||||
// @!has - '//*[@id="method.new"]' 'fn new() -> String'
|
||||
// @has - '//*[@id="method.as_str"]' 'fn as_str(&self) -> &str'
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ use std::ops::Deref;
|
|||
use issue_19190_3::Baz;
|
||||
|
||||
// @has issue_19190_3/struct.Foo.html
|
||||
// @has - '//*[@id="method.count_ones"]' 'fn count_ones(self) -> u32'
|
||||
// @!has - '//*[@id="method.min_value"]' 'fn min_value() -> i32'
|
||||
// @has - '//*[@id="method.as_str"]' 'fn as_str(&self) -> &str'
|
||||
// @!has - '//*[@id="method.new"]' 'fn new() -> String'
|
||||
pub use issue_19190_3::Foo;
|
||||
|
||||
// @has issue_19190_3/struct.Bar.html
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue