The snippet is extracted from std::str:
pub enum MaybeOwned'a {
/// A borrowed string
Slice('a str),
/// An owned string
Owned(~str)
}
impl'a Eq for MaybeOwned'a {
#[inline]
fn eq(self, _other: MaybeOwned) - bool {
true
}
}
fn main() {}
Note the Eq
fail a task with ~Any)
On Thu, Apr 17, 2014 at 8:55 AM, Edward Wang edward.yu.w...@gmail.com
wrote:
It current can compile, but judging from signatures:
std::task::try is pub fn tryT: Send(f: proc(): Send - T) - ResultT,
~Any:Send
std::result::unwrap on the other hand is implT, E: Show
It current can compile, but judging from signatures:
std::task::try is pub fn tryT: Send(f: proc(): Send - T) - ResultT,
~Any:Send
std::result::unwrap on the other hand is implT, E: Show ResultT, E { fn
unwrap(self) - T {...} }
There's no way the error part of result from task::try(...) can
Whoops, excluded the list.
I always fancy some Erlang style binary pattern matching in rust:
case X of
2#00:2, _:6 - 1;
2#01:2, _:6 - 2;
2#10:2, _:6 - 3;
2#11:2, _:6 - 4
end.
Syntax is a bit alien but we can adapt that to the rust land.
-Ed
On Fri, Mar 28, 2014 at 9:09 PM,
I think so.
https://github.com/mozilla/rust/blob/master/src/librustc/middle/lang_items.rsemployes
such a trick.
-Ed
On Wed, Mar 26, 2014 at 3:42 AM, Ziad Hatahet hata...@gmail.com wrote:
Would a macro address this situation?
--
Ziad
On Mon, Mar 24, 2014 at 5:12 PM, comex
, but if you are doing more there's a chance you could run into
each other.
-Erick
On Sat, Mar 22, 2014 at 7:24 AM, Edward Wang edward.yu.w...@gmail.comwrote:
Hi,
I'm in the process of fixing a `ty_trait` variance inference bug, which
will void the following code in json.rs:
pub struct
posted on this list and to a reddit thread on /r/rust, but it sounds
like what I was trying to do is just not possible at present.
On Sat, Mar 22, 2014 at 12:00 PM, Josh Matthews j...@joshmatthews.netwrote:
Whoops, excluded the mailing list.
On 22 March 2014 11:53, Edward Wang edward.yu.w
Comex,
I think it would. And it's also quite close to my Hash/Hasher analogy. The
only problem seems to be that the scope will be too big.
-Ed
On Sun, Mar 23, 2014 at 1:43 AM, comex com...@gmail.com wrote:
On Sat, Mar 22, 2014 at 10:24 AM, Edward Wang edward.yu.w...@gmail.com
wrote
Hi list,
I built a rustc minutes ago from the source to pull down Niko's fix for
temporary lifetime (https://github.com/mozilla/rust/pull/11585). It works
great. In the meantime, there seems to be a possible regression introduced
by unknown commit of the past day or so. That is, the
Well, I did. It all works very well until I pulled down the latest source.
I'd like to dive into the rust source code but where to start?
On Sat, Jan 18, 2014 at 3:48 PM, Daniel Micay danielmi...@gmail.com wrote:
On Sat, Jan 18, 2014 at 2:45 AM, Edward Wang edward.yu.w...@gmail.com
wrote
10 matches
Mail list logo