rust/tests/ui/const-generics/assoc_const_eq_diagnostic.rs
2025-11-27 11:19:00 -05:00

21 lines
411 B
Rust

//@ edition:2015
#![feature(associated_const_equality)]
pub enum Mode {
Cool,
}
pub trait Parse {
const MODE: Mode;
}
pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
//~^ ERROR expected constant, found type
//~| ERROR expected constant, found type
//~| ERROR expected constant, found type
//~| ERROR expected type
fn no_help() -> Mode::Cool {}
//~^ ERROR expected type, found variant
fn main() {}