rust/tests/ui/associated-consts/infer-placeholder-in-non-suggestable-pos.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
218 B
Rust
Raw Normal View History

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
}
fn main() {}