2023-03-09 01:42:45 -06:00
|
|
|
#![feature(fn_traits)]
|
|
|
|
#![feature(unboxed_closures)]
|
|
|
|
|
|
|
|
struct S;
|
|
|
|
|
|
|
|
impl Fn(u32) -> u32 for S {
|
2024-05-27 16:53:46 -05:00
|
|
|
//~^ ERROR associated item constraints are not allowed here [E0229]
|
2023-10-31 08:45:26 -05:00
|
|
|
//~| ERROR expected a `FnMut(u32)` closure, found `S`
|
2023-03-09 01:42:45 -06:00
|
|
|
fn call(&self) -> u32 {
|
2023-10-31 08:45:26 -05:00
|
|
|
//~^ ERROR method `call` has 1 parameter but the declaration in trait `call` has 2
|
2023-03-09 01:42:45 -06:00
|
|
|
5
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|