]> git.proxmox.com Git - rustc.git/blob - src/test/rustdoc/issue-19055.rs
New upstream version 1.54.0+dfsg1
[rustc.git] / src / test / rustdoc / issue-19055.rs
1 // @has issue_19055/trait.Any.html
2 pub trait Any {}
3
4 impl<'any> Any + 'any {
5 // @has - '//*[@id="method.is"]' 'fn is'
6 pub fn is<T: 'static>(&self) -> bool { loop {} }
7
8 // @has - '//*[@id="method.downcast_ref"]' 'fn downcast_ref'
9 pub fn downcast_ref<T: 'static>(&self) -> Option<&T> { loop {} }
10
11 // @has - '//*[@id="method.downcast_mut"]' 'fn downcast_mut'
12 pub fn downcast_mut<T: 'static>(&mut self) -> Option<&mut T> { loop {} }
13 }
14
15 pub trait Foo {
16 fn foo(&self) {}
17 }
18
19 // @has - '//*[@id="method.foo"]' 'fn foo'
20 impl Foo for Any {}