summaryrefslogtreecommitdiffstats
path: root/src/test/ui/wf/wf-trait-default-fn-ret.rs
blob: 2103dae8d233a83a746690e9ee7d729145d40bce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Check that we test WF conditions for fn arguments. Because the
// current code is so goofy, this is only a warning for now.

#![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.
        loop { }
    }
}

fn main() { }