mirror of https://github.com/rust-lang/rust
16 lines
576 B
Rust
16 lines
576 B
Rust
struct MyStruct;
|
|
|
|
trait Test {
|
|
const TEST: fn() -> _;
|
|
//~^ ERROR: the placeholder `_` is not allowed within types on item signatures for functions [E0121]
|
|
//~| 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 functions [E0121]
|
|
//~| ERROR: the placeholder `_` is not allowed within types on item signatures for associated constants [E0121]
|
|
}
|
|
|
|
fn main() {}
|