To complete my understanding: is there a reason a 'sufficiently smart
compiler' in the future couldn't do this conversion implicitly?
I.e. if a function takes a borrowed reference to a container of pointers,
could the compiler ignore what type of pointers they are (because they
won't be going out
It would be necessary (but not sufficient*) for them to have the same
in-memory representation, and currently ~str and str don't.
~str is `*{ length: uint, capacity: uint, data... }`, a pointer to a
vector with the length and capacity stored inline, i.e. one word; str
is just `{ data: *u8,
Hi List,
First off, this came up today when I started on a set of rust bindings for
libgit2. I skimmed around, but if anyone else is working on the same thing,
let's combine effort.
To my point:
I'm writing bindings by hand instead of using bindgen for now to get a better
feel for rust.
I
You are right in that the __morestack function is a requirement from
enabling segmented stacks in LLVM. While we no longer use truly
segmented stacks, we still use the segmented stack prologue in order
to detect stack overflow. This is a crucial piece of infrastructure
for rust code used to ensure
On 3/24/14 2:45 AM, Richo Healey wrote:
I get a compile error:
src/repository.rs:24:17: 24:54 error: expected constant expr for vector
length: non-constant path in constant expr
src/repository.rs:24 cvar_cache: [GitCvarValue, ..
GIT_CVAR_CACHE_MAX] // git_cvar_value
Nope; we can't use casts of enum values in type signatures. This is
discussed in https://github.com/mozilla/rust/issues/5873 .
Cheers,
Josh
On 24 March 2014 11:26, Patrick Walton pcwal...@mozilla.com wrote:
On 3/24/14 2:45 AM, Richo Healey wrote:
I get a compile error:
Thanks, Ben. Sounds like I'm going to need to rethink a few things to
make sure --libdir works sanely. I can imagine how it may work correctly
right now from a source-only installer. rustc may need some tweaks to
make it work more generally.
On 03/22/2014 11:49 AM, Ben Noordhuis wrote:
On
On 23/03/14 03:09 PM, Erick Tryzelaar wrote:
I've been thinking of a couple alternatives that could make us as fast
as a c state machine. The simplest night be to leverage the fact that
llvm can optimize certain recursive function calls into tail calls, and
lower those into jumps. If we go
On 24/03/14 12:32 -0400, Josh Matthews wrote:
Nope; we can't use casts of enum values in type signatures. This is
discussed in https://github.com/mozilla/rust/issues/5873 .
Cheers,
Josh
I continued messing with this last night. Yurume on IRC rightfully pointed
out that having the MAX as a
On Mon, Mar 24, 2014 at 7:32 PM, Richo Healey ri...@psych0tik.net wrote:
let vec: [u8, .. FooBar::size()];
Potentially with parens ommittted, to convey that there's no runtime
computation?
Not sure if it matters, but another thing one might want to use in a
constant expression is sizeof,
10 matches
Mail list logo