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.
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.
11 // @has issue_25001/struct.Foo.html
21 // @has - '//*[@id="method.pass"]//code' 'fn pass()'
22 // @has - '//*[@id="pass.v"]//code' 'fn pass()'
26 // @has - '//*[@id="method.pass-1"]//code' 'fn pass() -> usize'
27 // @has - '//*[@id="pass.v-1"]//code' 'fn pass() -> usize'
28 pub fn pass() -> usize { 42 }
31 // @has - '//*[@id="method.pass-2"]//code' 'fn pass() -> isize'
32 // @has - '//*[@id="pass.v-2"]//code' 'fn pass() -> isize'
33 pub fn pass() -> isize { 42 }
36 impl<T> Bar for Foo<T> {
37 // @has - '//*[@id="associatedtype.Item"]//code' 'type Item = T'
40 // @has - '//*[@id="method.quux"]//code' 'fn quux(self)'
43 impl<'a, T> Bar for &'a Foo<T> {
44 // @has - '//*[@id="associatedtype.Item-1"]//code' "type Item = &'a T"
47 // @has - '//*[@id="method.quux-1"]//code' 'fn quux(self)'
50 impl<'a, T> Bar for &'a mut Foo<T> {
51 // @has - '//*[@id="associatedtype.Item-2"]//code' "type Item = &'a mut T"
54 // @has - '//*[@id="method.quux-2"]//code' 'fn quux(self)'