Commit Graph

37843 Commits

Author SHA1 Message Date
Kevin Yap
21f4483de3 Use 'in' instead of 'find()' in tidy.py
'x in y' is more Pythonic and faster than 'y.find(x) != -1'.
2015-01-18 14:52:59 -08:00
Matt Roche
9293607f8f quick formatting fix 2015-01-18 15:28:12 -05:00
James Miller
25a4adc62f Reduce size of array in test case to 1MB 2015-01-19 09:22:54 +13:00
Matt Roche
4347cbbd66 Error message fixes and removed explicit returns in example code 2015-01-18 15:22:16 -05:00
James Miller
9c5173f8e5 Add test to catch performance regressions 2015-01-19 09:21:23 +13:00
James Miller
0859e5ebb3 Use zero_mem instead of a zerointializer for init intrinsic
LLVM gets overwhelmed when presented with a zeroinitializer for a large
type. In unoptimised builds, it generates a long sequence of stores to
memory. In optmised builds, it manages to generate a standard memset of
zero values, but takes a long time doing so.

Call out to the `llvm.memset` function to zero out the memory instead.
2015-01-19 09:21:23 +13:00
Alex Crichton
440d63b0f5 rustdoc: Improve diagnostics on lockfile failures
cc #19872, this may help give some insight
2015-01-18 10:22:12 -08:00
Adolfo Ochagavía
c821e5c915 Add test for issue #21356 2015-01-18 19:20:14 +01:00
Adolfo Ochagavía
e3d099de6f Fix #21356 2015-01-18 19:18:48 +01:00
Kevin Yap
d1b1b62ae8 Ignore NOTEs when Travis runs make tidy
Only print NOTE warnings if the 'TRAVIS' environment variable has not
been set. Addresses #21322.
2015-01-18 09:29:44 -08:00
Steve Klabnik
f7fe249bbc Remove associated_types gate from std::ops docs 2015-01-18 11:28:17 -05:00
Corey Richardson
2d30f22014 syntax: allow bare sequences in lhs for follow checking
Closes #21350
2015-01-18 10:19:47 -05:00
klutzy
d053ccb45f std::dynamic_lib: Fix Windows error handling
This is a [breaking-change] since `std::dynamic_lib::dl` is now
private.

When `LoadLibraryW()` fails, original code called `errno()` to get error
code.  However, there was local allocation of `Vec` before
`LoadLibraryW()`, and it drops before `errno()`, and the drop
(deallocation) changed `errno`! Therefore `dynamic_lib::open()` thought
it always succeeded.
This commit fixes the issue.

This commit also sets Windows error mode during `LoadLibrary()` to
prevent "dll load failed" dialog.
2015-01-19 00:12:45 +09:00
Wangshan Lu
e28da7ad44 Fix std::marker.
From std::markers to std::marker.
2015-01-18 22:17:44 +08:00
Seo Sanghyeon
3f0cc8011a Make output type in ast::FnDecl optional 2015-01-18 22:49:19 +09:00
Jay True
ab73d455fe fix formatting 2015-01-18 21:23:22 +08:00
Alfie John
5431727b6e docs: replacing more deprecated integer suffixes 2015-01-18 12:43:12 +00:00
Kim Røen
17ffe51aa3 Remove redundant "Right now"
Having both "Right now" and "at the moment" in the same statement is redundant.
2015-01-18 13:24:13 +01:00
Alfie John
66003c06a1 docs: replace deprecated integer suffixes from examples 2015-01-18 11:49:37 +00:00
bors
dcaeb6aa23 auto merge of #20901 : dgrunwald/rust/update-token-can-begin-expr, r=sanxiyn
* add `Token::AndAnd` (double borrow)
 * add `Token::DotDot` (range notation)
 * remove `Token::Pound` and `Token::At`

This fixes a syntax error when parsing `fn f() -> RangeTo<i32> { return ..1; }`.

Also, remove `fn_expr_lookahead`.
It's from the `fn~` days and seems to no longer be necessary.
2015-01-18 11:28:53 +00:00
Eduard Burtescu
23a553a303 Improve the vec![...] macro with UFCS.
There are two limitations to the macro that this addresses:
1. the expected type is not propagated, coercions don't trigger
2. references inside element expressions don't outlive the `Vec`

Both of these limitations are caused by the block in the
macro expansion, previously needed to trigger a coercion
from `Box<[T; N]>` to `Box<[T]>`, now possible with UFCS.
2015-01-18 13:13:23 +02:00
bors
30f081e548 auto merge of #21276 : huonw/rust/trait-suggestion-nits, r=nikomatsakis
Follow up to #21008.

r? @nikomatsakis
2015-01-18 09:21:42 +00:00
Michael Neumann
d0eb85dc3f Redo Segmented stack support for DragonFly
It got accidentially reverted in 44440e5.
2015-01-18 08:25:52 +01:00
Tom Jakubowski
159236a63b rustdoc: Handle associated types on inlined impls
Fix #21348
2015-01-17 22:54:24 -08:00
Tom Jakubowski
8224e0ed3d rustdoc: Add some re-exports 2015-01-17 22:54:24 -08:00
Tom Jakubowski
e930aeb32b rustdoc: Accept string source in core::run_core
This is wanted by external tooling that uses rustdoc. There are likely
some bugs when actually generating HTML output (which may expect to be
able to read the source) but all I need for now is the cleaned crate and
analysis.
2015-01-17 22:54:23 -08:00
Tom Jakubowski
aaf595eab9 rustdoc: Separate associated types from methods
Fix #21142
2015-01-17 22:54:23 -08:00
Tom Jakubowski
d47a11353d Remove some dead code from rustc::middle::ty 2015-01-17 22:54:23 -08:00
Tom Jakubowski
7b4c50821a rustdoc: Add Show impls to more clean types 2015-01-17 22:54:23 -08:00
bors
a833337943 auto merge of #21288 : brson/rust/snaps, r=alexcrichton
This fixes the issues mentioned in https://github.com/rust-lang/rust/pull/21236, as well as the one https://github.com/rust-lang/rust/issues/21230 where `CFG_BOOTSTRAP_KEY` was being set to simply 'N'. It changes the build such that `RUSTC_BOOTSTRAP_KEY` is only exported on -beta and -stable, so that the behavior of the -dev, -nightly, and snapshot compilers is the same everywhere.

Haven't run it completely through 'make check' yet, but the I have verified that the aforementioned issues are fixed.

r? @alexcrichton cc @eddyb
2015-01-18 05:48:56 +00:00
Paul Collier
d5c83652b3 libsyntax: rename functions from uint to usize 2015-01-17 20:47:30 -08:00
Kang Seonghoon
2c1d1fbdf9 tests: Warn on the trailing backslash in the template. 2015-01-18 13:23:34 +09:00
bors
6da8827482 auto merge of #21330 : JeffBelgum/rust/collections-reform-issue-19986-add-append-and-split-off, r=Gankro
Please review carefully. Contains unsafe and is my first commit to Rust.

Uses ptr::copy_nonoverlapping_memory. Attempts to handle zero-size types correctly.
2015-01-18 03:11:42 +00:00
Jay True
2b6efbf92d fix an error about the static lifetime
The reference should be `x`, not `FOO` itself.
2015-01-18 10:58:55 +08:00
Brian Anderson
8b2335a01d Add allow(unstable) to librustc_privacy 2015-01-17 16:38:04 -08:00
Brian Anderson
5cfbecfdb4 Add allow(unstable) to more tests 2015-01-17 16:38:04 -08:00
Brian Anderson
9035ba5f76 Add allow(unstable) to driver.rs 2015-01-17 16:38:04 -08:00
Brian Anderson
1f46ae285d Add allow(unstable) to tests that need it 2015-01-17 16:38:04 -08:00
Brian Anderson
3e38926ff4 configure: Use a more portable 'date' command to create the bootstrap key 2015-01-17 16:38:04 -08:00
Brian Anderson
6f3a80e411 Set allow(unstable) in crates that use unstable features
Lets them build with the -dev, -nightly, or snapshot compiler
2015-01-17 16:38:04 -08:00
Brian Anderson
056f8f0251 mk: Don't set RUSTC_BOOTSTRAP_KEY on -dev and -nightly. Not needed 2015-01-17 16:37:34 -08:00
Brian Anderson
fa1d63acd3 mk: Revert hack to pull the bootstrap key from the snapshot bins 2015-01-17 16:37:34 -08:00
Eduard Burtescu
89b80faa8e Register new snapshots. 2015-01-17 16:37:34 -08:00
Chris Thorn
f355747a19 Increase docs search box delay
Increases the delay of the search box to 500ms after key up. I tried
adding a three character minimum for setting the delay, but didn't find
it very useful.

Should close #20095
2015-01-17 16:36:57 -08:00
Stepan Koltsov
fa01251a8c rustc: print filename if file cannot be written
File cannot be written, for example, if directory does not exist.

Before this commit:

```
% rustc -o nonexistent/program program.rs
error: could not write output: No such file or directory
```

With this commit:

```
% rustc -o nonexistent/program program.rs
error: could not write output to nonexistent/program.0.o: No such file or directory
```

This is useful when full rust command is not displayed, or when last
error is preceded by thousands of warnings.
2015-01-18 03:32:11 +03:00
Jeff Belgum
08e712ebe9 add append to vec with tests 2015-01-17 16:15:21 -08:00
Ryan Levick
b6b8880f0e Improve the error message when source file cannot be read
Contribution from @look!
2015-01-18 00:49:50 +01:00
Paul Collier
a32249d447 libsyntax: uint types to usize 2015-01-17 23:45:29 +00:00
Alfie John
8da284a045 docs: typo 2015-01-17 23:31:13 +00:00
Michael Sproul
ffdf1118d5 Implement the error trait for errors in std::sync. 2015-01-17 14:35:16 -08:00