rustc/tests/ui/const-generics/assoc_const_eq_diagnostic.rs
2024-06-14 12:43:07 +02:00

20 lines
368 B
Rust

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