summaryrefslogtreecommitdiffstats
path: root/tests/ui/wf/wf-trait-fn-ret.rs
blob: f49e43087701b3963ccc915219670591f6ee07bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Check that we test WF conditions for fn return types in a trait definition.

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

struct Bar<T:Eq+?Sized> { value: Box<T> }

trait Foo {
    fn bar(&self) -> &Bar<Self>;
        //~^ ERROR E0277
        //
        // Here, Eq ought to be implemented.
}

fn main() { }