about summary refs log tree commit diff
path: root/tests/rustdoc/deref-methods-19190-foreign-type.rs
blob: 7ac0521eb296f4d464301a3bcfdfb33afdcd6f74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// https://github.com/rust-lang/rust/issues/19190

#![crate_name="issue_19190_2"]

use std::ops::Deref;

pub struct Bar;

impl Deref for Bar {
    type Target = String;
    fn deref(&self) -> &String { loop {} }
}

//@ has issue_19190_2/struct.Bar.html
//@ !has - '//*[@id="method.new"]' 'fn new() -> String'
//@ has - '//*[@id="method.as_str"]' 'fn as_str(&self) -> &str'