1 // Copyright 2016 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.
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.
17 pub fn by_ref(&self) {}
18 pub fn by_explicit_ref(self: &Foo) {}
19 pub fn by_mut_ref(&mut self) {}
20 pub fn by_explicit_mut_ref(self: &mut Foo) {}
21 pub fn static_foo() {}
26 fn deref(&self) -> &Foo { loop {} }
29 // @has issue_35169/Bar.t.html
30 // @has issue_35169/struct.Bar.html
31 // @has - '//*[@id="by_ref.v"]' 'fn by_ref(&self)'
32 // @has - '//*[@id="method.by_ref"]' 'fn by_ref(&self)'
33 // @has - '//*[@id="by_explicit_ref.v"]' 'fn by_explicit_ref(self: &Foo)'
34 // @has - '//*[@id="method.by_explicit_ref"]' 'fn by_explicit_ref(self: &Foo)'
35 // @!has - '//*[@id="by_mut_ref.v"]' 'fn by_mut_ref(&mut self)'
36 // @!has - '//*[@id="method.by_mut_ref"]' 'fn by_mut_ref(&mut self)'
37 // @!has - '//*[@id="by_explicit_mut_ref.v"]' 'fn by_explicit_mut_ref(self: &mut Foo)'
38 // @!has - '//*[@id="method.by_explicit_mut_ref"]' 'fn by_explicit_mut_ref(self: &mut Foo)'
39 // @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
40 // @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'