summary refs log tree commit diff
path: root/tests/ui/resolve/change-ty-to-const-param-sugg-1.rs
blob: b1d2595f3790f8066f55c51a73c42b89aebc286d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#![feature(adt_const_params)]
#![allow(incomplete_features)]

use std::marker::ConstParamTy;

struct Tagged<T: Tag, O: Options>;
//~^ ERROR expected trait, found enum `Tag`
//~| HELP you might have meant to write a const parameter here
//~| ERROR expected trait, found struct `Options`
//~| HELP you might have meant to write a const parameter here

#[derive(PartialEq, Eq, ConstParamTy)]
enum Tag {
    One,
    Two,
}

#[derive(PartialEq, Eq, ConstParamTy)]
struct Options {
    verbose: bool,
    safe: bool,
}

fn main() {}