]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/type-placeholder-fn-in-const.rs
Rollup merge of #95426 - b-naber:valtrees-slice, r=RalfJung,oli-obk
[rust.git] / src / test / ui / typeck / type-placeholder-fn-in-const.rs
1 struct MyStruct;
2
3 trait Test {
4     const TEST: fn() -> _;
5     //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for functions [E0121]
6     //~| ERROR: the placeholder `_` is not allowed within types on item signatures for constants [E0121]
7 }
8
9 impl Test for MyStruct {
10     const TEST: fn() -> _ = 42;
11     //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for functions [E0121]
12 }
13
14 fn main() {}