]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/synthetic_auto/lifetimes.rs
Sort synthetic impls bounds before rendering
[rust.git] / src / test / rustdoc / synthetic_auto / lifetimes.rs
1 // Copyright 2018 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 pub struct Inner<'a, T: 'a> {
11     field: &'a T,
12 }
13
14 unsafe impl<'a, T> Send for Inner<'a, T>
15 where
16     'a: 'static,
17     T: for<'b> Fn(&'b bool) -> &'a u8,
18 {}
19
20 // @has lifetimes/struct.Foo.html
21 // @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]/*/code' "impl<'c, K> Send \
22 // for Foo<'c, K> where K: for<'b> Fn(&'b bool) -> &'c u8, 'c: 'static"
23 //
24 // @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]/*/code' "impl<'c, K> Sync \
25 // for Foo<'c, K> where K: Sync"
26 pub struct Foo<'c, K: 'c> {
27     inner_field: Inner<'c, K>,
28 }