Commit Graph

57613 Commits

Author SHA1 Message Date
Tim Neumann
3a276471f6 update mips64* data-layout 2016-09-28 08:06:49 +02:00
Tim Neumann
4053af9152 TypeIdHasher: hash usize as u64 2016-09-28 07:54:43 +02:00
Jorge Aparicio
45916ec686 fix compiletest 2016-09-27 23:03:29 -05:00
bors
755516bb96 Auto merge of #36776 - alexcrichton:rustc-macro-dep-files, r=nrc
rustc: Use a special filename for macros 1.1

This "special filename" is surrounded by `<>` to ensure that
`FileMap::is_real_file` returns `false`. This way the "files" parsed here aren't
emitted as dep info `.d` files and don't confuse Cargo about non-existent files.

Closes #36625
2016-09-27 20:21:12 -07:00
Nick Cameron
e8a4db25ac Allow supplying an error destination via the compiler driver
Allows replacing stderr with a buffer from the client.

Also, some refactoring around run_compiler.
2016-09-28 16:20:30 +13:00
Jorge Aparicio
cbb967f316 add a panic-strategy field to the target specification
Now a target can define its panic strategy in its specification. If a
user doesn't specify a panic strategy via the command line, i.e. '-C
panic', then the compiler will use the panic strategy defined by the
target specification.

Custom targets can pick their panic strategy via the "panic-strategy"
field of their target specification JSON file. If omitted in the
specification, the strategy defaults to "unwind".

closes #36647
2016-09-27 21:26:08 -05:00
Alex Burka
a84b55085e add wrapper for discriminant_value 2016-09-27 23:29:01 +00:00
Jeffrey Seyfried
28393be8df Add regression test. 2016-09-27 21:51:44 +00:00
bors
a059cb2f33 Auto merge of #36601 - jseyfried:build_reduced_graph_in_expansion, r=nrc
Assign def ids and build the module graph during expansion

r? @nrc
2016-09-27 14:11:07 -07:00
Paulo Matos
cb3b03c2a9 Improve documention troubleshooting missing linker. Fix #32208. 2016-09-27 16:45:36 -04:00
Jeffrey Seyfried
dd47815478 Avoid re-export errors in the generated test harness. 2016-09-27 20:23:59 +00:00
Jonathan Turner
5b6638ace0 Remove requirement to use 10.7 (fixes macOS) 2016-09-27 13:13:09 -07:00
Alex Crichton
e5e7021ca5 rustc: Tweak expansion order of custom derive
This commit alters the expansion order of custom macros-1.1 style `#[derive]`
modes. Instead of left-to-right the expansion now happens in three categories,
each of which is internally left-to-right:

* Old-style custom derive (`#[derive_Foo]`) is expanded
* New-style custom derive (macros 1.1) is expanded
* Built in derive modes are expanded

This gives built in derive modes maximal knowledge about the struct that's being
expanded and also avoids pesky issues like exposing `#[structural_match]` or
`#[rustc_copy_clone_marker]`.

cc #35900
2016-09-27 12:41:02 -07:00
Brian Anderson
22cb68e625 Bump version to 1.14 2016-09-27 12:22:06 -07:00
Alex Crichton
20a71b25c0 rustc: Use a special filename for macros 1.1
This "special filename" is surrounded by `<>` to ensure that
`FileMap::is_real_file` returns `false`. This way the "files" parsed here aren't
emitted as dep info `.d` files and don't confuse Cargo about non-existent files.

Closes #36625
2016-09-27 12:03:28 -07:00
bors
322b5530ba Auto merge of #36609 - brson:relnotes, r=alexcrichton
Add changelog for 1.12

[Rendered](https://github.com/brson/rust/blob/relnotes/RELEASES.md).
2016-09-27 10:45:10 -07:00
Brian Anderson
a6903e4e38 Add changelog for 1.12 2016-09-27 17:31:14 +00:00
Tomasz Miąsko
26f9949bf6 [std::io::Chain] Mark first as done only when reading into non-zero length buffer.
Fixes #36771.
2016-09-27 17:55:20 +02: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
Nathan Musoke
73e5a98e71 doc: Fix minor typo in book/variable-bindings.md 2016-09-27 23:20:50 +13:00
Frank Rehberger
f953d2564e Update set.rs 2016-09-27 10:32:21 +02:00
Frank Rehberger
81c47d591a Update map.rs 2016-09-27 10:31:25 +02:00
Jeffrey Seyfried
dfa69be38a Fix fallout in tests. 2016-09-27 06:43:51 +00:00
Jeffrey Seyfried
d854c362fe Fix def id collection for const_integers in the AST. 2016-09-27 06:43:51 +00:00
Jeffrey Seyfried
f34e49dd90 With --test, make #[test] functions pub in InvocationCollector
and expand the `__test_reexports` in the correct scope.
2016-09-27 06:43:49 +00:00
Jeffrey Seyfried
0613dac042 Avoid aborting after expansion from BuildReducedGraphVisitor errors. 2016-09-27 06:43:48 +00:00
Jeffrey Seyfried
634ecf038d Merge ModuleData and ModuleS. 2016-09-27 06:43:43 +00:00
Jeffrey Seyfried
b3a81ee844 Build the reduced graph during expansion. 2016-09-27 06:42:10 +00:00
Jeffrey Seyfried
ebaaafcd5d Peform def id assignment during expansion. 2016-09-27 06:42:09 +00: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
Corey Farwell
2ba02a773e Add basic doc example for core::ptr::write_bytes. 2016-09-26 23:11:47 -04:00
Peter N
c30eb31f9b Use "through" 2016-09-26 22:38:45 -04: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
Jonas Schievink
168a0795c6 Fix codegen test (value names changed) 2016-09-27 02:20:46 +02:00