about summary refs log tree commit diff
path: root/tests/ui/wf/wf-trait-default-fn-ret.rs
blob: a7f83dcf678aa1e8e9d5918db5d7c38b619328f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Check that we test WF conditions for fn arguments.

#![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() { }