rust/tests/ui/wf/wf-trait-fn-arg.rs

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

23 lines
459 B
Rust
Raw 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)
// Check that we test WF conditions for fn arguments in a trait definition.
#![feature(rustc_attrs)]
#![allow(dead_code)]
#![allow(unused_variables)]
2025-01-22 06:40:43 +00:00
struct Bar<T: Eq + ?Sized> {
value: Box<T>,
}
trait Foo {
fn bar(&self, x: &Bar<Self>);
2025-01-22 06:40:43 +00:00
//~^ ERROR E0277
//
// Here, Eq ought to be implemented.
}
2025-01-22 06:40:43 +00:00
fn main() {}