about summary refs log tree commit diff
path: root/tests/ui/const-generics/assoc_const_eq_diagnostic.rs
blob: 573d8055a79cdd397fc93e75aea21fbfc75da72c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#![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() {}