You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: no method named `func` found for type `&mut Cat<F>` in the current scope
--> <anon>:11:14
|>
11 |> self.func()
|> ^^^^
It should also add:
note: use `(self.func)(...)` if you meant to call the function stored in the `func` field
--> <anon>:17:19
|>
11 |> let x = self.func();
|> ^^^^
which is the message that the fix for issue #2392 added.
This is not a regression, because adding:
fnmain(){let kitty = Cat{func: || 5};let x = kitty.func();}
does give this output:
error: no method named `func` found for type `Cat<[closure@<anon>:16:29: 16:33]>` in the current scope
--> <anon>:17:19
|>
17 |> let x = kitty.func();
|> ^^^^
note: use `(kitty.func)(...)` if you meant to call the function stored in the `func` field
--> <anon>:17:19
|>
17 |> let x = kitty.func();
|> ^^^^
The text was updated successfully, but these errors were encountered:
This is essentially the same as issue #2392, but in a slightly different case:
The compiler outputs:
It should also add:
which is the message that the fix for issue #2392 added.
This is not a regression, because adding:
does give this output:
The text was updated successfully, but these errors were encountered: