rust/tests/ui/wf/wf-inherent-impl-method-where-clause.rs
2023-01-11 09:32:08 +00:00

18 lines
277 B
Rust

// Test that we check where-clauses on inherent impl methods.
#![feature(associated_type_defaults)]
#![allow(dead_code)]
trait ExtraCopy<T:Copy> { }
struct Foo<T,U>(T,U);
impl<T,U> Foo<T,U> {
fn foo(self) where T: ExtraCopy<U> //~ ERROR E0277
{}
}
fn main() { }