about summary refs log tree commit diff
path: root/tests/ui/typeck/type-placeholder-fn-in-const.rs
blob: 1600534dd4f8f3ad41a2779aab95061c0c1e7428 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
struct MyStruct;

trait Test {
    const TEST: fn() -> _;
    //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for associated constants [E0121]
}

impl Test for MyStruct {
    const TEST: fn() -> _ = 42;
    //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for associated constants [E0121]
}

fn main() {}