Commit Graph

41575 Commits

Author SHA1 Message Date
Sean Patrick Santos
7f78887547 Add previously omitted associated const tests. 2015-04-23 21:02:27 -06:00
Sean Patrick Santos
3d9b5d0424 Fix a number of bugs that interfered with cross-crate usage of associated consts. 2015-04-23 21:02:27 -06:00
Sean Patrick Santos
7129e8815e Functional changes for associated constants. Cross-crate usage of associated constants is not yet working. 2015-04-23 21:02:26 -06:00
Sean Patrick Santos
b5499775d6 Structural changes for associated constants
Introduces new variants and types in syntax::ast, middle::ty, and middle::def.
2015-04-23 21:02:25 -06:00
bors
21f278a687 Auto merge of #24633 - rapha:master, r=alexcrichton 2015-04-23 23:44:40 +00:00
bors
90bed3f947 Auto merge of #24695 - bluss:arc-default, r=alexcrichton
Relax bounds on Default implementation for Arc.

Send + Sync are overly restrictive, follow other traits for Arc.
2015-04-23 21:42:32 +00:00
bors
24e4e60ae8 Auto merge of #24615 - arielb1:rapid-reject, r=nikomatsakis
skolemize_late_bound_regions essentially copies the entire type (most of the times it shouldn't, but it does), and match_impl runs millions of times.

Times compiling rustc, tested with
$ make -j4 rustc-stage1
$ ( time RUSTFLAGS=-Z time-passes make -j4 rustc-stage2 ) # need LLVM time for calibration

Before:
real	21m44.960s
user	29m38.812s
sys	0m14.944s

After:
real	19m31.445s
user	26m47.260s
sys	0m14.952s

Making this is a 10% performance improvement.

LLVM passes took 867 seconds before, 862 seconds after.
2015-04-23 19:39:40 +00:00
bors
69e47c77b2 Auto merge of #24537 - rprichard:fix-parallel-check, r=alexcrichton
This required fixing the `pretty-rpass-full` tests to have the same `$$(CSREQ$(1)_T_$(2)_H_$(3))`  dependencies as the `rpass-full` and `cfail-full` tests.  It also required fixing the `run-make/simd-ffi` test to use unique names for its output files.
2015-04-23 17:32:16 +00:00
Raphael Speyer
47ebc48140 Implement IntoIterator for Receiver 2015-04-24 02:43:23 +10:00
bors
65f889919d Auto merge of #24694 - liigo:toggle-all-docs-using-one-link, r=alexcrichton
Combine the two links, [-] and [+], at top-right corner of the page, to use a single and the same one, so that:

- one less link to be created/displayed
- be consistent with other [-]/[+] links in the same page
- people can easily toggle docs without moving their mouse pointer

I also added tooltips/titles to these links.
2015-04-23 14:09:10 +00:00
bors
1114fcd945 Auto merge of #24664 - steveklabnik:doc_ufcs, r=alexcrichton
AKA, two four-letter acronyms 😉

This feels a bit light, if there's other things I should add, let me know.
2015-04-23 12:04:01 +00:00
bors
879c96225b Auto merge of #24714 - frewsxcv:patch-15, r=alexcrichton 2015-04-23 09:58:12 +00:00
bors
bd5c025df4 Auto merge of #24704 - brson:installer, r=alexcrichton
r? @alexcrichton
2015-04-23 07:56:17 +00:00
Corey Farwell
115705f8ec Indicate trait names in doc-comment are code-like 2015-04-23 01:28:46 -04:00
bors
2a6224252c Auto merge of #24693 - brson:beta, r=alexcrichton
Instead of rustc-1.0.0-beta-$triple.tar.gz, betas will be named
rustc-beta-$triple.tar.gz. This will give betas a stable download
URL, prevent old artifacts from accumulating in the dist server's
root directory, and not require the website to be updated every
beta.

As a tradeoff, it will be harder to download previous betas because
they will need to be located in the archives.

I'm still unsure about whether this is the right choice.

cc @alexcrichton @steveklabnik
2015-04-23 04:50:39 +00:00
Ryan Prichard
38d26d811a Include the mode in compiletest's aux-build directory.
The run-pass and pretty run-pass tests could run concurrently, and if they
do, they need to keep their output segregated.

This change might be overkill. We need the suffix for the `pretty` mode,
but we might not need it otherwise. The `debuginfo-lldb` and
`debuginfo-gdb` modes look like they could also need it, but the current
`tests.mk` file happens not to enable both lldb and gdb at the same time,
for incidental reasons.
2015-04-22 20:32:14 -07:00
Ryan Prichard
89b6f397c5 Replace ignore-android with ignore-cross-compile in rustdoc tests
The problem is that rustdoc searches for external crates using the host
triple, not the target triple. It's actually unclear to me whether this is
correct behavior or not, but it is necessary to get cross-compiled tests
working.
2015-04-22 20:32:14 -07:00
Ryan Prichard
f7962d2dae Ignore cross-compilation in some fulldeps tests.
These tests fail, in general, for cross-compilation, because they require
the rustc crates to exist for the target, and they don't. We can't compile
them for the target unless we also compile LLVM for the target (we don't).

Android is a subset of cross-compilation.

The other fulldeps tests, on the other hand, work fine for
cross-compilation, and in fact, are verifying that rustc correctly searches
for a host plugin crate, not a target plugin crate.
2015-04-22 20:32:14 -07:00
Ryan Prichard
d57fc92949 Fix run-make/simd-ffi to work with parallel make check. 2015-04-22 20:32:14 -07:00
Ryan Prichard
b7ab2aeebd Fix the dependency for the pretty-rpass-full tests
The current code attempts to define the
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass-full variable, which does not work,
because $(1) and $(3) are not inside a function. Moreover, there is a test
(run-pass-fulldeps/compiler-calls.rs) that uses rustc_driver, which is not
an indirect dependency of librustc or libsyntax. Listing all the
dependencies will be hard to maintain, but there's a better way to do
this...

As with the rpass-full and cfail-full tests, add dependencies using the
$$(CSREQ$(1)_T_$(3)_H_$(3)) variable, which includes the complete set of
host and target crates, built for a particular stage and host. We use
T_$(3), not T_$(2), because we only build LLVM for host triples (not
target triples), so we can only build rustc_llvm for host triples. The
fulldeps tests that use plugins need host rustc crates, whereas fulldeps
tests that link against rustc and run should be skipped for
cross-compilation (such as Android).

Fixes #22021
2015-04-22 20:26:19 -07:00
bors
6b29a7d564 Auto merge of #24683 - P1start:help-suggestions, r=nrc
This PR uses the inline error suggestions introduced in #24242 to modify a few existing `help` messages. The new errors look like this:

    foobar.rs:5:12: 5:25 error: expected a path on the left-hand side of `+`,
                                not `&'static Copy` [E0178]
    foobar.rs:5     let x: &'static Copy + 'static;
                           ^~~~~~~~~~~~~
    foobar.rs:5:12: 5:35 help: try adding parentheses (per RFC 438):
    foobar.rs:      let x: &'static (Copy + 'static);


    foobar.rs:2:13: 2:23 error: cast to unsized type: `&_` as `core::marker::Copy`
    foobar.rs:2     let x = &1 as Copy;
                            ^~~~~~~~~~
    foobar.rs:2:19: 2:23 help: try casting to a reference instead:
    foobar.rs:      let x = &1 as &Copy;


    foobar.rs:7:24: 7:25 error: expected expression, found `;`
    foobar.rs:7     let x = box (1 + 1);
                                       ^
    foobar.rs:7:13: 7:16 help: try using `box()` instead:
    foobar.rs:      let x = box() (1 + 1);

This also modifies compiletest to give the ability to directly test suggestions given by error messages.
2015-04-23 02:45:06 +00:00
bors
90cc83015e Auto merge of #24703 - Manishearth:rollup, r=Manishearth
r? @Manishearth
2015-04-22 23:25:32 +00:00
Manish Goregaokar
b0319e9094 fix doctest 2015-04-23 04:56:00 +05:30
Steve Klabnik
b97b0e3929 TRPL: UFCS
AKA, two four-letter acronyms 😉
2015-04-22 18:30:27 -04:00
Brian Anderson
0c196fd44c configure: Fix CDPATH bug 2015-04-22 14:52:35 -07:00
Manish Goregaokar
f81933d240 Rollup merge of #24688 - SimonSapin:fmt-write-char, r=alexcrichton
… added in #24661.
2015-04-23 03:21:02 +05:30
Manish Goregaokar
bd8101d698 Rollup merge of #24675 - steveklabnik:two_more_chapters, r=alexcrichton
Two more chapters of TRPL. The `type` one is pretty straightforward, but I wasn't really sure what to put for unsized types. I just explained the very basics, and the special bounds syntax. Thoughts on what else should go here?

r? @alexcrichton
2015-04-23 03:21:02 +05:30
Manish Goregaokar
231cb9361c Rollup merge of #24673 - steveklabnik:doc_attributes, r=alexcrichton
r? @alexcrichton
2015-04-23 03:21:02 +05:30
Brian Anderson
93b7b41137 Update rust-installer. Fixes problems with CDPATH 2015-04-22 14:49:01 -07:00
bors
5c9636975c Auto merge of #24447 - alexcrichton:audit-thread, r=aturon
Much of this code hasn't been updated in quite some time and this commit does a
small audit of the functionality:

* Implementation functions now centralize all functionality on a locally defined
  `Thread` type.
* The `detach` method has been removed in favor of a `Drop` implementation. This
  notably fixes leaking thread handles on Windows.
* The `Thread` structure is now appropriately annotated with `Send` and `Sync`
  automatically on Windows and in a custom fashion on Unix.
* The unsafety of creating a thread has been pushed out to the right boundaries
  now.

Closes #24442
2015-04-22 18:48:31 +00:00
Alex Crichton
2e11009978 std: Audit std::thread implementations
Much of this code hasn't been updated in quite some time and this commit does a
small audit of the functionality:

* Implementation functions now centralize all functionality on a locally defined
  `Thread` type.
* The `detach` method has been removed in favor of a `Drop` implementation. This
  notably fixes leaking thread handles on Windows.
* The `Thread` structure is now appropriately annotated with `Send` and `Sync`
  automatically on Windows and in a custom fashion on Unix.
* The unsafety of creating a thread has been pushed out to the right boundaries
  now.

Closes #24442
2015-04-22 10:42:33 -07:00
Liigo Zhuang
7a53081522 rustdoc: toggle collapse/expand all docs using the same link 2015-04-23 01:37:01 +08:00
Steve Klabnik
defdc4418a TRPL: type aliases and unsized types 2015-04-22 13:27:13 -04:00
Ulrik Sverdrup
a6f8327644 Relax bounds on Default implementation for Arc.
Send + Sync are overly restrictive, follow other traits for Arc.
2015-04-22 19:05:51 +02:00
Brian Anderson
193461c63a mk: Remove version numbers from beta artifacts
Instead of rustc-1.0.0-beta-$triple.tar.gz, betas will be named
rustc-beta-$triple.tar.gz. This will give betas a stable download
URL, prevent old artifacts from accumulating in the dist server's
root directory, and not require the website to be updated every
beta.

As a tradeoff, it will be harder to download previous betas because
they will need to be located in the archives.
2015-04-22 08:51:39 -07:00
Steve Klabnik
a5ae4cc19d TRPL: attributes & conditional compilation 2015-04-22 11:27:31 -04:00
bors
3dbfa74305 Auto merge of #24692 - frewsxcv:rm-default-imports, r=alexcrichton
In 8f5b5f94dc, `default::Default` was
added to the prelude, so these imports are no longer necessary.
2015-04-22 14:41:25 +00:00
Corey Farwell
68989918d2 Remove doc-comment default::Default imports
In 8f5b5f94dc, `default::Default` was
added to the prelude, so these imports are no longer necessary.
2015-04-22 09:42:36 -04:00
bors
e9e9279d87 Auto merge of #24685 - nrc:span-pred, r=huonw 2015-04-22 08:47:09 +00:00
Simon Sapin
bf1310389e Add a test for std::fmt::Write::write_char 2015-04-22 08:52:18 +02:00
bors
50cd2e84d5 Auto merge of #24671 - steveklabnik:doc_const_static, r=alexcrichton
r? @alexcrichton
2015-04-22 06:37:57 +00:00
Nick Cameron
8456dba4e6 Fix spans for predicates in where clauses 2015-04-22 18:29:54 +12:00
bors
c0eb9384af Auto merge of #24674 - alexcrichton:rollup, r=alexcrichton 2015-04-22 03:38:20 +00:00
Steve Klabnik
a04f6c5293 TRPL: const and static 2015-04-21 19:47:07 -04:00
Alex Crichton
5815064025 Merge remote-tracking branch 'origin/master' into rollup 2015-04-21 16:27:26 -07:00
Alex Crichton
224fc1085b Test fixes and rebase conflicts, round 1 2015-04-21 16:17:24 -07:00
Alex Crichton
a1dd5ac787 rollup merge of #24636: alexcrichton/remove-deprecated
Conflicts:
	src/libcore/result.rs
2015-04-21 15:28:53 -07:00
Alex Crichton
98e9765d97 rollup merge of #24541: alexcrichton/issue-24538
This is an implementation of [RFC 1030][rfc] which adds these traits to the
prelude and additionally removes all inherent `into_iter` methods on collections
in favor of the trait implementation (which is now accessible by default).

[rfc]: https://github.com/rust-lang/rfcs/pull/1030

This is technically a breaking change due to the prelude additions and removal
of inherent methods, but it is expected that essentially no code breaks in
practice.

[breaking-change]
Closes #24538
2015-04-21 15:28:06 -07:00
Alex Crichton
a568a7f9f2 std: Bring back f32::from_str_radix as an unstable API
This API was exercised in a few tests and mirrors the `from_str_radix`
functionality of the integer types.
2015-04-21 15:23:54 -07:00
Alex Crichton
44338cb944 rollup merge of #24672: steveklabnik/edit_tuple_structs
I thought I edited all the last little chapters, but I missed this one.

r? @alexcrichton
2015-04-21 15:23:18 -07:00