]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/struct-field.rs
Rollup merge of #48658 - llogiq:no-more-cas, r=kennytm
[rust.git] / src / test / rustdoc / struct-field.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
11 #![crate_name = "foo"]
12
13 // ignore-tidy-linelength
14
15 // @has foo/index.html '//*[@class="docblock"]/p/a[@href="../foo/struct.Foo.html#structfield.bar"]' 'Foo::bar'
16 // @has foo/index.html '//*[@class="docblock"]/p/a[@href="../foo/union.Bar.html#structfield.foo"]' 'Bar::foo'
17 // @has foo/index.html '//*[@class="docblock"]/p/a[@href="../foo/enum.Uniooon.html#X.v"]' 'Uniooon::X'
18
19 //! Test with [Foo::bar], [Bar::foo], [Uniooon::X]
20
21 pub struct Foo {
22     pub bar: usize,
23 }
24
25 pub union Bar {
26     pub foo: u32,
27 }
28
29 pub enum Uniooon {
30     F,
31     X,
32     Y,
33 }