Commit Graph

33609 Commits

Author SHA1 Message Date
Alex Crichton
4509e42349 rollup merge of #17980 : alexcrichton/no-more-exes 2014-10-13 15:09:53 -07:00
Alex Crichton
48d0359273 rollup merge of #17979 : jkleint/guide-guess-counter 2014-10-13 15:09:52 -07:00
Alex Crichton
001814fda2 rollup merge of #17977 : Behemecoatyl/master 2014-10-13 15:09:48 -07:00
Alex Crichton
e860437ab1 rollup merge of #17972 : ebfe/rpass-lang-item 2014-10-13 15:09:41 -07:00
Alex Crichton
986d62e239 rollup merge of #17970 : nodakai/cleanup-warnings 2014-10-13 15:09:38 -07:00
Alex Crichton
0dd4cd57fe rollup merge of #17968 : nodakai/really-fix-kw-table 2014-10-13 15:09:35 -07:00
Alex Crichton
412f4d1fc7 rollup merge of #17927 : alexcrichton/more-const 2014-10-13 15:09:25 -07:00
Alex Crichton
e9f241bc5d rollup merge of #17888 : gmfawcett/patch-1 2014-10-13 15:09:14 -07:00
bors
36d0346dff auto merge of #17876 : ruud-v-a/rust/patch-1, r=alexcrichton
The Windows-specific instruction under 'Quick Start' linked the wiki article on getting started developing Rust itself, but the quick start is just about obtaining a working Rust installation. The actual wiki page with Windows-specific instructions was difficult to find.

The most important thing to note on Windows is that you need mingw-builds, and it is totally not obvious. The only place where I have seen it mentioned is the wiki page, which was difficult to find before.
2014-10-13 21:32:43 +00:00
Falco Hirschenberger
af2f538390 Fix issue #17999 (Unused variables inside for are not detected) 2014-10-13 23:15:07 +02:00
Jakub Wieczorek
43e5d10428 Improve the error message for missing else clauses in if expressions 2014-10-13 22:48:29 +02:00
Stefan Bucur
39749a3adc Fix typo in char's from_digit error message 2014-10-13 22:17:48 +02:00
bors
c7e0724274 auto merge of #17733 : jgallagher/rust/while-let, r=alexcrichton
This is *heavily* based on `if let` (#17634) by @jakub- and @kballard

This should close #17687
2014-10-13 19:37:40 +00:00
Felix S. Klock II
b26972e28b Make bors check that compiletest builds from both stage0 and stage1 rustc.
----

To reproduce issue on commit ba246100ca
it does not suffice to add just `check-build-compiletest` to
`check-secondary`; one must also ensure that `check-build-compiletest`
precedes the satisification of the `check` rule.

Otherwise hidden dependencies of `compiletest` would end up getting
satisfied when make builds `rustc` at each stage in order to
eventually run `check-stage2`.

So to handle that I moved `check-secondary` before `check` in the
`check-all` rule that bors uses, and for good measure, I also put
`check-build-compiltest` at the front of the `check-secondary` rule's
dependencies.

My understanding is that running `check-secondary` should be
relatively cheap, and thus such a reordering will not hurt bors.

----

Fix #17883.
2014-10-13 20:58:34 +02:00
Alex Crichton
c56c9fcf08 rustc: Remove the dummy hack from check_match
Turns out you can create &'static T quite easily in a constant, I just forgot
about this!
2014-10-13 11:50:47 -07:00
bors
daa71e40a9 auto merge of #17910 : taylorhutchison/rust/patch-1, r=alexcrichton
Added 64-bit Windows support to the list of platforms. Support for 64-bit Windows was added in Rust 0.12.0. See  https://mail.mozilla.org/pipermail/rust-dev/2014-October/011267.html for the release notes.
2014-10-13 17:42:42 +00:00
Steven Fackler
84d1cbfd25 Don't ICE on bad extern paths
Closes #17990
2014-10-13 09:25:08 -07:00
Alex Crichton
f7b54703d0 bench: Improve the spectralnorm shootout benchmark
This improves the spectralnorm shootout benchmark through a few vectors after
looking at the leading C implementation:

* The simd-based f64x2 is now used to parallelize a few computations
* RWLock usage has been removed. A custom `parallel` function was added as a
  form of stack-based fork-join parallelism. I found that the contention on the
  locks was high as well as hindering other optimizations.

This does, however, introduce one `unsafe` block into the benchmarks, which
previously had none.

In terms of timings, the before and after numbers are:

```
$ time ./shootout-spectralnorm-before
./shootout-spectralnorm-before  2.07s user 0.71s system 324% cpu 0.857 total
$ time ./shootout-spectralnorm-before 5500
./shootout-spectralnorm-before 5500  11.88s user 1.13s system 459% cpu 2.830 total
$ time ./shootout-spectralnorm-after
./shootout-spectralnorm-after  0.58s user 0.01s system 280% cpu 0.210 tota
$ time ./shootout-spectralnorm-after 5500
./shootout-spectralnorm-after 5500  3.55s user 0.01s system 455% cpu 0.783 total
```
2014-10-13 08:52:15 -07:00
bors
4a382d7c47 auto merge of #17965 : omasanori/rust/remove, r=sfackler 2014-10-13 14:22:42 +00:00
Björn Steinbrink
fafe136c2d Emit lifetime end markers for function arguments
Function arguments are (hopefully!) the last places where allocas don't
get proper markers for the end of their lifetimes. This means that this
code using 64 bytes of stack for the function arguments:

````rust
std::io::println("1");
std::io::println("2");
std::io::println("3");
std::io::println("4");
````

But with the proper lifetime markers, the slots can be reused, and
the arguments only need 16 bytes of stack.
2014-10-13 16:16:16 +02:00
Simon Sapin
61a8a28f9f Include the Unicode version used to generate src/libunicode/tables.rs. 2014-10-13 14:07:12 +01:00
bors
d670d76221 auto merge of #17963 : sfackler/rust/cfg-error, r=alexcrichton
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-13 12:27:43 +00:00
bors
7dbd4349c4 auto merge of #17975 : thestinger/rust/fPIE, r=eddyb
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-13 10:32:43 +00:00
bors
a0ea210b39 auto merge of #17957 : TeXitoi/rust/fix-mandelbrot, r=alexcrichton 2014-10-13 08:37:41 +00:00
bors
70d8b8ddc5 auto merge of #17948 : jakub-/rust/issue-17933, r=alexcrichton
Fixes #17933.
2014-10-13 06:42:43 +00:00
NODA, Kai
f27ad3d3e9 Clean up rustc warnings.
compiletest: compact "linux" "macos" etc.as "unix".
liballoc: remove a superfluous "use".
libcollections: remove invocations of deprecated methods in favor of
    their suggested replacements and use "_" for a loop counter.
libcoretest: remove invocations of deprecated methods;  also add
    "allow(deprecated)" for testing a deprecated method itself.
libglob: use "cfg_attr".
libgraphviz: add a test for one of data constructors.
libgreen: remove a superfluous "use".
libnum: "allow(type_overflow)" for type cast into u8 in a test code.
librustc: names of static variables should be in upper case.
libserialize: v[i] instead of get().
libstd/ascii: to_lowercase() instead of to_lower().
libstd/bitflags: modify AnotherSetOfFlags to use i8 as its backend.
    It will serve better for testing various aspects of bitflags!.
libstd/collections: "allow(deprecated)" for testing a deprecated
    method itself.
libstd/io: remove invocations of deprecated methods and superfluous "use".
    Also add #[test] where it was missing.
libstd/num: introduce a helper function to effectively remove
    invocations of a deprecated method.
libstd/path and rand: remove invocations of deprecated methods and
    superfluous "use".
libstd/task and libsync/comm: "allow(deprecated)" for testing
    a deprecated method itself.
libsync/deque: remove superfluous "unsafe".
libsync/mutex and once: names of static variables should be in upper case.
libterm: introduce a helper function to effectively remove
    invocations of a deprecated method.

We still see a few warnings about using obsoleted native::task::spawn()
in the test modules for libsync.  I'm not sure how I should replace them
with std::task::TaksBuilder and native::task::NativeTaskBuilder
(dependency to libstd?)

Signed-off-by: NODA, Kai <nodakai@gmail.com>
2014-10-13 14:16:22 +08:00
Gil Cottle
c6f9b8ff17 Doc: Fix C-Code Example in FFI Docs
Add missing void* for passed RustObject.
2014-10-13 01:36:10 -04:00
John Kleint
ed7d1be12f Guide: specify that both shared and mutable borrows can be re-lent. 2014-10-12 23:50:22 -04:00
bors
a6e0c76ef4 auto merge of #17757 : gamazeps/rust/issue17709, r=alexcrichton
I did not put the crate name in the error note, if that's necessary I'll look into it.

Closes #17709
2014-10-13 02:47:37 +00:00
bors
ff61b74a7d auto merge of #17467 : hatahet/rust/mybranch, r=alexcrichton
[breaking-change]
2014-10-13 00:22:39 +00:00
Brian Koropoff
3caecffe01 Add regression test for issue #17651 2014-10-12 15:14:36 -07:00
Felix Raimundo
1cbce309fe Fixes small error on the doc (task part) 2014-10-13 00:13:41 +02:00
Felix Raimundo
0af88e3c04 Update a test error message
#17709
2014-10-12 23:48:22 +02:00
bors
ff0abf05c9 auto merge of #17944 : jakub-/rust/issue-17877, r=alexcrichton
Fixes #17877.
2014-10-12 21:47:34 +00:00
Brian Koropoff
04608413ba Properly visit nested functions and closures in check_rvalues
This correctly catches moves of unsized values in nested
functions and closures.

Closes issue #17651
2014-10-12 14:43:32 -07:00
Ziad Hatahet
84ce372cee libtime: strftime and strptime return type changed to Result<String, ParseError>.
`strftime` currently returns a `String`. This does not indicate that
this function may return an error due to to a malformed format string.
This change introduces a `ParseError` enum which indicates the type of
error that occurred. The return type of `strptime` was also changed to
use this new enum instead of returning `Result<String, String>`. Now,
all instances where `strftime` was used need to have their return value
checked to see if it were valid or not.

[breaking-change]
2014-10-12 13:07:59 -07:00
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