Commit Graph

57243 Commits

Author SHA1 Message Date
Paulo Matos
cb3b03c2a9 Improve documention troubleshooting missing linker. Fix #32208. 2016-09-27 16:45:36 -04:00
bors
ea65ab6c7e Auto merge of #36761 - jonathandturner:E0425_E0446_E0449, r=nrc
Update E0425, E0446, E0449

This addresses https://github.com/rust-lang/rust/issues/35343, https://github.com/rust-lang/rust/issues/35923, and https://github.com/rust-lang/rust/issues/35924.  Part of https://github.com/rust-lang/rust/issues/35233

Specifically, this adds labels to these error messages following the suggestions in the attached bugs.

r? @nrc
2016-09-27 07:30:34 -07:00
bors
8467e8d24a Auto merge of #36758 - michaelwoerister:incr-comp-file-headers, r=eddyb
incr.comp.: Let the compiler ignore incompatible incr. comp. cache artifacts

Implements #35720.

cc @nikomatsakis
2016-09-27 04:05:34 -07:00
bors
ec7679b460 Auto merge of #36764 - jonathandturner:rollup, r=jonathandturner
Rollup of 14 pull requests

- Successful merges: #36563, #36574, #36586, #36662, #36663, #36669, #36676, #36721, #36723, #36727, #36729, #36742, #36754, #36756
- Failed merges:
2016-09-26 23:30:19 -07:00
Michael Woerister
263ba92045 incr.comp.: Fix build issue in rustc_incremental if CFG_VERSION is not set. 2016-09-26 22:26:10 -04:00
bors
d0623cf7bd Auto merge of #36678 - TimNN:fix-dist, r=alexcrichton
emit feature help in cheat mode (fix nightlies)

This should fix the `distcheck` failure in the latest nightly.

cc #36539

It's probably not ideal to check the environment that often and the code ist duplicated from `librustc/session/config.rs` but this was the easiest fix I could think of.

A cleaner solution would probably be to move the `unstable_features` from `Options` to `ParseSess` and change the `diag` parameter of `emit_feature_err` to take `ParseSess` instead of a `Handler`.
2016-09-26 17:44:25 -07:00
Jonathan Turner
e832762ba6 Rollup merge of #36756 - alygin:e0512-new-format, r=jonathandturner
New error format for E0512

Part of #35233, fixes #36107

r? @jonathandturner
2016-09-26 17:29:50 -07:00
Jonathan Turner
5c9fc99520 Rollup merge of #36754 - tmiasko:getaddrinfo-errors, r=alexcrichton
When getaddrinfo returns EAI_SYSTEM retrieve actual error from errno.

Fixes issue #36546. This change also updates libc to earliest version
that includes EAI_SYSTEM constant.

Previously, in cases where `EAI_SYSTEM` has been returned from getaddrinfo, the
resulting `io::Error` would be broadly described as "System error":

    Error { repr: Custom(Custom { kind: Other, error: StringError("failed to lookup address information: System error") }) }

After change a more detailed error is crated based on particular value of
errno, for example:

    Error { repr: Os { code: 64, message: "Machine is not on the network" } }

The only downside is that the prefix "failed to lookup address information" is
no longer included in the error message.
2016-09-26 17:29:49 -07:00
Jonathan Turner
816f1477bb Rollup merge of #36742 - shepmaster:llvm-4-preamble, r=alexcrichton
Extend preprocessor LLVM version checks to support LLVM 4.x

This doesn't actually do anything for LLVM 4.x yet, but sets the stage.
2016-09-26 17:29:49 -07:00
Jonathan Turner
ee2e115995 Rollup merge of #36729 - frewsxcv:rustdoc, r=alexcrichton
librustdoc refactoring and cleanup.

See each commit for more information. Biggest changes here is the addition of a `passes` module and each pass now lives in its own submodule.
2016-09-26 17:29:49 -07:00
Jonathan Turner
df52628ee3 Rollup merge of #36727 - kallisti5:master, r=Aatch
Haiku: Initial work at OS support

These changes should be non-invasive to non-Haiku platforms. These patches were hand reworked from Neil's original Rust 1.9.0 patches. I've done some style cleanup and design updates along the way.

There are a few small additional patches to libc, rust-installer and compiler-rt that will be submitted once this one is accepted.

Haiku can be compiled on Linux, and a full gcc cross-compiler with a Haiku target is available, which means bootstrapping should be fairly easy. The patches here have already successfully bootstrapped under our haiku x86_gcc2 architecture. http://rust-on-haiku.com/wiki/PortingRust

I'll be focusing on our more modern gcc5 x86 and x86 architectures for now.

As for support, we're not seeking official support for now. We understand Haiku isn't a top-tier OS choice, however having these patches upstream greatly reduces the amount of patchwork we have to do. Mesa has Haiku code upstream, and we submit patches to keep it going. Mesa doesn't test on Haiku and we're ok with that :-)
2016-09-26 17:29:49 -07:00
Jonathan Turner
9b72650890 Rollup merge of #36723 - GuillaumeGomez:e0513, r=jonathandturner
E0513

Part of #35233

r? @jonathandturner
2016-09-26 17:29:48 -07:00
Jonathan Turner
02cc578676 Rollup merge of #36721 - TimNN:infinite-emptiness, r=nrc
reject macros with empty repetitions

Fixes #5067 by checking the lhs of `macro_rules!` for repetitions which could match an empty token tree.
2016-09-26 17:29:48 -07:00
Jonathan Turner
d6a7a4fb57 Rollup merge of #36676 - bluss:rustdoc-where-css, r=steveklabnik
rustdoc css: Put `where` in trait listings on a new line

This is about the gray area at the top of a trait's documentation page,
that lists all methods and their signatures. A big trait page like
Iterator is very crowded without this tweak.
2016-09-26 17:29:48 -07:00
Jonathan Turner
5cc9fb9ed9 Rollup merge of #36669 - jseyfried:refactor_tok_result, r=nrc
Unify `TokResult` and `ResultAnyMacro`

Fixes #36641.
r? @nrc
2016-09-26 17:29:48 -07:00
Jonathan Turner
96577e4871 Rollup merge of #36663 - brson:build-plan, r=alexcrichton
rustbuild: Print out all build steps when --verbose

These helped me debug some problems with the asmjs target. It's just vomiting debug representations, so not the prettiest stuff.

r? @alexcrichton
2016-09-26 17:29:48 -07:00
Jonathan Turner
1d9646228d Rollup merge of #36662 - jseyfried:parse_macro_invoc_paths, r=nrc
parser: support paths in bang macro invocations (e.g. `path::to::macro!()`)

r? @nrc
2016-09-26 17:29:47 -07:00
Jonathan Turner
3775be853e Rollup merge of #36586 - japaric:rustdoc-sysroot, r=alexcrichton
rustdoc: implement --sysroot

with the same semantics as rustc. This let us build documentation for a
crate that depends on a custom sysroot.

r? @alexcrichton
cc @cbiffle
2016-09-26 17:29:47 -07:00
Jonathan Turner
c816720242 Rollup merge of #36574 - japaric:link-arg, r=alexcrichton
rustc: implement -C link-arg

this flag lets you pass a _single_ argument to the linker but can be
used _repeatedly_. For example, instead of using:

```
rustc -C link-args='-l bar' (..)
```

you could write

```
rustc -C link-arg='-l' -C link-arg='bar' (..)
```

This new flag can be used with RUSTFLAGS where `-C link-args` has
problems with "nested" spaces:

```
RUSTFLAGS='-C link-args="-Tlayout.ld -nostartfiles"'
```

This passes three arguments to rustc: `-C` `link-args="-Tlayout.ld` and
`-nostartfiles"` to `rustc`. That's not what we meant. But this does
what we want:

```
RUSTFLAGS='-C link-arg=-Tlayout.ld -C link-arg=-nostartfiles`
```

cc rust-lang/rfcs#1509

r? @alexcrichton
cc @Zoxc

This needs a test. Any suggestion?
2016-09-26 17:29:47 -07:00
Jonathan Turner
e3ffde855a Rollup merge of #36563 - vanjacosic:patch-1, r=steveklabnik
Docs: Update to "Getting Started" section

I came across #34523 and wanted to suggest a solution. See commit for details.

It seemed like a good place to start contributing, let me know if I did anything wrong 😇
2016-09-26 17:29:47 -07:00
Jonathan Turner
c0f29fdd58 Update E0446 label with improved wording 2016-09-26 17:05:43 -07:00
Jonathan Turner
2fa91b23c5 Update E0425, E0446, E0449 2016-09-26 16:05:46 -07:00
bors
388c3f25f9 Auto merge of #36661 - jneem:master, r=nrc
Change error message for intrinsic signature.

Makes it so the signature of the intrinsic in the user's code is
"found," while the signature that rustc knows about is "expected."

Before this patch, the code
```
extern "platform-intrinsic" {
    fn x86_mm_movemask_ps() -> i32;
}
```
would give the error
```
error[E0444]: platform-specific intrinsic has invalid number of arguments: found 1, expected 0
 --> test.rs:4:5
  |
4 |     fn x86_mm_movemask_ps() -> i32;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error
```

After this patch, it says "found 0, expected 1".
2016-09-26 14:26:18 -07:00
Michael Woerister
1e5c253aa1 incr.comp.: Add test case for cache artifact file headers. 2016-09-26 17:14:31 -04:00
Michael Woerister
76f76ae1d8 incr.comp.: Add file header to on-disk artifacts for validation. 2016-09-26 16:05:01 -04:00
Andrew Lygin
157208b046 New error format for E0512 2016-09-26 22:49:22 +03:00
Tomasz Miąsko
c52b957b89 When getaddrinfo returns EAI_SYSTEM retrieve actual error from errno.
Fixes issue #36546. This change also updates libc to earliest version
that includes EAI_SYSTEM constant.
2016-09-26 21:25:59 +02:00
Vanja Cosic
0bd7ef0996 Remove whitespace from line endings 2016-09-26 20:55:59 +02:00
Guillaume Gomez
96a0f06b2f Update E0513 to new error format 2016-09-26 20:52:01 +02:00
Guillaume Gomez
1e4e81c320 Add compile-fail test for E0513 2016-09-26 20:52:01 +02:00
Guillaume Gomez
09a63c1571 Add E0513 error explanation 2016-09-26 20:51:56 +02:00
bors
8ccfc695b5 Auto merge of #36719 - shepmaster:build-env-var-reporting, r=alexcrichton
Report which required build-time environment variable is not set
2016-09-26 11:12:42 -07:00
Jake Goulding
e6e117c33a Extend preprocessor LLVM version checks to support LLVM 4.x
This doesn't actually do anything for LLVM 4.x yet, but sets the stage.
2016-09-26 13:40:29 -04:00
Joe Neeman
159aa0b902 Add a compile-fail test. 2016-09-26 18:48:35 +02:00
Tim Neumann
f0e1738e51 fix rebase fallout 2016-09-26 17:21:45 +02:00
bors
c2769285ad Auto merge of #36735 - srinivasreddy:typck/variance, r=nrc
run rustfmt on librustc_typeck/variance folder
2016-09-26 07:53:27 -07:00
bors
3bf4a7ad45 Auto merge of #36734 - nnethercote:fix-HashSet-sizing, r=Aatch
Don't allocate during default HashSet creation.

The following `HashMap` creation functions don't allocate heap storage for elements.
```
HashMap::new()
HashMap::default()
HashMap::with_hasher()
```
This is good, because it's surprisingly common to create a HashMap and never
use it. So that case should be cheap.

However, `HashSet` does not have the same behaviour. The corresponding creation
functions *do* allocate heap storage for the default number of non-zero
elements (which is 32 slots for 29 elements).
```
HashMap::new()
HashMap::default()
HashMap::with_hasher()
```
This commit gives `HashSet` the same behaviour as `HashMap`, by simply calling
the corresponding `HashMap` functions (something `HashSet` already does for
`with_capacity` and `with_capacity_and_hasher`). It also reformats one existing
`HashSet` construction to use a consistent single-line format.

This speeds up rustc itself by 1.01--1.04x on most of the non-tiny
rustc-benchmarks.
2016-09-26 04:38:18 -07:00
Jeffrey Seyfried
df0e4bf911 Move ensure_complete_parse into expand.rs. 2016-09-26 11:24:10 +00:00
bors
b786976a15 Auto merge of #36730 - jseyfried:make_macro_rules_invocations_magic, r=nrc
Forbid user-defined macros named "macro_rules"

This is a [breaking-change].
r? @nrc
2016-09-26 01:21:00 -07:00
Alexander von Gluck IV
7c34d9c144 Haiku: Use common thread set_name stub 2016-09-26 00:41:41 -05:00
Tim Neumann
cf1fc2ce13 appease tidy 2016-09-26 07:07:41 +02:00
Tim Neumann
0dc2a95f1e emit feature help in cheat mode 2016-09-26 07:07:41 +02:00
Tim Neumann
ad81f11b01 deduplicate inline is_nightly_build implementations 2016-09-26 07:07:41 +02:00
Tim Neumann
3f287efc82 refactor away get_unstable_features_setting 2016-09-26 07:07:41 +02:00
Tim Neumann
ba838dc4e9 make is_nightly_build a method on UnstableFeatures 2016-09-26 07:07:41 +02:00
Tim Neumann
6d09d8d7d9 add unstable_features to ParseSess 2016-09-26 07:07:41 +02:00
Tim Neumann
b0dba7439d make emit_feature_err take a ParseSess 2016-09-26 07:07:41 +02:00
bors
0a0215ddcd Auto merge of #36652 - giannicic:issue-36553, r=nrc
this commit corrects E0520 error text.
See referenced issue for further info

r? @nrc
2016-09-25 22:03:28 -07:00
Tim Neumann
51ea050457 reject macros with empty repetitions 2016-09-26 06:59:06 +02:00
Jeffrey Seyfried
34f4ad1b71 Add regression test. 2016-09-26 04:38:53 +00:00