Commit Graph

37521 Commits

Author SHA1 Message Date
Liigo Zhuang
58a257bcdf rustdoc: add tooltips to sidebar 2015-01-21 21:31:09 +08:00
Seo Sanghyeon
d4ced7b468 De-mut the parser 2015-01-21 20:44:49 +09: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
Michael Woerister
a55ef3a032 debuginfo: Make debuginfo source location assignment more stable (Pt. 1)
So far, the source location an LLVM instruction was linked to was controlled by
`debuginfo::set_source_location()` and `debuginfo::clear_source_location()`.
This interface mimicked how LLVM's `IRBuilder` handles debug location
assignment. While this interface has some theoretical performance benefits, it
also makes things terribly unstable: One sets some quasi-global state and then
hopes that it is still correct when a given instruction is emitted---an
assumption that has been proven to not hold a bit too often.

This patch requires the debug source location to be passed to the actual
instruction emitting function. This makes source location assignment explicit
and will prevent future changes to `trans` from accidentally breaking things in
the majority of cases.

This patch does not yet implement the new principle for all instruction kinds
but the stepping experience should have improved significantly nonetheless
already.
2015-01-21 10:48:10 +01: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
Ahmed Charles
eb0091352d Remove ratchet(). 2015-01-21 00:05:57 -08:00
Ahmed Charles
72ae5186b5 Remove compare_to_old(). 2015-01-21 00:05:57 -08:00
Ahmed Charles
f5e093f504 Remove write_metric_diff and supporting code. 2015-01-21 00:05:57 -08:00
Alex Crichton
3cb9fa26ef std: Rename Show/String to Debug/Display
This commit is an implementation of [RFC 565][rfc] which is a stabilization of
the `std::fmt` module and the implementations of various formatting traits.
Specifically, the following changes were performed:

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0565-show-string-guidelines.md

* The `Show` trait is now deprecated, it was renamed to `Debug`
* The `String` trait is now deprecated, it was renamed to `Display`
* Many `Debug` and `Display` implementations were audited in accordance with the
  RFC and audited implementations now have the `#[stable]` attribute
  * Integers and floats no longer print a suffix
  * Smart pointers no longer print details that they are a smart pointer
  * Paths with `Debug` are now quoted and escape characters
* The `unwrap` methods on `Result` now require `Display` instead of `Debug`
* The `Error` trait no longer has a `detail` method and now requires that
  `Display` must be implemented. With the loss of `String`, this has moved into
  libcore.
* `impl<E: Error> FromError<E> for Box<Error>` now exists
* `derive(Show)` has been renamed to `derive(Debug)`. This is not currently
  warned about due to warnings being emitted on stage1+

While backwards compatibility is attempted to be maintained with a blanket
implementation of `Display` for the old `String` trait (and the same for
`Show`/`Debug`) this is still a breaking change due to primitives no longer
implementing `String` as well as modifications such as `unwrap` and the `Error`
trait. Most code is fairly straightforward to update with a rename or tweaks of
method calls.

[breaking-change]
Closes #21436
2015-01-20 22:36:13 -08:00
bors
51e28dd0c8 Auto merge of #21395 - sfackler:fix-cvar-test, r=alexcrichton
r? @alexcrichton
2015-01-21 05:55:02 +00:00
Jorge Aparicio
ed56c15ceb remove NoSendItem and NoSyncItem 2015-01-21 00:45:35 -05:00
Diggory Blake
eb086505b8 Display negative trait implementations correctly in rustdoc
Added doc test
2015-01-21 04:35:57 +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
Steven Allen
8ea6f78cf6 Implement ExactSizeIterator for remaining core Iterators where applicable.
Specifically:
 * Peekable
 * ByRef
 * Skip
 * Take
 * Fuse
2015-01-20 21:57:20 -05:00
Alfie John
1f6eb344d0 docs: Update for clarity
Compiling won't produce an executable just yet because (as stated in the next
paragraph) there are errors. By removing this sentance, the reader won't get
confused when they expect a successful compile i.e. if they don't read ahead one
paragraph, they are going to be checking their code and wondering why it's not
compiling.
2015-01-21 01:37:39 +00:00
Corey Richardson
9714d3cccf tests: uncomment regression tests for 13970, 13971, 13972
Closes #13971
2015-01-20 18:44:55 -05:00
Jorge Aparicio
00cddb068c also forward Iterator::size_hint() 2015-01-20 18:15:28 -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
Flavio Percoco
cd631c6914 Register snapshot for 9006c3c 2015-01-20 22:15:44 +01:00
Stepan Koltsov
ace2f09d3f alloc::boxed: enable test
Previously test was disabled due to `#[cfg(test)]` before `mod boxed`.
2015-01-20 23:57:56 +03:00
James Miller
a7525bc4c8 Add more explanation for why the assumes are there 2015-01-21 09:56:59 +13:00
Alex Crichton
64914d9d39 rustc: Remove deprecated lint names
These were all renamed quite some time ago, so remove their old names from the
compiler.
2015-01-20 12:52:15 -08:00
Alex Crichton
631896dc19 Test fixes and rebase conflicts 2015-01-20 12:35:51 -08:00
James Miller
9bbfd681c9 Add assumptions that the pointer is non-null 2015-01-21 09:35:24 +13:00
JP Sugarbroad
b6380f5c67 Kill RacyCell in favor of marking SyncSender explicitly Send. 2015-01-20 12:34:18 -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
Alex Crichton
953f294ea3 rustc: Remove deprecated flags
This commit removes a number of deprecated flags from the compiler:

* opt-level => -C opt-level
* debuginfo => -C debuginfo
* print-crate-name => --print crate-name
* print-file-name => --print file-names
* no-trans => -Z no-trans
* no-analysis => -Z no-analysis
* parse-only => -Z parse-only
* dep-info => --emit dep-info

This commit also moves the --pretty flag behind `-Z unstable-options` as the
pretty printer will likely not be stable for 1.0

cc #19051
2015-01-20 11:16:26 -08:00
Alfie John
1f50542a0d docs: typo 2015-01-20 19:02:09 +00: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