]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/doc-assoc-item.rs
Rollup merge of #40723 - SamWhited:e0090_error_explanation, r=estebank
[rust.git] / src / test / rustdoc / doc-assoc-item.rs
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.
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 pub struct Foo<T> {
12     x: T,
13 }
14
15 pub trait Bar {
16     type Fuu;
17
18     fn foo(foo: Self::Fuu);
19 }
20
21 // @has doc_assoc_item/struct.Foo.html '//*[@class="impl"]' 'impl<T: Bar<Fuu = u32>> Foo<T>'
22 impl<T: Bar<Fuu = u32>> Foo<T> {
23     pub fn new(t: T) -> Foo<T> {
24         Foo {
25             x: t,
26         }
27     }
28 }