mirror of https://github.com/rust-lang/rust.git
24 lines
430 B
Rust
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`
|
|
}
|