about summary refs log tree commit diff
path: root/tests/ui/wf/wf-const-type.rs
blob: 3b770b4b9163374d244c6d3f6ae07d3466384ffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Test that we check the types of constants are well-formed.

#![feature(associated_type_defaults)]

#![allow(dead_code)]

struct IsCopy<T:Copy> { t: T }
struct NotCopy;

const FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None };
//~^ ERROR E0277
//~| ERROR E0277
//~| ERROR E0277


fn main() { }