Commit Graph

32472 Commits

Author SHA1 Message Date
Alex Crichton
e8a3ac5cb0 rollup merge of #17276 : treeman/json-comma 2014-09-17 08:49:04 -07:00
Alex Crichton
27af691017 rollup merge of #17226 : P1start/rustdoc-colour 2014-09-17 08:48:53 -07:00
Alex Crichton
8875584363 rollup merge of #16936 : nham/two_way_makeover 2014-09-17 08:48:33 -07:00
Alex Crichton
e68c95329e rollup merge of #16931 : omasanori/unnecessary-path-brackets 2014-09-17 08:48:31 -07:00
Alex Crichton
fc6eb9a911 rollup merge of #16889 : P1start/array-not-vector 2014-09-17 08:48:27 -07:00
Alex Crichton
0515e71531 test: Un-ignore some GDB pretty printing tests
I've confirmed that these are working on the snapshot builders

Closes #16919
2014-09-17 07:50:30 -07:00
bors
ad9ed40e7f auto merge of #17264 : bkoropoff/rust/issue-17252, r=nick29581
Recursive items are currently detected in the `check_const` pass which runs after type checking.  This means a recursive static item used as an array length will cause type checking to blow the stack.  This PR separates the recursion check out into a separate pass which is run before type checking.

Closes issue #17252

r? @nick29581
2014-09-17 14:06:19 +00:00
bors
aac078dca5 auto merge of #17254 : gamazeps/rust/issue17210, r=alexcrichton
Closes #17210
2014-09-17 12:06:22 +00:00
bors
e719db24a0 auto merge of #17247 : huonw/rust/toggle-clone, r=alexcrichton
This needs a clone otherwise each successive insertion detaches `toggle`
from the previous position.

Fixes #17125.
2014-09-17 10:21:17 +00:00
bors
12b757b370 auto merge of #17246 : bkoropoff/rust/issue-17216, r=pnkfelix
Trans the cleanup scope of for loop bindings so we don't leak resources.  Regression test included.

Closes #17216
2014-09-17 08:31:18 +00:00
Vadim Chugunov
ffa8b2917c Case-insensitive environment keys. 2014-09-17 00:56:13 -07:00
P1start
8b88811419 rustdoc: Correctly distinguish enums and types
This is done by adding a new field to the `DefTy` variant of `middle::def::Def`,
which also clarifies an error message in the process.

Closes #16712.
2014-09-17 18:53:54 +12:00
Guillaume Pinot
edec96b78b Relicense shootout-fasta.rs ti the shootout license.
Everyone agreed.

Fix #17072
2014-09-17 08:44:44 +02:00
Guillaume Pinot
a182f13a2e Relicense shootout-spectralnorm.rs to the shootout license
Everyone agreed.

Fix #17064
2014-09-17 08:33:57 +02:00
bors
88cb454b91 auto merge of #17160 : nick29581/rust/front, r=pcwalton
r?
2014-09-17 05:56:15 +00:00
P1start
ef4b921599 Restore colour to rustdoc, add colour to ffi functions and methods 2014-09-17 17:23:47 +12:00
Nick Cameron
3a01d0f1e3 rebasing fixes 2014-09-17 16:53:20 +12:00
Nick Cameron
74db87b99d move feature_gate to libsyntax 2014-09-17 16:53:20 +12:00
Nick Cameron
375c95b7ad move std_inject to libsyntax 2014-09-17 16:53:20 +12:00
Nick Cameron
520671f150 move most of front to libsyntax 2014-09-17 16:53:20 +12:00
Martin Olsson
573aa3549a Drop a few unused diagnostic codes
Avoids warnings during bootstrap, similar to:

  src/librustc/lib.rs:149:1: 149:39 warning: diagnostic code E0099 never used
  src/librustc/lib.rs:149 __build_diagnostic_array!(DIAGNOSTICS)

All of these codes stopped being used in this commit:
688ddf7 ("typeck/kind -- stop using old trait framework.")

See also similar fix: https://github.com/rust-lang/rust/issues/16449
2014-09-17 06:32:56 +02:00
bors
ff613abaa2 auto merge of #17227 : tshepang/rust/stronger-break, r=aturon
Remove trailing whitespace while at it
2014-09-17 03:46:15 +00:00
Brian Koropoff
0e230c04dd Add regression test for issue #17283 2014-09-16 19:21:42 -07:00
Brian Koropoff
3863b68df4 Propagate restrictions against struct literals to the RHS of assignments
This prevents confusing errors when accidentally using an assignment
in an `if` expression.  For example:

```rust
fn main() {
    let x = 1u;
    if x = x {
        println!("{}", x);
    }
}
```

Previously, this yielded:

```
test.rs:4:16: 4:17 error: expected `:`, found `!`
test.rs:4         println!("{}", x);
                         ^
```

With this change, it now yields:

```
test.rs:3:8: 3:13 error: mismatched types: expected `bool`, found `()` (expected bool, found ())
test.rs:3     if x = x {
                 ^~~~~
```

Closes issue #17283
2014-09-16 19:21:42 -07:00
Brian Koropoff
99293b16e4 Convert restriction enum into bitflags
This makes having multiple restrictions at once cleaner.
Also drop NO_DOUBLEBAR restriction since it is never used.
2014-09-16 19:21:18 -07:00
Alex Crichton
c4a1c3800b Register new snapshots
This is the first linux snapshot created on our new CentOS 5.10 builders.

Closes #9545
2014-09-16 18:16:38 -07:00
bors
b75b0f7923 auto merge of #17223 : retep998/rust/into_string, r=huonw
Replaces some usage of `.to_string()` with `.into_string()`
2014-09-17 01:16:14 +00:00
bors
0e784e1684 auto merge of #17268 : aturon/rust/mut-conventions, r=alexcrichton
As per [RFC 52](https://github.com/rust-lang/rfcs/blob/master/active/0052-ownership-variants.md), use `_mut` suffixes to mark mutable variants, and `into_iter` for moving iterators. Additional details and motivation in the RFC.

Note that the iterator *type* names are not changed by this RFC; those are awaiting a separate RFC for standardization.

Closes #13660
Closes #16810

[breaking-change]
2014-09-16 23:26:11 +00:00
Aaron Turon
fc525eeb4e Fallout from renaming 2014-09-16 14:37:48 -07:00
bors
ceb9bbfbf5 auto merge of #17213 : mo/rust/fix_typos, r=aturon 2014-09-16 21:36:08 +00:00
Brian Anderson
474d34043e Use PATH instead of HOME in env! example
HOME does not exist under typical windows environments.
2014-09-16 13:51:01 -07:00
Aaron Turon
d8dfe1957b Align with _mut conventions
As per [RFC
52](https://github.com/rust-lang/rfcs/blob/master/active/0052-ownership-variants.md),
use `_mut` suffixes to mark mutable variants, and `into_iter` for moving
iterators.

[breaking-change]
2014-09-16 11:46:52 -07:00
Jakub Wieczorek
bdd9ee3cc7 Run cleanup for base struct in functional struct update expressions
Fixes #17302.
2014-09-16 20:34:16 +02:00
Aaron Turon
2ff07af996 Deprecate libnum in favor of rust-lang/num
This is part of the migration of crates into the Cargo ecosystem. There
is now an external repository https://github.com/rust-lang/num for bignums.

The single use of libnum elsewhere in the repository is for a shootout
benchmark, which is being moved into the external crate.

Due to deprecation, this is a:

[breaking-change]
2014-09-16 11:29:29 -07:00
Niko Matsakis
e86c87a81e Generalize lifetime bounds on type parameters to support multiple
lifetime bounds. This doesn't really cause any difficulties, because
we already had to accommodate the fact that multiple implicit bounds
could accumulate. Object types still require precisely one lifetime
bound. This is a pre-step towards generalized where clauses (once you
have lifetime bounds in where clauses, it is harder to restrict them
to exactly one).
2014-09-16 14:18:06 -04:00
Manish Goregaokar
9c3a08551a Clean up code for unused_must_use lint 2014-09-16 22:53:19 +05:30
bors
828e075abd auto merge of #17266 : Gankro/rust/vec-move, r=alexcrichton
Seems to correctly report exact size, so it should claim to do so formally.
2014-09-16 17:06:00 +00:00
Alexander Light
01472435ac Improve the zsh completions.
Currently the ZSH completions are quite old an nearly useless. This
brings them up to be compatible with current rust and makes them far
more useful.

Closes #17305
2014-09-16 12:23:38 -04:00
Jake Kaufman
7d00eb6133 Update triple per comments 2014-09-16 08:44:47 -07:00
bors
946654a721 auto merge of #17197 : nikomatsakis/rust/issue-5527-trait-reform-revisited, r=pcwalton
This patch does not make many functional changes, but does a lot of restructuring towards the goals of #5527. This is the biggest patch, basically, that should enable most of the other patches in a relatively straightforward way.

Major changes:

- Do not track impls through trans, instead recompute as needed.
- Isolate trait matching code into its own module, carefully structure to distinguish various phases (selection vs confirmation vs fulfillment)
- Consider where clauses in their more general form
- Integrate checking of builtin bounds into the  trait matching process, rather than doing it separately in kind.rs (important for opt-in builtin bounds)

What is not included:

- Where clauses are still not generalized. This should be a straightforward follow-up patch.
- Caching. I did not include much caching. I have plans for various kinds of caching we can do. Should be straightforward. Preliminary perf measurements suggested that this branch keeps compilation times roughly what they are.
- Method resolution. The initial algorithm I proposed for #5527 does not work as well as I hoped. I have a revised plan which is much more similar to what we do today.
- Deref vs deref-mut. The initial fix I had worked great for autoderef, but not for explicit deref. 
- Permitting blanket impls to overlap with specific impls. Initial plan to consider all nested obligations before considering an impl to match caused many compilation errors. We have a revised plan but it is not implemented here, should be a relatively straightforward extension.
2014-09-16 15:25:59 +00:00
bors
cdd46f8592 auto merge of #17245 : sfackler/rust/enumset-show, r=alexcrichton 2014-09-16 13:41:00 +00:00
bors
c09437ab2d auto merge of #17244 : spastorino/rust/patch-1, r=alexcrichton 2014-09-16 11:11:03 +00:00
Jonas Hietala
04f4bb4290 Rename std::io::net::unix to std::io::net::pipe.
Renamed as we may support pipes for other platforms.

Closes #12093

[breaking-change]
2014-09-16 11:37:44 +02:00
bors
e6a3dabe43 auto merge of #17232 : untitaker/rust/patch-1, r=alexcrichton
The wording is correct if you consider that two of these lines were extracted from the original example. It still tripped me up while reading, so i just removed any reference to the linecount.
2014-09-16 09:26:03 +00:00
Jake Kaufman
2f35723170 Correct windows install link in guide
This closes #17260. The guide references the old install location for
the windows rust install before it was split into 64bit and 32bit
installers. This adds a link to each binary.
2014-09-15 23:36:17 -07:00
bors
3212d70302 auto merge of #17280 : thestinger/rust/heap, r=pcwalton 2014-09-16 04:56:01 +00:00
Daniel Micay
7ce2ea0d14 stop spawning so many tasks in guide-tasks
1000 tasks * 2MiB stack size -> 2GiB of virtual memory

On a 64-bit OS, a 32-bit executable has 4GiB available, but the kernel
gets half of the available address space so the limit is 2GiB on 32-bit.

Closes #17044
2014-09-16 00:47:49 -04:00
bors
f8426e2e21 auto merge of #17288 : alexcrichton/rust/change-snap, r=brson
I'm rotating in some CentOS 5.10 bots so we *actually* build on Linux 2.6.18
like we advertise doing so. Currently the snapshots are incompatible with CentOS
5.10 due to snapshots requiring glibc 2.6 and CentOS 5.10 having glibc 2.5.

It turns out that rustc only requires *one* symbol from glibc 2.6, which is
`futimens`. The rust distribution itself does not use this symbol, but LLVM
conditionally detects it and then uses it. This symbol isn't even called as part
of the compilation process, so we don't even need it!

The new snapshot was generated following these instructions [1]:

1. Download the current x86_64 linux snapshot and unpack it.
2. Open the rustc binary in a hex editor.
3. Change the linkage against glibc 2.6 from strong to *weak*
4. Write changes and re-run src/etc/make-snapshot.py
5. Upload new tarball to S3

On CentOS 5.10 a warning is printed each time the snapshot runs that the symbol
cannot be found (anyone with glibc 2.6+ does not have this warning printed). The
key part is that we can *bootstrap* on CentOS 5.10 at this point. The next
snapshot will be naturally compatible with glibc 2.3 (even older!) and will not
need to be manually edited.

[1]: http://jamesbond3142.no-ip.org/wiki/wiki.cgi/NewAppsOnOldGlibc
2014-09-16 02:26:01 +00:00
Alex Crichton
ba0c100f3b Change the last linux 64-bit snapshot
I'm rotating in some CentOS 5.10 bots so we *actually* build on Linux 2.6.18
like we advertise doing so. Currently the snapshots are incompatible with CentOS
5.10 due to snapshots requiring glibc 2.6 and CentOS 5.10 having glibc 2.5.

It turns out that rustc only requires *one* symbol from glibc 2.6, which is
`futimens`. The rust distribution itself does not use this symbol, but LLVM
conditionally detects it and then uses it. This symbol isn't even called as part
of the compilation process, so we don't even need it!

The new snapshot was generated following these instructions [1]:

1. Download the current x86_64 linux snapshot and unpack it.
2. Open the rustc binary in a hex editor.
3. Change the linkage against glibc 2.6 from strong to *weak*
4. Write changes and re-run src/etc/make-snapshot.py
5. Upload new tarball to S3

On CentOS 5.10 a warning is printed each time the snapshot runs that the symbol
cannot be found (anyone with glibc 2.6+ does not have this warning printed). The
key part is that we can *bootstrap* on CentOS 5.10 at this point. The next
snapshot will be naturally compatible with glibc 2.3 (even older!) and will not
need to be manually edited.

[1]: http://jamesbond3142.no-ip.org/wiki/wiki.cgi/NewAppsOnOldGlibc
2014-09-15 18:14:26 -07:00
Brian Anderson
a3c27ea3c6 mk: Update how the build deals with version labels. #16677
Adds a new configure flag, --release-channel, which determines how the version
number should be augmented with a release label, as well as how the distribution
artifacts will be named. This is entirely for use by the build automation.

--release-channel can be either 'source', 'nightly', 'beta', or 'stable'.

Here's a summary of the affect of these values on version number and
artifact naming, respectively:

* source - '0.12.0-pre', 'rust-0.12.0-pre-...'
* nightly - '0.12.0-nightly', 'rust-nightly-...'
* beta - '0.12.0-beta', 'rust-beta-...'
* stable - '0.12.0', 'rust-0.12.0-...'

Per http://discuss.rust-lang.org/t/rfc-impending-changes-to-the-release-process/508/1
2014-09-15 16:25:20 -07:00