Brian Anderson
a614f2820f
syntax: Test parsing of long binary strings
2014-08-21 16:23:02 -07:00
bors
b43596b43e
auto merge of #16637 : pcwalton/rust/unboxed-closures-expected-tuple, r=pnkfelix
...
code wasn't considering the zero-argument case.
Closes #16168 .
r? @pnkfelix
2014-08-21 23:10:59 +00:00
Brian Anderson
bc7a85de29
syntax: Fix complexity of string parsing. Closes #16624 .
2014-08-21 15:47:39 -07:00
Jauhien Piatlicki
70ea0bb5f5
Fix LLVM version in configure
...
Upstream LLVM from VCS already has version 3.6,
configure fixed appropriately to allow building with it
2014-08-22 00:39:18 +02:00
bors
da796ededa
auto merge of #16635 : steveklabnik/rust/ordering_comment, r=huonw
...
This way people won't try to copy/paste it in.
This is provided as an alternate solution to #16003 . What do you think, @treeman?
2014-08-21 21:25:56 +00:00
bors
c509f79f05
auto merge of #16601 : cybergeek94/rust/master, r=alexcrichton
...
Previously, `PrettyEncoder` indented a magic constant of 2 spaces per level, which may be fine for most uses but in my use case I would like to allow the user to specify the indent step for the outputted JSON in my program.
This is small change that does not break any existing code whatsoever, and does not change the behavior of existing uses. `PrettyEncoder::new()` still uses the default of 2.
I couldn't think of any simple tests for this change. The obvious one would be to check the outputted JSON for the correct number of spaces per indent level, but I think that would be more complex than the actual change itself and test little besides correctness and consistency, which can be verified visually. There's already a test for correct parsing of pretty-printed JSON that should still pass with this change.
2014-08-21 19:40:57 +00:00
Luqman Aden
171c542965
librustc: Mark unboxed closure calls and definitions with appropriate llvm return/argument attributes.
2014-08-21 11:25:47 -07:00
Austin Bonander
1028120c40
Parameterize indent in PrettyEncoder
2014-08-21 11:04:03 -07:00
bors
f92015f71b
auto merge of #16499 : cmr/rust/struct-undef-repr, r=pcwalton
...
r? @pcwalton
2014-08-21 17:30:57 +00:00
Patrick Walton
6049b628ad
librustc: Create unboxing shims as necessary for unboxed closures.
...
Closes #16591 .
2014-08-21 10:05:28 -07:00
Corey Richardson
01d2efaffe
Fix FFI guide
2014-08-21 12:58:42 -04:00
Steve Klabnik
f6759924f4
fix module wording in guide
...
@kimundi was a bit worried this was misleading.
2014-08-21 12:14:59 -04:00
bors
4444aec142
auto merge of #16632 : pcwalton/rust/unboxed-closures-euv, r=luqmana
...
expression use visitor.
Closes #16166 .
r? @huonw
2014-08-21 14:40:57 +00:00
Vinzent Steinberg
da5e8cef59
bitv: make sure benchmarks run long enough
...
Previously they were too short (less than 10 ns), so the benchmarker
could not resolve them meaningfully. Now they should run in the order of
100 ns.
2014-08-21 10:09:36 -04:00
Vinzent Steinberg
4d41a4227c
arena: fix a typo
2014-08-21 10:09:36 -04:00
Vinzent Steinberg
c94bf8bb68
bitv: make benchmarks always return a value
...
This makes sure that the benchmarked code does not get optimized away.
Also fixed a typo.
Fixes #12118 .
2014-08-21 10:09:36 -04:00
bors
6f1b1a65ef
auto merge of #16631 : pcwalton/rust/unboxed-closures-wrong-trait, r=huonw
...
the right trait and take the method name into account.
Closes #16599 .
r? @huonw
2014-08-21 12:55:54 +00:00
bors
6de570f817
auto merge of #16487 : steveklabnik/rust/guide_ownership, r=brson
...
Whew. This section was so important, I saved it for last.
/cc @wycats, @nikomatsakis
2014-08-21 09:55:54 +00:00
Valerii Hiora
69fbef1d87
Fixed unwinding for iOS
...
Was broken by Windows adoption
2014-08-21 11:12:57 +03:00
Valerii Hiora
08a3453111
iOS compilation fix
2014-08-21 11:12:46 +03:00
bors
5305f9b894
auto merge of #16362 : nham/rust/std_rand_pi_example, r=huonw
...
Pros:
I like this example because it's concise without being trivial. The Monty Hall example code is somewhat lengthy and possibly inaccessible to those unfamiliar with probability.
Cons:
The Monty Hall example already exists. Do we need another example? Also, this is probably inaccessible to people who don't know basic geometry.
2014-08-21 07:50:55 +00:00
nham
86587224d0
Use unicode pi symbol in pi estimation example. Additional tweaks
2014-08-21 02:42:15 -04:00
nham
348132196a
Surround formula in a 'notrust' code block
2014-08-21 02:08:17 -04:00
bors
20b3313c8c
auto merge of #16471 : EduardoBautista/rust/chapter-14-fixes, r=steveklabnik
...
Just some small fixes for the guide. The cargo stuff is probably because of an update.
2014-08-21 06:05:58 +00:00
bors
e052aa65db
auto merge of #16447 : steveklabnik/rust/guide_vectors_extra, r=brson
...
Can't believe I forgot this!
2014-08-21 04:20:57 +00:00
bors
6063f7981f
auto merge of #16443 : steveklabnik/rust/fix_path_docs, r=kballard
...
Originally discovered here: http://www.reddit.com/r/rust/comments/2dbg3j/hm_unwrap_is_being_renamed_to_assert/cjnxiax
2014-08-21 02:36:00 +00:00
Corey Richardson
21bd17fcc1
Stage #[repr(packed)] in std::rt
2014-08-20 21:02:24 -04:00
Corey Richardson
cf5d28083d
libgreen: use FFI-safe types
2014-08-20 21:02:24 -04:00
Corey Richardson
2dc2ac1e6b
liblibc: don't use int/uint for intptr_t/uintptr_t
...
int/uint aren't considered FFI safe, replace them with the actual type they
represent (i64/u64 or i32/u32). This is a breaking change, but at most a cast
to `uint` or `int` needs to be added.
[breaking-change]
2014-08-20 21:02:24 -04:00
Corey Richardson
0cffa32c21
Add detailed note about Substs to ty_enum
2014-08-20 21:02:24 -04:00
Corey Richardson
c630d96166
manual: fix link
2014-08-20 21:02:23 -04:00
Corey Richardson
bc19a77631
Add #[repr(C)] to all the things!
2014-08-20 21:02:23 -04:00
Corey Richardson
6e8ff99958
librustc: handle repr on structs, require it for ffi, unify with packed
...
As of RFC 18, struct layout is undefined. Opting into a C-compatible struct
layout is now down with #[repr(C)]. For consistency, specifying a packed
layout is now also down with #[repr(packed)]. Both can be specified.
To fix errors caused by this, just add #[repr(C)] to the structs, and change
#[packed] to #[repr(packed)]
Closes #14309
[breaking-change]
2014-08-20 21:02:23 -04:00
bors
4dfdc697e9
auto merge of #16331 : steveklabnik/rust/guide_macros_and_unsafe, r=brson
...
The last two sections of the guide, and a small conclusion. I suck at conclusions.
I also realized I never covered strings, so I'm going to put that section up before we're actually 'done.'
2014-08-21 00:51:00 +00:00
Corey Richardson
54bd9e6323
docs: don't claim struct layout is specified, but mention repr
2014-08-20 19:11:25 -04:00
bors
33037fd23b
auto merge of #16280 : cburgdorf/rust/patch-3, r=steveklabnik
2014-08-20 23:06:02 +00:00
Steve Klabnik
139516685b
Guide: unsafe
2014-08-20 18:41:24 -04:00
Steve Klabnik
e918733e5f
Fix error message for WindowsPath::new
...
Originally discovered here: http://www.reddit.com/r/rust/comments/2dbg3j/hm_unwrap_is_being_renamed_to_assert/cjnxiax
2014-08-20 18:35:38 -04:00
Patrick Walton
478decf98b
librustc: Resolve nested vtable parameters in overloaded calls.
...
Closes #16508 .
2014-08-20 15:29:10 -07:00
Christoph Burgdorf
1f16437d47
fixes some syntax highlighting annotations
2014-08-20 23:23:07 +02:00
Patrick Walton
7f4c5be81a
librustc: Fix a couple of cases in which unboxed closure typechecking
...
code wasn't considering the zero-argument case.
Closes #16168 .
2014-08-20 14:14:55 -07:00
Steve Klabnik
d1e37399a2
Make note that Ordering is builtin.
...
This way people won't try to copy/paste it in.
2014-08-20 16:56:29 -04:00
Patrick Walton
24b089721f
librustc: Fix bogus logic for static calls to unboxed closures in the
...
expression use visitor.
Closes #16166 .
2014-08-20 13:16:12 -07:00
Steve Klabnik
1681f43b91
Guide: macros
2014-08-20 14:42:27 -04:00
bors
43f040dac8
auto merge of #16408 : steveklabnik/rust/guide_iterators, r=brson
...
An introduction to iterators. I kinda like this, but I kinda don't. Hmmm.
2014-08-20 18:15:53 +00:00
Patrick Walton
b0931a0a0f
librustc: When checking static method calls to unboxed closures, look at
...
the right trait and take the method name into account.
Closes #16599 .
2014-08-20 10:38:06 -07:00
bors
e11cb5bba7
auto merge of #16257 : steveklabnik/rust/guide_patterns, r=brson
...
Fixes #4417 .
2014-08-20 16:25:53 +00:00
bors
655600b01b
auto merge of #16621 : tshepang/rust/grammar, r=steveklabnik
2014-08-20 13:55:52 +00:00
bors
cb5967e002
auto merge of #16620 : tshepang/rust/tasks, r=steveklabnik
2014-08-20 12:10:58 +00:00
bors
b22e840d43
auto merge of #16618 : nham/rust/strslice_examples, r=alexcrichton
...
(By chance, the `contains` example was actually what I was trying to write when I discovered #16589 )
2014-08-20 10:25:54 +00:00