]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/type-placeholder-fn-in-const.rs
Rollup merge of #106889 - scottmcm:windows-mut, r=cuviper
[rust.git] / tests / 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() {}