]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/struct-field.rs
Rollup merge of #107169 - albertlarsan68:lock-in-pre-push, r=Mark-Simulacrum
[rust.git] / tests / rustdoc / struct-field.rs
1 #![crate_name = "foo"]
2
3
4 // @has foo/index.html '//*[@class="docblock"]/p/a[@href="struct.Foo.html#structfield.bar"]' 'Foo::bar'
5 // @has foo/index.html '//*[@class="docblock"]/p/a[@href="union.Bar.html#structfield.foo"]' 'Bar::foo'
6 // @has foo/index.html '//*[@class="docblock"]/p/a[@href="enum.Uniooon.html#variant.X"]' 'Uniooon::X'
7
8 //! Test with [Foo::bar], [Bar::foo], [Uniooon::X]
9
10 pub struct Foo {
11     pub bar: usize,
12 }
13
14 pub union Bar {
15     pub foo: u32,
16 }
17
18 pub enum Uniooon {
19     F,
20     X,
21     Y,
22 }