rust/tests/ui/impl-trait/in-trait/dont-probe-missing-item-nam...

24 lines
430 B
Rust

trait ServerFn {
type Output;
fn run_body() -> impl Sized;
}
struct MyServerFn {}
macro_rules! f {
() => {
impl ServerFn for MyServerFn {
type Output = ();
fn run_body() -> impl Sized {}
}
};
}
f! {}
fn problem<T: ServerFn<Output = i64>>(_: T) {}
fn main() {
problem(MyServerFn {});
//~^ ERROR type mismatch resolving `<MyServerFn as ServerFn>::Output == i64`
}