mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
13 lines
423 B
Rust
13 lines
423 B
Rust
trait Trait {
|
|
const ASSOC: i32;
|
|
}
|
|
|
|
impl Trait for () {
|
|
const ASSOC: &dyn Fn(_) = 1i32;
|
|
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated constants
|
|
//~| WARN `&` without an explicit lifetime name cannot be used here
|
|
//~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
|
}
|
|
|
|
fn main() {}
|