]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/issue-19055.rs
Auto merge of #24181 - jgallagher:aarch64-hfa, r=pnkfelix
[rust.git] / src / test / rustdoc / issue-19055.rs
1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // @has issue_19055/trait.Any.html
12 pub trait Any {}
13
14 impl<'any> Any + 'any {
15     // @has - '//*[@id="method.is"]' 'fn is'
16     pub fn is<T: 'static>(&self) -> bool { loop {} }
17
18     // @has - '//*[@id="method.downcast_ref"]' 'fn downcast_ref'
19     pub fn downcast_ref<T: 'static>(&self) -> Option<&T> { loop {} }
20
21     // @has - '//*[@id="method.downcast_mut"]' 'fn downcast_mut'
22     pub fn downcast_mut<T: 'static>(&mut self) -> Option<&mut T> { loop {} }
23 }
24
25 pub trait Foo {
26     fn foo(&self) {}
27 }
28
29 // @has - '//*[@id="method.foo"]' 'fn foo'
30 impl Foo for Any {}