Commit Graph

33623 Commits

Author SHA1 Message Date
Alex Crichton
5b043d712b Fix find check for executables
Apparently the fix in d08441b9 didn't catch a recent executable (#17965), but
I've verified that this does indeed catch the executable
2014-10-12 12:36:32 -07:00
John Kleint
67418f5509 Guide: remove promise of a counter in the guessing game.
Issue #17964.
2014-10-12 15:24:39 -04:00
Alex Crichton
18e41299f9 rustc: Warn about dead constants
A few catch-all blocks ended up not having this case for constants.

Closes #17925
2014-10-12 12:15:22 -07:00
Steven Fackler
aa3b1261b1 Continue cfg syntax transition
All deprecation warnings have been converted to errors. This includes
the warning for multiple cfgs on one item. We'll leave that as an error
for some period of time to ensure that all uses are updated before the
behavior changes from "or" to "and".
2014-10-12 11:40:19 -07:00
Jakub Wieczorek
0c48c5712d Never expand specialized columns that only contain wild patterns in them
Doing so would incur deeply nested expansion of the tree with no useful
side effects. This is problematic for "wide" data types such as structs
with dozens of fields but where only a few are actually being matched or bound.
Most notably, matching a fixed slice would use a number of stack frames that
grows with the number of elements in the slice.

Fixes #17877.
2014-10-12 20:36:48 +02:00
Erwan
d7dc97e384 fix broken link in guide-strings.md 2014-10-12 18:51:11 +02:00
Michael Gehring
785ae90f10 Fix run-pass/lang-item-public test on FreeBSD 2014-10-12 15:57:22 +02:00
Daniel Micay
4deb4bcba5 optimize position independent code in executables
Position independent code has fewer requirements in executables, so pass
the appropriate flag to LLVM in order to allow more optimization. At the
moment this means faster thread-local storage.
2014-10-12 09:18:14 -04:00
Julian Orth
3ff7a3d4ec add intmax 2014-10-12 14:08:54 +02:00
NODA, Kai
e2fed746c2 src/doc/README.md: fix a dead link.
Also make some typographical changes.
2014-10-12 17:29:07 +08:00
NODA, Kai
b2949ae543 Fix HTML version of the keyword table.
This should really fix rust-lang/rust#17528.
2014-10-12 17:26:37 +08:00
Jakub Wieczorek
fdc1eeac62 Make the diagnostic for static variables in patterns better
Fixes #17933.
2014-10-12 11:11:50 +02:00
bors
38517d0eba auto merge of #17952 : jakub-/rust/remove-virtual-structs, r=eddyb
Closes #17861.
2014-10-12 06:17:17 +00:00
Corey Farwell
dc0a7b6e22 Link to Unicode SpecialCasing.txt document 2014-10-11 23:58:48 -04:00
OGINO Masanori
b6397da105 Remove an unnecessary binary file.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-10-12 12:53:09 +09:00
bors
86509d8d7a auto merge of #17949 : ebfe/rust/cfg_warn, r=sfackler
This converts old style cfgs that generate warnings during `make check` to the new syntax.
2014-10-12 02:22:14 +00:00
bors
adb44f53d8 auto merge of #17942 : JIghtuse/rust/master, r=alexcrichton
[breaking-change]
Closes #17916
2014-10-12 00:07:15 +00:00
Julian Orth
cea171b0ae improve clone_from_slice performance 2014-10-12 01:24:47 +02:00
bors
519e85b8a9 auto merge of #17892 : nodakai/rust/rustdoc-dont-nest-a, r=alexcrichton
Some examples:

- `std::slice::slice`: [before](http://validator.w3.org/check?uri=http%3A%2F%2Fdoc.rust-lang.org%2Fstd%2Fslice%2Fprimitive.slice.html&charset=%28detect+automatically%29&doctype=Inline&group=0) and [after](http://validator.w3.org/check?uri=http%3A%2F%2Fnodakai.github.io%2Frust-f40b60b-doc%2Fstd%2Fslice%2Fprimitive.slice.html&charset=%28detect+automatically%29&doctype=Inline&group=0)
- `core::char::char`: [before](http://validator.w3.org/check?uri=http%3A%2F%2Fdoc.rust-lang.org%2Fcore%2Fchar%2Fprimitive.char.html&charset=%28detect+automatically%29&doctype=Inline&group=0) and [after](http://validator.w3.org/check?uri=http%3A%2F%2Fnodakai.github.io%2Frust-f40b60b-doc%2Fcore%2Fchar%2Fprimitive.char.html&charset=%28detect+automatically%29&doctype=Inline&group=0)
- `hexfloat::expand_syntax_ext`: [before](http://validator.w3.org/check?uri=http%3A%2F%2Fdoc.rust-lang.org%2Fhexfloat%2Ffn.expand_syntax_ext.html&charset=%28detect+automatically%29&doctype=Inline&group=0) and [after](http://validator.w3.org/check?uri=http%3A%2F%2Fnodakai.github.io%2Frust-f40b60b-doc%2Fhexfloat%2Ffn.expand_syntax_ext.html&charset=%28detect+automatically%29&doctype=Inline&group=0)

TODO: do the same for tuples.
2014-10-11 21:42:17 +00:00
Guillaume Pinot
6165875342 fix shootout-mandelbrot to make it pass the shootout test 2014-10-11 22:29:10 +02:00
rjz
a35c53d65b Tweak copy and formatting of Tasks guide 2014-10-11 13:00:01 -07:00
bors
cd1fa91d2b auto merge of #17801 : Gankro/rust/collections-stuff, r=sfackler
I previously avoided `#[inline]`ing anything assuming someone would come in and explain to me where this would be appropriate. Apparently no one *really* knows, so I'll just go the opposite way an inline everything assuming someone will come in and yell at me that such-and-such shouldn't be `#[inline]`.

==================

For posterity, iteration comparisons:

```
test btree::map::bench::iter_20                            ... bench:       971 ns/iter (+/- 30)
test btree::map::bench::iter_1000                          ... bench:     29445 ns/iter (+/- 480)
test btree::map::bench::iter_100000                        ... bench:   2929035 ns/iter (+/- 21551)

test treemap::bench::iter_20                               ... bench:       530 ns/iter (+/- 66)
test treemap::bench::iter_1000                             ... bench:     26287 ns/iter (+/- 825)
test treemap::bench::iter_100000                           ... bench:   7650084 ns/iter (+/- 356711)

test trie::bench_map::iter_20                              ... bench:       646 ns/iter (+/- 265)
test trie::bench_map::iter_1000                            ... bench:     43556 ns/iter (+/- 5014)
test trie::bench_map::iter_100000                          ... bench:  12988002 ns/iter (+/- 139676)
```

As you can see `btree` "scales" much better than `treemap`. `triemap` scales quite poorly.

Note that *completely* different results are given if the elements are inserted in order from the range [0, size]. In particular, TrieMap *completely* dominates in the sorted case. This suggests adding benches for both might be worthwhile. However unsorted is *probably* the more "normal" case, so I consider this "good enough" for now.
2014-10-11 18:37:13 +00:00
Jakub Wieczorek
4442e6d890 Remove virtual structs from the reference 2014-10-11 19:42:26 +02:00
Jakub Wieczorek
17da4c761d Remove virtual struct tests 2014-10-11 19:42:26 +02:00
Jakub Wieczorek
403cd40e6a Remove virtual structs from the language 2014-10-11 19:42:26 +02:00
Michael Gehring
151aaaf46b Fix cfg warnings in librustc_back 2014-10-11 18:33:17 +02:00
Michael Gehring
22cc5d5e62 Fix cfg warnings in libcoretest 2014-10-11 18:33:17 +02:00
John Gallagher
16ccdba851 Use explicit case rather than catch-all 2014-10-11 12:03:15 -04:00
bors
4d031d7f86 auto merge of #17940 : pnkfelix/rust/fix-check-stage1-on-clean-dir, r=huonw
compiletest needs to link to native crate, or at least the `rt` library.

(I tried using a dependency on `rustrt` instead, and that did not resolve the problem.  But this does.)

Partially addresses #17883
2014-10-11 15:17:09 +00:00
Michael Gehring
d4ba942b17 Fix cfg warnings in compiletest 2014-10-11 16:10:43 +02:00
Boris Egorov
6e29f86bc8 Remove into_vec method from &[T]
[breaking-change]
Closes #17916
2014-10-11 16:22:43 +07:00
Felix S. Klock II
b63a18f585 compiletest needs to link to native crate, or at least the rt library.
(I tried using a dependency on `rustrt` instead, and that did not
resolve the problem.  But this does.)

Fix #17883
2014-10-11 11:08:15 +02:00
bors
9b98332992 auto merge of #17939 : alexcrichton/rust/snapshots, r=sfackler
Also convert a number of `static mut` to just a plain old `static` and remove
some unsafe blocks.
2014-10-11 09:02:01 +00:00
bors
ba246100ca auto merge of #17928 : steveklabnik/rust/remove_runtime_guide, r=alexcrichton
Now that libgreen is gone, this is all wrong.

Fixes #17923
2014-10-11 07:12:02 +00:00
Alex Crichton
dae48a07f3 Register new snapshots
Also convert a number of `static mut` to just a plain old `static` and remove
some unsafe blocks.
2014-10-10 22:09:49 -07:00
bors
7dd1bf0e02 auto merge of #17936 : TeXitoi/rust/remove-shootout-warnings, r=alexcrichton
Only one warning remain, and I can't find a way to remove it without doing more bound checks:

```
shootout-nbody.rs:105:36: 105:51 warning: use of deprecated item: use iter_mut, #[warn(deprecated)] on by default
shootout-nbody.rs:105             let bi = match b_slice.mut_shift_ref() {
```

using `split_at_mut` may be an option, but it will do more bound checking.

If anyone have an idea, I'll update this PR.
2014-10-11 04:37:04 +00:00
John Gallagher
0d6dafa51f Add while let to the reference
Closes #17687
2014-10-10 20:30:32 -04:00
John Gallagher
b5db97b354 Add tests for while let 2014-10-10 20:30:32 -04:00
John Gallagher
45fd623762 Handle while let desugaring 2014-10-10 20:30:32 -04:00
John Gallagher
660cf18070 Move while let behind while_let feature gate 2014-10-10 20:30:32 -04:00
John Gallagher
b003f10449 Desugar while let into loop { match { ... } } 2014-10-10 20:30:32 -04:00
John Gallagher
0c2c8116a3 Teach libsyntax about while let 2014-10-10 20:30:31 -04:00
Guillaume Pinot
5653b4da17 remove shootout warnings 2014-10-11 01:46:59 +02:00
bors
1add4dedc1 auto merge of #17920 : thestinger/rust/vec, r=aturon
Introduce conversions between `Box<[T]>` and `Vec<T>` and use it to reimplement the `vec![]` macro for efficiency.
2014-10-10 18:47:03 +00:00
Daniel Micay
02d976a7f9 improve the performance of the vec![] macro
Closes #17865
2014-10-10 14:20:12 -04:00
Steve Klabnik
51c5a8eb1b Remove the runtime guide.
Now that libgreen is gone, this is all wrong.

Fixes #17923
2014-10-10 13:30:17 -04:00
Daniel Micay
310f2deb99 implement Box<[T]> <-> Vec<T> conversions 2014-10-10 11:42:30 -04:00
bors
78a7676898 auto merge of #17793 : simias/rust/master, r=huonw
The man page stated that the list of features was space-separated when
it's actually comma-separated.
2014-10-10 14:57:03 +00:00
Daniel Micay
0075c27626 vec: minor cleanup 2014-10-10 06:21:00 -04:00
bors
45797a0765 auto merge of #17037 : kmcallister/rust/no-stack-check, r=thestinger
r? @brson 

Fixes #16980.
2014-10-10 07:52:00 +00:00