about summary refs log tree commit diff
path: root/tests/ui/wf/wf-in-fn-ret.rs
blob: 3e9b9787cc5770455529ade9ae8b20118ff4c778 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Check that we enforce WF conditions also for return types in fn items.

#![feature(rustc_attrs)]
#![allow(dead_code)]

struct MustBeCopy<T: Copy> {
    t: T,
}

fn bar<T>() -> MustBeCopy<T> //~ ERROR E0277
//~^ ERROR mismatched types
{
}

fn main() {}