55559d93e7
If a const is expected, resolve a const. If a type is expected, resolve a type. Don't try to resolve a type first falling back to consts.
20 lines
368 B
Rust
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() {}
|