summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/link-assoc-const.rs
blob: 75a2531a308f7d95d31d703bee35a99682e2efb3 (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;
}