Conversation
|
How does this relate to function pointers and closures? Will we be able to do something like |
|
Could trait methods be given an extra type parameter corresponding to the type of the implementer when bound as a function? e.g. trait Foo {
fn method<A: Bar>(&self, bob: &Self) -> Box<A>;
}binds pseudo-mod Foo {
fn method<T: Foo, A: Bar>(alice: &T, bob: &T) -> Box<A>
}Edit: to disambiguate between trait object member and trait method, I supposed one can call it with explicit type/lifetime parameters ( |
active/0000-ufcs.md
Outdated
There was a problem hiding this comment.
Typo to_struivalent -- you ran :%s/eq/to_str/g?
There was a problem hiding this comment.
Yeah I think he was using Eq for all the examples and switched to ToStr - gave me a little chuckle.
|
I think the most natural syntax for |
The previous implementation would lead to `Future::wait` deadlocking if `thread::park` was called during a `poll`. Instead let's keep track of notifications send to ourself, and don't actually call `thread::park` if we get a notification. Closes rust-lang#132
A proposal to add an unambiguous syntax for referring to methods and other associated items. An adapted version of the original proposal by @nick29581.
currently active: https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md