These are chat archives for rust-lang/rust

14th
Nov 2017
red75prime
@red75prime
Nov 14 2017 06:01
@alteous I still don't understand it. foo goes from &x to <TypeOfX as Family>::Foo::default(). Type deduction assigns <TypeOfX as Family>::Foo type to the y binding. So what you really need is explicit type annotation for y?
samoylovfp
@samoylovfp
Nov 14 2017 14:09
Is it ethical to offer small financial encouragements to PRs that you really want to see done? I wonder why noone did this
Marcel
@marcelbuesing
Nov 14 2017 14:11
@samoylovfp you mean in general ? I think there is e.g. https://www.bountysource.com/
samoylovfp
@samoylovfp
Nov 14 2017 14:12
Oh this looks exactly like what i was thinking about, thanks!
David McGillicuddy
@djmcgill
Nov 14 2017 22:05
Hi, I'm having a little lifetime trouble/not really understanding move closures. I have a struct and I'd like to have a function that takes a reference to the function, and returns an optional reference to some member inside the struct. It works fine for the immutable case, but when I write get_mut I get an error advising me to use a move closure to take ownership of self. But I only have a mutable pointer to the variable self, how can I take ownership of it? I have a minimal case here: https://play.rust-lang.org/?gist=161be2bdf39ad60c07f71441227dc0da&version=stable
Unless in that error message, one self is referring to the method variable self and the other self is referring to the closure itself or something...