Commit Graph

38004 Commits

Author SHA1 Message Date
Alex Crichton
5123f75856 rollup merge of #21342: Diggsey/issue-21310
Fixes #21310
2015-01-21 09:13:53 -08:00
Alex Crichton
0c981875e4 rollup merge of #21340: pshc/libsyntax-no-more-ints
Collaboration with @rylev!

I didn't change `int` in the [quasi-quoter](99ae1a30f3/src/libsyntax/ext/quote.rs (L328)), because I'm not sure if there will be adverse effects.

Addresses #21095.
2015-01-21 09:13:51 -08:00
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
Steven Allen
a13e721202 Use the default len implementation in ExactSizeIterator impls 2015-01-21 11:29:40 -05:00
Steve Klabnik
29e5d8d483 Improve quality of String#to_slice() deprecation message 2015-01-21 11:21:07 -05:00
Aaron Turon
da8023d653 Change init-large-type to use child thread 2015-01-21 08:11:07 -08:00
Aaron Turon
a506d4cbfe Fallout from stabilization. 2015-01-21 08:11:07 -08:00
Aaron Turon
092ba6a856 Deprecate slicing methods in favor of notation
This commit deprecates `slice`, `slice_from`, `slice_to` and their
mutable variants in favor of slice notation.

The `as_slice` methods are left intact, for now.

[breaking-change]
2015-01-21 07:45:45 -08:00
Aaron Turon
fba0bf63a9 Stabilize Index traits and most range notation
This commit marks as `#[stable]`:

* The `Index` and `IndexMut` traits. These are stabilized as taking the
  index itself *by reference*; after extensive discussion it was
  determined that this is a better match with our choices
  elsewhere (e.g. making comparison operators auto-reference), and that
  the use cases for by-value indices are better handled through
  `IndexSet`.

* The `Range`, `RangeFrom` and `RangeTo` structs, introduced for range
  notation.

* Various impls of `Index` and `IndexMut`.

The `FullRange` struct is left unstable as we may wish to rename it to
`RangeFull` in the future.

This commit also *removes* the `Step` trait in favor of direct
implementation of iterator traits on ranges for integers. The `Step`
trait was not a terribly useful factoring internally, and it is likely
that external integer types are best off implementing range iterators
directly. It was removed to simplify the API surface. We can always
reintroduce `Step` later if it turns out to be useful.

Due to this removal, this is a:

[breaking-change]
2015-01-21 07:45:45 -08:00
Eduard Burtescu
838b2ea760 docs: fix fallout of merging ast::ViewItem into ast::Item. 2015-01-21 16:27:26 +02:00
Eduard Burtescu
3102b9e19e rustdoc: fix fallout of merging ast::ViewItem into ast::Item. 2015-01-21 16:27:26 +02:00
Eduard Burtescu
f83a972224 rustc_resolve: fix fallout of merging ast::ViewItem into ast::Item. 2015-01-21 16:27:26 +02:00
Eduard Burtescu
7dbefcec94 rustc_driver: fix fallout of merging ast::ViewItem into ast::Item. 2015-01-21 16:27:26 +02:00
Eduard Burtescu
c91761e83e rustc_trans: fix fallout of merging ast::ViewItem into ast::Item. 2015-01-21 16:27:26 +02:00
Eduard Burtescu
9370ae1abf rustc_typeck: fix fallout of merging ast::ViewItem into ast::Item. 2015-01-21 16:27:26 +02:00
Eduard Burtescu
cfb63d5448 rustc: fix fallout of merging ast::ViewItem into ast::Item. 2015-01-21 16:27:26 +02:00
Eduard Burtescu
e389ab18a2 rustc_back: fix fallout of merging ast::ViewItem into ast::Item. 2015-01-21 16:27:26 +02:00
Eduard Burtescu
7cece8725b syntax: fix fallout of merging ast::ViewItem into ast::Item. 2015-01-21 16:27:26 +02:00
Eduard Burtescu
38ac9e3984 syntax: merge ast::ViewItem into ast::Item. 2015-01-21 16:27:25 +02:00
Eduard Burtescu
53edd767b4 Remove feature(import_shadowing). 2015-01-21 16:27:25 +02:00
Liigo Zhuang
2b11a80a60 address review comments: reuse Escape etc. 2015-01-21 21:31:09 +08:00
Liigo Zhuang
17ebb6053e fix fallout 2015-01-21 21:31:09 +08:00
Liigo Zhuang
52997408ec rustdoc: eliminates raw markdown code (links, headers, etc.) from tooltips of sidebar 2015-01-21 21:31:09 +08:00
Liigo Zhuang
0c06442bcd display plain summary line in javascript 2015-01-21 21:31:09 +08:00
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
Brian Leibig
f39297f991 Add a LALR grammar for Rust with testing support 2015-01-20 18:47:17 -08: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