rust/tests/ui/wf/wf-trait-fn-where-clause.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
478 B
Rust
Raw Permalink Normal View History

2025-01-22 06:40:43 +00:00
//@ revisions: current next
//@[next] compile-flags: -Znext-solver
//@ ignore-compare-mode-next-solver (explicit revisions)
2025-01-22 06:40:43 +00:00
// Check that we test WF conditions for fn where clauses in a trait definition.
#![allow(dead_code)]
#![allow(unused_variables)]
2025-01-22 06:40:43 +00:00
struct Bar<T: Eq + ?Sized> {
value: Box<T>,
}
trait Foo {
2025-01-22 06:40:43 +00:00
fn bar(&self)
where
Self: Sized,
Bar<Self>: Copy;
//~^ ERROR E0277
//
// Here, Eq ought to be implemented.
}
2025-01-22 06:40:43 +00:00
fn main() {}