Commit Graph

61731 Commits

Author SHA1 Message Date
Daniel Xu
07a80260a6 Move COMPILER_TESTS.md out of the root directory 2017-02-25 00:13:00 -06:00
bors
e78aa5d754 Auto merge of #40060 - alexcrichton:retry-downloads, r=aturon
rustbuild: Retry downloads by default

Don't rely on curl's --retry, it appears to not work for some errors like SSL
errors.
2017-02-25 05:50:08 +00:00
Phil Ruffwind
1f75085ae5 Add Gankro's table to nomicon/src/phantom-data.md
Original: https://github.com/rust-lang/rust/issues/30069#issuecomment-159928136

Testing confirms that:

  - PhantomData<fn() -> T> does not actually enable drop checking.
  - PhantomData<fn(T) -> T> is neither variant nor contravariant.
2017-02-25 00:25:13 -05:00
bors
19e5a82f89 Auto merge of #40084 - alexcrichton:update-sccache, r=aturon
Update sccache binaries on CI

Currently CI builds can fail spuriously during the LLVM build (#39003). I
believe this is due to sccache, and I believe that in turn was due to the fact
that the sccache server used to just be a raw mio server. Historically raw mio
servers are quite complicated to get right, but this is why we built Tokio! The
sccache server has been migrated to Tokio which I suspect would fix any latent
issues.

I have no confirmation of this (never been able to reproduce the deadlock
locally), but my hunch is that updating sccache to the master branch will fix
the timeouts during the LLVM build.

The binaries previously came from Gecko's infrastructure, but I've built new
ones by hand for Win/Mac/Linux and uploaded them to our CI bucket.
2017-02-25 03:10:23 +00:00
bors
7932349e95 Auto merge of #40072 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 11 pull requests

- Successful merges: #39777, #39815, #39845, #39886, #39940, #40010, #40030, #40048, #40050, #40052, #40071
- Failed merges:
2017-02-25 00:40:09 +00:00
Alex Crichton
255a87499d Update sccache binaries on CI
Currently CI builds can fail spuriously during the LLVM build (#39003). I
believe this is due to sccache, and I believe that in turn was due to the fact
that the sccache server used to just be a raw mio server. Historically raw mio
servers are quite complicated to get right, but this is why we built Tokio! The
sccache server has been migrated to Tokio which I suspect would fix any latent
issues.

I have no confirmation of this (never been able to reproduce the deadlock
locally), but my hunch is that updating sccache to the master branch will fix
the timeouts during the LLVM build.

The binaries previously came from Gecko's infrastructure, but I've built new
ones by hand for Win/Mac/Linux and uploaded them to our CI bucket.
2017-02-24 13:16:54 -08:00
bors
08230775a0 Auto merge of #39892 - petrochenkov:rt, r=alexcrichton
Fix test caching on Windows/GNU

Addresses https://github.com/rust-lang/rust/issues/36385#issuecomment-277131231

Previously the sysroot directory was purged on every build and mingw startup objects were rebuilt unconditionally and always triggered test reruns.
Now mingw startup objects are built in the native directory and then copied into the sysroot directory. They are also rebuilt only when necessary, so test caching works.
2017-02-24 16:06:15 +00:00
Tang Chenglong
6aed773448 Fix a typo 2017-02-24 22:01:26 +08:00
Guillaume Gomez
f26bbb3510 Rollup merge of #40071 - tomwhoiscontrary:pr-lets-apostrophes, r=GuillaumeGomez
Correct another typo in procedural macros chapter of the Book.

Another (and the only remaining) instance of the lets/let's mistake fixed in c8292fc / 36b00cf.

r? @steveklabnik
2017-02-24 13:23:01 +01:00
Guillaume Gomez
802a502ebd Rollup merge of #40052 - GuillaumeGomez:sunc_docs, r=frewsxcv
Add missing urls in MutexGuard docs

r? @frewsxcv
2017-02-24 13:23:00 +01:00
Guillaume Gomez
6f9e69a0fd Rollup merge of #40050 - DaseinPhaos:patch-3, r=steveklabnik
Update exception-safety.md

Fix variable name typo
2017-02-24 13:22:59 +01:00
Guillaume Gomez
173b725b89 Rollup merge of #40048 - jimblandy:fmt-arg-types-doc, r=alexcrichton
Update std::fmt module docs for landing of #33642.

Since #33642, it's no longer true that all references to a given format argument must use the same type. The docs don't seem to have been updated.
2017-02-24 13:22:58 +01:00
Guillaume Gomez
ef4d27d459 Rollup merge of #40030 - matklad:stack-docs, r=alexcrichton
Clarify thread::Builder::stack_size docs

Add two pieces of information:

* the size is in bytes
* the actual stack size might be bigger.

Also change the example to use a more realistic value of 32 kilobytes.

r? @steveklabnik
2017-02-24 13:22:57 +01:00
Guillaume Gomez
94a3172891 Rollup merge of #40010 - GuillaumeGomez:barrier-docs, r=frewsxcv
Add missing urls and examples into Barrier structs

r? @frewsxcv
2017-02-24 13:22:56 +01:00
Guillaume Gomez
01758c19b7 Rollup merge of #39940 - sgrif:sg-indentation, r=alexcrichton
Fix indentation of error message

So I just encountered this error for the first time. It's unclear what
it means, why I encountered it, or how to fix it. But worst of all, it
has a random newline and weird indentation! This commit fixes that last
bit.

<img width="680" alt="screen shot 2017-02-18 at 4 35 36 pm" src="https://cloud.githubusercontent.com/assets/1529387/23097087/0ef5ac4a-f5f9-11e6-9132-18ce759f7092.png">
2017-02-24 13:22:55 +01:00
Guillaume Gomez
3b10300e0a Rollup merge of #39886 - mbrubeck:doc-edit, r=steveklabnik
Additional docs for Vec, String, and slice trait impls

r? @steveklabnik
2017-02-24 13:22:54 +01:00
Guillaume Gomez
03e9e00d85 Rollup merge of #39845 - JDemler:master, r=steveklabnik
Add Documentation for Custom Attributes and Error Reporting in Procedural Macros

This fixes #39821 .

I'm not sure if the process of how to access custom attributes should be documented as well.
But I feel, that this should rather be documented in `syn`
2017-02-24 13:22:53 +01:00
Guillaume Gomez
c07aa14201 Rollup merge of #39815 - oli-obk:patch-3, r=aturon
enable tools to use test runners programmatically
2017-02-24 13:22:52 +01:00
Guillaume Gomez
246b1db3ec Rollup merge of #39777 - mina86:gib, r=steveklabnik
book: binary prefixed are defined by IEC and not in SI

Binary prefixes (such as Gi for ‘gibi-’ in GiB) are defined by
International Electrotechnical Commission (IEC) and not in the
International System of Units (SI).

Though to be honest I’d just reword the previous paragraph to use ‘1 GiB’.
2017-02-24 13:22:51 +01:00
Tom Anderson
7c52cadfc3 Correct another typo in procedural macros chapter of the Book. 2017-02-24 11:48:42 +00:00
bors
9f082d2111 Auto merge of #39714 - vadimcn:top-level-expn2, r=michaelwoerister
Code cleanup.

r? @michaelwoerister

Just figured out that the same condition may be expressed much more cleanly.
Sorry for the churn!
2017-02-24 07:30:11 +00:00
bors
674af8c7f5 Auto merge of #39851 - alexcrichton:verify-unstable, r=brson
test: Verify all sysroot crates are unstable

As we continue to add more crates to the compiler and use them to implement
various features we want to be sure we're not accidentally expanding the API
surface area of the compiler! To that end this commit adds a new `run-make` test
which will attempt to `extern crate foo` all crates in the sysroot, verifying
that they're all unstable.

This commit discovered that the `std_shim` and `test_shim` crates were
accidentally stable and fixes the situation by deleting those shims. The shims
are no longer necessary due to changes in Cargo that have happened since they
were originally incepted.
2017-02-24 02:40:16 +00:00
Vadim Petrochenkov
0982a28304 rposition() -> rev().position() (#2) 2017-02-23 20:57:16 -05:00
est31
77f131da1a Review changes
* use more convenient mk_substs function
	* remove type annotations
	* use map_bound one level farther outside
	* style improvements
2017-02-24 00:32:21 +01:00
est31
21c38988f4 Two more tests 2017-02-23 22:34:17 +01:00
est31
f753a6ef02 Feature gate 2017-02-23 22:32:25 +01:00
est31
1b9b322883 Implement non-capturing closure to fn coercion 2017-02-23 22:32:22 +01:00
Ariel Ben-Yehuda
87e544bca5 use a more conservative inhabitableness rule
This is a [breaking-change] from 1.15, because this used to compile:

```Rust
enum Void {}
fn foo(x: &Void) {
    match x {}
}
```
2017-02-23 22:46:22 +02:00
Peter Wagenet
69c5359bf2 Add tests for lib defaults 2017-02-23 11:25:26 -08:00
Vadim Petrochenkov
227eab0b7f Fix tests on Windows (#1) 2017-02-23 13:25:23 -05:00
Ariel Ben-Yehuda
4e2c993bd3 trans: don't ICE when trying to create ADT trans-items
ADTs are translated in-place from rustc_trans::callee, so no trans-items
are needed.

This fix will be superseded by the shimmir branch, but I prefer not to
backport that to beta.

Fixes #39823.
2017-02-23 20:03:18 +02:00
Peter Wagenet
ae32b6eafd Better handling of lib defaults 2017-02-23 09:36:33 -08:00
bors
413a975e31 Auto merge of #40039 - abonander:issue_40001, r=jseyfried
Don't assume plugin-whitelisted attributes are proc macro attributes

closes #40001
2017-02-23 16:56:13 +00:00
Alex Crichton
30b0ed0bb6 rustbuild: Retry downloads by default
Don't rely on curl's --retry, it appears to not work for some errors like SSL
errors.
2017-02-23 07:04:29 -08:00
Guillaume Gomez
088b727456 Add missing urls in MutexGuard docs 2017-02-23 11:43:30 +01:00
Josh Driver
da6dc5331f Add macro suggestions for macros imported with use
This commit searchs modules for macro suggestions.
It also removes imported macro_rules from macro_names,
and adds more corner case checks for which macros
should be suggested in specific contexts.
2017-02-23 20:28:35 +10:30
Josh Driver
4ecdc68153 Move MacroKind into Def::Macro 2017-02-23 20:12:33 +10:30
Luxko
729948f958 Update exception-safety.md 2017-02-23 01:50:16 -06:00
Luxko
84ca464f9c Update exception-safety.md
Fix variable name typo
2017-02-23 01:44:27 -06:00
Jim Blandy
6b8e1756c7 Update std::fmt module docs for landing of #33642. 2017-02-22 21:18:52 -08:00
Taylor Cramer
6f0447b52b Change break or continue with no label to error nmbr 590 2017-02-22 18:10:37 -08:00
Austin Bonander
dac25e2b27 Don't assume plugin-whitelisted attributes are proc macro attributes
closes #40001
2017-02-22 15:43:03 -08:00
bors
bfe45974a1 Auto merge of #39866 - steveklabnik:unstable-book, r=alexcrichton
Create the Unstable Book

Part of https://github.com/rust-lang/rust/issues/39588

This isn't done yet. To do:

- [x] import the nightly book contents here
- [ ] possibly write some more chapters

This will _not_ be done before it lands; that's part of the whole unstable thing.
2017-02-22 23:08:35 +00:00
Guillaume Gomez
958fbc5d66 Make path separator replacement for subfiles as well 2017-02-22 23:19:03 +01:00
Nikhil Shagrithaya
b7b58ffdf4 Added test for inclusive_range_syntax in compile-fail test suite 2017-02-23 00:50:29 +05:30
Raph Levien
b3ee2490c2 Merge branch 'master' of https://github.com/rust-lang/rust into readdir 2017-02-22 09:30:46 -08:00
Raph Levien
81b9b3c542 Update name_bytes, scoop up latest libc
Update the implementation of name_bytes to use the owned string (which
is thread safe). Also bump the src/liblibc submodule now that's merged.
2017-02-22 09:28:02 -08:00
Niko Matsakis
b576abd2cc detect "bootstrap outputs" when serializing the dep-graph
Fixes #39828.
2017-02-22 12:02:41 -05:00
Nathan Froyd
ffc6ddd51b add -C overflow-checks option
In addition to defining and handling the new option, we also add a
method on librustc::Session for determining the necessity of overflow
checks.  This method provides a single point to sort out the three (!)
different ways for turning on overflow checks: -C debug-assertions, -C
overflow-checks, and -Z force-overflow-checks.

Fixes #33134.
2017-02-22 10:08:57 -05:00
er-1
f557e71f44 Ignore ASM tests on powerpc
Part of #39015
2017-02-22 15:49:07 +01:00