rust/tests/rustdoc/deref-methods-19190-foreign...

17 lines
373 B
Rust

// 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'