about summary refs log tree commit diff
path: root/tests/ui/wf/wf-trait-fn-where-clause.rs
blob: 9e36682e449d5e535d91bd583aefd6ee647bead5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//@ revisions: current next
//@[next] compile-flags: -Znext-solver
//@ ignore-compare-mode-next-solver (explicit revisions)

// Check that we test WF conditions for fn where clauses in a trait definition.

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

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

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

fn main() {}