1 // Copyright 2017 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 #![crate_name = "foo"]
15 pub struct Bar<T> { field: T }
17 // @has foo/trait.Foo.html '//*[@class="item-list"]//code' \
18 // "impl Foo for Bar<u8>"
19 impl Foo for Bar<u8> {}
20 // @has foo/trait.Foo.html '//*[@class="item-list"]//code' \
21 // "impl Foo for Bar<u16>"
22 impl Foo for Bar<u16> {}
23 // @has foo/trait.Foo.html '//*[@class="item-list"]//code' \
24 // "impl<'a> Foo for &'a Bar<u8>"
25 impl<'a> Foo for &'a Bar<u8> {}
35 // @has foo/trait.Foo.html '//*[@class="item-list"]//code' \
36 // "impl Foo for foo::mod1::Baz"
37 impl Foo for mod1::Baz {}
38 // @has foo/trait.Foo.html '//*[@class="item-list"]//code' \
39 // "impl<'a> Foo for &'a foo::mod2::Baz"
40 impl<'a> Foo for &'a mod2::Baz {}