about summary refs log tree commit diff
path: root/tests/rustdoc/const-fn-76501.rs
blob: fac49b0fd20fd63745a6a40429a4a3dbdd15c439 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// https://github.com/rust-lang/rust/issues/76501
#![crate_name="foo"]

//@ has 'foo/fn.bloop.html' '//pre' 'pub const fn bloop() -> i32'
/// A useless function that always returns 1.
pub const fn bloop() -> i32 {
    1
}

/// A struct.
pub struct Struct {}

impl Struct {
    //@ has 'foo/struct.Struct.html' '//*[@class="method"]' \
    // 'pub const fn blurp() -> i32'
    /// A useless function that always returns 1.
    pub const fn blurp() -> i32 {
        1
    }
}