about summary refs log tree commit diff
path: root/tests/rustdoc/constant/link-assoc-const.rs
blob: 56b82fb2d39b3f6f099f49cb14e14cf8d775c2bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![crate_name = "foo"]

//@ has foo/index.html '//a[@href="foo/constant.FIRSTCONST.html"]' 'foo::FIRSTCONST'
//@ has foo/index.html '//a[@href="struct.Bar.html#associatedconstant.CONST"]' 'Bar::CONST'

//! We have here [`foo::FIRSTCONST`] and [`Bar::CONST`].

pub mod foo {
    pub const FIRSTCONST: u32 = 42;
}

pub struct Bar;

impl Bar {
    pub const CONST: u32 = 42;
}