Status : would love to declare a ` fn do_stuff(doer : impl AbleToDoStuff) -> () {}; ` @rustlang are there any discussions / rfcs on using impl traits within function declaration properties ? :)
-
-
My bad it works indeed ! I vas actually concerned about this use case : `impl Trait` not allowed outside of function and inherent method return types ` let a = Dog {}; let b = Cat {}; let animals: Vec<impl MakesNoise> = vec![a, b]; make_some_noise(animals); `
-
https://gist.github.com/o0Ignition0o/73cde984e5cb6559327fd16bff6ccf32 … a full gist would actually be less stupid, sorry ^^
- 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.