Commit Graph

37314 Commits

Author SHA1 Message Date
Alex Crichton
5da25386b3 rollup merge of #21333: stepancheg/trans-write-diag
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 followed by thousands of warnings.
2015-01-21 09:13:49 -08:00
Alex Crichton
b250d9a3c8 rollup merge of #21289: brson/errorcodes
This does the bare minimum to make registration of error codes work again. After this patch, every call to `span_err!` with an error code gets that error code validated against a list in that crate and a new tidy script `errorck.py` validates that no error codes are duplicated globally.

There are further improvements to be made yet, detailed in #19624.

r? @nikomatsakis
2015-01-21 09:13:46 -08:00
Alex Crichton
41890bfa46 rollup merge of #21274: estsauver/21270
The timezone of the server that builds rustc nightlies
appears to be in UTC. From what I can tell, it builds
the nightlies at 0300 UTC, which takes about ~15 minutes.
So, there were a couple options here for which offset to use.

UTC+3 would ensure that you always got the latest rust, but it
would mean the script is broken ~15/20 minutes a day. UTC+4
means users get a stale nightly for 45 minutes, but that feels
okay to me.

Ideally, buildbot would publish the "current" nightly, but
that seems unneeded relative to fixing it for all Timezones
quickly.

Fixes #21270
2015-01-21 09:13:43 -08:00
Alex Crichton
89b2e231c6 rollup merge of #21157: steveklabnik/deprecation 2015-01-21 09:13:42 -08:00
Alex Crichton
550255d986 rollup merge of #21138: mkpankov/master
When combined with '--save' and '--date', it uses previously saved
tarball, making possible to re-install in offline mode.
r?
2015-01-21 09:13:40 -08:00
Alex Crichton
2e9adab528 rollup merge of #21053: apasel422/exact 2015-01-21 09:13:38 -08:00
Alex Crichton
83af23ea49 rollup merge of #19913: KOMON/rust-mode-emacs-indentation
I added an option to auto-indent method chains to line up along their '.' operators. Like so:

```
let input = io::stdin().readline()
                       .ok()
                       .expect("Failed to read line");
```

The old default would indent like so:
```
let input = io::stdin().readme()
    .ok()
    .expect("Failed to read line");
```

The Rust guide explicitly condones the former, so I thought it would be nice for the emacs mode to support it. It's off by default, you have to set ```rust-indent-method-chain``` to ```t``` via your .emacs or the customize menu
2015-01-21 09:13:36 -08:00
Steve Klabnik
29e5d8d483 Improve quality of String#to_slice() deprecation message 2015-01-21 11:21:07 -05:00
bors
6869645e86 Auto merge of #21242 - richo:no-perl, r=brson
There's only one build-critical path in which perl is used, and it was to do a text replacement trivially achievable with sed(1).

I ported the indenter script because it [appears to be used][indenter], but removed check links because it appears to be entirely out of date.

[indenter]: https://github.com/rust-lang/rust/blob/master/src/librustc/util/common.rs#L60-70
2015-01-21 11:07:31 +00:00
bors
8abcbaba1d Auto merge of #21227 - sellibitze:core-ops-for-references, r=aturon
As discussed with @aturon I added implementations of various op traits for references to built-in types which was already suggested by the ops reform RFC.

The 2nd commit updates the module documentation of core::ops to fully reflect the recent change from pass-by-reference to pass-by-value and expands on the implications for generic code.
2015-01-21 09:02:44 +00:00
bors
51e28dd0c8 Auto merge of #21395 - sfackler:fix-cvar-test, r=alexcrichton
r? @alexcrichton
2015-01-21 05:55:02 +00:00
bors
710dcdc2eb Auto merge of #21065 - ColonelJ:master, r=brson
Removed use of unused LDPATH variable on Windows as is done for other platforms, and added GCC flag to ensure MINGW's ANSI compatible STDIO functions are used wherever available (required by jemalloc).

Without these changes it ends up setting the PATH twice, and the second time the PATH begins with `:` which is invalid.  Also the regular msvcrt printf-like functions would be used which don't understand stuff like %hhd and %z which jemalloc uses.

This change ought not to make any difference to the output but it fixes the build process for me since at least my build environment couldn't handle that broken path caused by LDPATH being empty.
2015-01-21 03:54:21 +00:00
Andrew Paseltiner
2cc7feb4f6 implement ExactSizeIterator for slice::{Chunks,ChunksMut} 2015-01-20 22:44:22 -05:00
bors
29bd9a06ef Auto merge of #21439 - alexcrichton:rollup, r=alexcrichton
Continuation of https://github.com/rust-lang/rust/pull/21428
2015-01-20 23:03:09 +00:00
Brian Anderson
876b266459 Make multiline errors work with codes 2015-01-20 14:18:35 -08:00
Daniel Raloff
8051bd0626 Changed rust-mode code for tabs -> spaces 2015-01-20 14:07:10 -08:00
Sebastian Gesemann
970fd747b9 add stability text like suggested in discussion 2015-01-20 22:35:42 +01:00
Alex Crichton
631896dc19 Test fixes and rebase conflicts 2015-01-20 12:35:51 -08:00
bors
583c5c589e Auto merge of #20919 - fay-jai:update, r=brson
Only made 2 changes:
1) Update the year to 2015 in LICENSE-MIT
2) Update the year in COPYRIGHT

No other changes were made.
2015-01-20 19:56:43 +00:00
Michael Sproul
9a4401fe82 Add some extended errors. 2015-01-20 11:27:51 -08:00
Brian Anderson
9f59f7e052 Add error codes to rustc 2015-01-20 11:27:51 -08:00
Brian Anderson
cf629e7cfa Add error codes to resolve 2015-01-20 11:27:51 -08:00
Brian Anderson
f68029ec94 Make fatal errors work with codes, add to typeck 2015-01-20 11:27:51 -08:00
Brian Anderson
0c5225c5bf Add error codes to rustc_typeck 2015-01-20 11:27:15 -08:00
Brian Anderson
953d6dfd7e Make error code registration work again. #19624 2015-01-20 11:27:14 -08:00
Barosl LEE
eace6afed2 Rollup merge of #20991 - mneumann:llvm-dragonfly-take2, r=alexcrichton
It got accidentially reverted in 44440e5.
2015-01-21 02:16:53 +09:00
Barosl LEE
9752924dff Rollup merge of #21179 - nodakai:reference-mod-to-self, r=huonw
This should have been done together with 56dcbd17fd for rust-lang/rust#20361
2015-01-21 02:16:53 +09:00
Barosl LEE
01ae97b45e Rollup merge of #21427 - steveklabnik:generics_fix, r=alexcrichton
Multiple people have asked me if this is a reference to Hacker News, and
I _certainly_ don't want to give them that impression.
2015-01-21 02:16:52 +09:00
Barosl LEE
c49d428165 Rollup merge of #21424 - sanxiyn:coerce-mut, r=nikomatsakis
This is caught in borrowck now, but catching in typeck is faster and improves diagnostics.

CC #17561.

r? @nikomatsakis
2015-01-21 02:16:52 +09:00
Barosl LEE
1d206e2872 Rollup merge of #21404 - japaric:hash, r=alexcrichton
closes #21402
cc #15294

r? @alexcrichton or @aturon 
cc @ExpHP (btw, this only covers arrays with arity up to 32)
2015-01-21 02:16:52 +09:00
Barosl LEE
5b57aa757b Rollup merge of #21399 - kballard:fix-PLEASE_BENCH, r=Gankro
611ef49f2f removed all the metrics stuff
from tests.mk, but this meant that `PLEASE_BENCH=1` no longer did
anything.

Fixes #21324.
2015-01-21 02:16:52 +09:00
Barosl LEE
8d05f6c74c Rollup merge of #21388 - aochagavia:collections, r=Gankro
**Breaking change**: `VecMap::into_iter` now consumes the `VecMap`. To fix it you should pass the VecMap by value instead of by reference.

[breaking-change]

r? @Gankro
2015-01-21 02:16:51 +09:00
Barosl LEE
3d6568fcb2 Rollup merge of #21387 - retep998:hmodule, r=alexcrichton
r? @alexcrichton
2015-01-21 02:16:51 +09:00
Barosl LEE
b9588393ee Rollup merge of #21386 - Diggsey:issue-21384, r=alexcrichton
Fixes #21384
2015-01-21 02:16:51 +09:00
Barosl LEE
adc7afd69a Rollup merge of #21380 - tshepang:patch-3, r=steveklabnik 2015-01-21 02:16:51 +09:00
Barosl LEE
0225f9a380 Rollup merge of #21123 - visualfc:master, r=alexcrichton
example:
let m = "hello \
           world";
2015-01-21 02:16:51 +09:00
Barosl LEE
c5fd58d512 Rollup merge of #21377 - iKevinY:speedy-tidy, r=huonw
`x in y` is more Pythonic than `y.find(x) != -1`. I believe it runs quite a bit faster as well (though it's probably not a bottleneck of the Travis builds):

```bash
$ python -m timeit '"abc".find("a") != -1'
1000000 loops, best of 3: 0.218 usec per loop
$ python -m timeit '"a" in "abc"'
10000000 loops, best of 3: 0.0343 usec per loop
```
2015-01-21 02:16:50 +09:00
Barosl LEE
a79f1921a9 Rollup merge of #21375 - petrochenkov:ssbsl, r=alexcrichton
After PR #19766 added implicit coersions `*mut T -> *const T`, the explicit casts can be removed.
(The number of such casts turned out to be relatively small).
2015-01-21 02:16:50 +09:00
Barosl LEE
0efdda314a Rollup merge of #21369 - iKevinY:no-travis-notes, r=sanxiyn
Updated `tidy.py` to skip printing NOTEs if the [`TRAVIS`](http://docs.travis-ci.com/user/ci-environment/#Environment-variables) environment variable is set.
2015-01-21 02:16:49 +09:00
Barosl LEE
75efb22808 Rollup merge of #21359 - WiSaGaN:bugfix/fix_marker, r=alexcrichton
From std::markers to std::marker.
2015-01-21 02:16:49 +09:00
Barosl LEE
33ea011574 Rollup merge of #21358 - glacjay:patch-2, r=alexcrichton 2015-01-21 02:16:49 +09:00
Barosl LEE
567bf6ca8c Rollup merge of #21357 - kimroen:patch-1, r=sanxiyn
Having both "Right now" and "at the moment" in the same statement is redundant.
2015-01-21 02:16:49 +09:00
Barosl LEE
6a5c948a00 Rollup merge of #21100 - tstorch:small_readability_update, r=alexcrichton
Why not use what is there?
2015-01-21 02:16:48 +09:00
Barosl LEE
4419fa39c2 Rollup merge of #21345 - glacjay:patch-1, r=alexcrichton
The reference should be `x`, not `FOO` itself.
2015-01-21 02:16:48 +09:00
Barosl LEE
f836f1e412 Rollup merge of #21339 - thorncp:api-docs-search, r=alexcrichton
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

@Jurily, your input is welcome!
2015-01-21 02:16:48 +09:00
Barosl LEE
fa0c2c5e46 Rollup merge of #21336 - rylev:better-nofile-error, r=brson
Contribution from @look!

Addresses https://github.com/rust-lang/rust/issues/21329
2015-01-21 02:16:48 +09:00
Barosl LEE
efa8360f98 Rollup merge of #21331 - michaelsproul:sync-error-impls, r=alexcrichton
Two errors in `std::sync` are currently missing implementations of the standard error trait because they contain types which aren't `Send`.

This PR therefore requires #21312.
2015-01-21 02:16:47 +09:00
Barosl LEE
b3f6e82beb Rollup merge of #21048 - aroben:patch-1, r=steveklabnik
Now both the enum values and the prose describing them mention the values in the same order.
2015-01-21 02:16:47 +09:00
Barosl LEE
356c61da8d Rollup merge of #21326 - look:nano-syntax-highlighting, r=kmcallister
rust.nanorc provides syntax highlighting for Rust. An attempt has been made to make the syntax highlighting look good on both dark and light terminals. Issue #21286.

This PR is dedicated to @substars and nano-lovers everywhere.
2015-01-21 02:16:47 +09:00
Barosl LEE
29ece80d34 Rollup merge of #21314 - fenhl:patch-1, r=steveklbanik
See [this document](https://gist.github.com/0xabad1dea/8870b192fd1758743f66) by @0xabad1dea for the rationale.
2015-01-21 02:16:47 +09:00