Commit Graph

58521 Commits

Author SHA1 Message Date
Corey Farwell b37fd3d8c7 Rollup merge of #41571 - alexcrichton:fix-windows-mingw, r=brson
windows: Copy libwinpthread-1.dll into libdir bin

Recently we switched from the win32 MinGW toolchain to the pthreads-based
toolchain. We ship `gcc.exe` from this toolchain with the `rust-mingw` package
in the standard distribution but the pthreads version of `gcc.exe` depends on
`libwinpthread-1.dll`. While we're shipping this DLL for the compiler to depend
on we're not shipping it for gcc. As a workaround just copy the dll to gcc.exe
location and don't attempt to share for now.

cc https://github.com/rust-lang/rust/issues/31840#issuecomment-297478538
2017-04-28 00:29:36 -04:00
Corey Farwell 31c3c0c3ca Rollup merge of #41534 - achernyak:master, r=eddyb
query for describe_def

Resolves `fn describe_def(&self, def: DefId) -> Option<Def>;` of #41417.

r? @nikomatsakis I would greatly appreciate a review. I hope I covered everything described in the pr.
2017-04-28 00:29:35 -04:00
Alex Crichton 7bc2cbf5db travis: Parallelize tests on Android
Currently our slowest test suite on android, run-pass, takes over 5 times longer
than the x86_64 component (~400 -> ~2200s). Typically QEMU emulation does indeed
add overhead, but not 5x for this kind of workload. One of the slowest parts of
the Android process is that *compilation* happens serially. Tests themselves
need to run single-threaded on the emulator (due to how the test harness works)
and this forces the compiles themselves to be single threaded.

Now Travis gives us more than one core per machine, so it'd be much better if we
could take advantage of them! The emulator itself is still fundamentally
single-threaded, but we should see a nice speedup by sending binaries for it to
run much more quickly.

It turns out that we've already got all the tools to do this in-tree. The
qemu-test-{server,client} that are in use for the ARM Linux testing are a
perfect match for the Android emulator. This commit migrates the custom adb
management code in compiletest/rustbuild to the same qemu-test-{server,client}
implementation that ARM Linux uses.

This allows us to lift the parallelism restriction on the compiletest test
suites, namely run-pass. Consequently although we'll still basically run the
tests themselves in single threaded mode we'll be able to compile all of them in
parallel, keeping the pipeline much more full and using more cores for the work
at hand. Additionally the architecture here should be a bit speedier as it
should have less overhead than adb which is a whole new process on both the host
and the emulator!

Locally on an 8 core machine I've seen the run-pass test suite speed up from
taking nearly an hour to only taking 6 minutes. I don't think we'll see quite a
drastic speedup on Travis but I'm hoping this change can place the Android tests
well below 2 hours instead of just above 2 hours.

Because the client/server here are now repurposed for more than just QEMU,
they've been renamed to `remote-test-{server,client}`.

Note that this PR does not currently modify how debuginfo tests are executed on
Android. While parallelizable it wouldn't be quite as easy, so that's left to
another day. Thankfully that test suite is much smaller than the run-pass test
suite.

As a final fix I discovered that the ARM and Android test suites were actually
running all library unit tests (e.g. stdtest, coretest, etc) twice. I've
corrected that to only run tests once which should also give a nice boost in
overall cycle time here.
2017-04-27 20:20:13 -07:00
bors 70baf4f13e Auto merge of #41591 - frewsxcv:rollup, r=frewsxcv
Rollup of 7 pull requests

- Successful merges: #41438, #41523, #41526, #41546, #41556, #41572, #41578
- Failed merges:
2017-04-28 00:48:57 +00:00
Corey Farwell 1cd3d2f1c4 Rollup merge of #41578 - arielb1:missing-adjustment, r=eddyb
typeck: resolve type vars before calling `try_index_step`

`try_index_step` does not resolve type variables by itself and would
fail otherwise. Also harden the failure path in `confirm` to cause less
confusing errors.

r? @eddyb

Fixes #41498.

beta-nominating because regression (caused by #41279).
2017-04-27 19:59:18 -04:00
Corey Farwell 6fe2c24be0 Rollup merge of #41572 - frewsxcv:bump-mdbook, r=steveklabnik
Bump mdbook dep to pick up new 'create missing' toggle feature.

This will avoid obscure Travis CI error messages:

* https://github.com/rust-lang/rust/pull/40290#issuecomment-294137045

Original mdbook issue:

* https://github.com/azerupi/mdBook/issues/253

mdbook PR:

* https://github.com/azerupi/mdBook/pull/254
2017-04-27 19:59:17 -04:00
Corey Farwell f469c4a611 Rollup merge of #41556 - pftbest:fix_msp430_codegen, r=alexcrichton
LLVM: Update submodule to fix incorrect codegen on MSP430.

The bug was reported by @akovaski here:
https://github.com/rust-embedded/rfcs/issues/20#issuecomment-296482148

~~P.S. Looks like this patch will conflict with Hexagon changes.~~

r? @alexcrichton
2017-04-27 19:59:16 -04:00
Corey Farwell 095936c209 Rollup merge of #41526 - steveklabnik:gh35950, r=GuillaumeGomez
Clean up TcpStream example

Fixes #35950
2017-04-27 19:59:15 -04:00
Corey Farwell 9a9420e657 Rollup merge of #41523 - estebank:moved, r=arielb1
Point at variable moved by closure

Fix #41482, #31752.
2017-04-27 19:59:14 -04:00
Corey Farwell 35227db6e6 Rollup merge of #41438 - projektir:mpsc_docs, r=steveklabnik
Adding links and examples for various mspc pages #29377

Adding links and copying examples for the various Iterators; adding some extra stuff to `Sender`/`SyncSender`/`Receiver`.
2017-04-27 19:59:13 -04:00
bors a8ebd083fc Auto merge of #41529 - bitshifter:issue-41479, r=eddyb
Add missing OperandPair struct field index adjustments. Fixes #41479.

This is a bug fix for a regression in 6d841da4a0.
2017-04-27 21:54:07 +00:00
Cengiz Can 837817c053 use diff crate for compile-fail test diagnostics #41474 2017-04-27 22:41:18 +03:00
achernyak e24003fb3c query for describe_def 2017-04-27 13:27:16 -05:00
Ariel Ben-Yehuda 019a23ec85 don't ICE on cross-crate associated const type mismatch
Fixes #41549.
2017-04-27 20:06:48 +03:00
bors 94e884b630 Auto merge of #41447 - alexcrichton:sccache-everywhere, r=brson
appveyor: Use Ninja/sccache on MSVC

Now that the final bug fixes have been merged into sccache we can start
leveraging sccache on the MSVC builders on AppVeyor instead of relying on the
ad-hoc caching strategy of trigger files and whatnot.
2017-04-27 16:38:19 +00:00
Corey Farwell a517a96186 Bump mdbook dep to pick up new 'create missing' toggle feature.
This will avoid obscure Travis CI error messages:

* https://github.com/rust-lang/rust/pull/40290#issuecomment-294137045

Original mdbook issue:

* https://github.com/azerupi/mdBook/issues/253

mdbook PR:

* https://github.com/azerupi/mdBook/pull/254
2017-04-27 10:28:23 -04:00
Alex Crichton 2e72bcb934 appveyor: Use Ninja/sccache on MSVC
Now that the final bug fixes have been merged into sccache we can start
leveraging sccache on the MSVC builders on AppVeyor instead of relying on the
ad-hoc caching strategy of trigger files and whatnot.
2017-04-27 07:19:34 -07:00
Alex Crichton 499b84aca8 travis: Update sccache build used
This build is no longer a forked version with temporary bugfixes, everything
should be upstreamed!
2017-04-27 07:18:01 -07:00
Ariel Ben-Yehuda a260df27e0 typeck: resolve type vars before calling `try_index_step`
`try_index_step` does not resolve type variables by itself and would
fail otherwise. Also harden the failure path in `confirm` to cause less
confusing errors.
2017-04-27 16:44:27 +03:00
bors 4961d724f8 Auto merge of #41507 - arielb1:symbol-cache, r=nikomatsakis
cache symbol names in ty::maps

this fixes a performance regression introduced in commit 39a58c38a0.

r? @nikomatsakis
2017-04-27 13:17:55 +00:00
Marc-Antoine Perennou 7b1fb89641 rustbuild: install rustc after cargo and rls
This way its files take precedence (e.g. README.md and stuff)

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-04-27 15:05:29 +02:00
bors 79b05fee0f Auto merge of #41433 - estebank:constructor, r=michaelwoerister
Do not show `::{{constructor}}` on tuple struct diagnostics

Fix #41313.
2017-04-27 10:47:56 +00:00
Marc-Antoine Perennou 03c5797552 rustbuild: install cargo and rls when extended build is enabled
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-04-27 12:05:34 +02:00
Marc-Antoine Perennou a2bab1ddf5 rustbuild: add rls_package_vers
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-04-27 11:52:58 +02:00
Marc-Antoine Perennou c4c3b5a443 rustbuild: pass version number as param in install phase
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-04-27 11:52:58 +02:00
Marc-Antoine Perennou f5929037cc rustbuild: build cargo and rls as part of extended build
Build them directly in the `./x.py build` phase, don't wait for
`./x.py dist`

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-04-27 11:52:57 +02:00
Vadzim Dambrouski ec5588b4bc Update LLVM to fix incorrect codegen on MSP430.
The bug was reported by @akovaski here:
https://github.com/rust-embedded/rfcs/issues/20#issuecomment-296482148
2017-04-27 08:40:27 +03:00
projektir c59b188aae Adding links and examples for various mspc pages #29377 2017-04-26 23:11:57 -04:00
bors 54ef80043a Auto merge of #37860 - giannicic:defaultimpl, r=nagisa
#37653 support `default impl` for specialization

this commit implements the first step of the `default impl` feature:

> all items in a `default impl` are (implicitly) `default` and hence
> specializable.

In order to test this feature I've copied all the tests provided for the
`default` method implementation (in run-pass/specialization and
compile-fail/specialization directories) and moved the `default` keyword
from the item to the impl.
See [referenced](https://github.com/rust-lang/rust/issues/37653) issue for further info

r? @aturon
2017-04-27 02:48:17 +00:00
Alex Crichton 929124fa3c windows: Copy libwinpthread-1.dll into libdir bin
Recently we switched from the win32 MinGW toolchain to the pthreads-based
toolchain. We ship `gcc.exe` from this toolchain with the `rust-mingw` package
in the standard distribution but the pthreads version of `gcc.exe` depends on
`libwinpthread-1.dll`. While we're shipping this DLL for the compiler to depend
on we're not shipping it for gcc. As a workaround just copy the dll to gcc.exe
location and don't attempt to share for now.

cc https://github.com/rust-lang/rust/issues/31840#issuecomment-297478538
2017-04-26 18:35:01 -07:00
bors 6e0c5af9de Auto merge of #41567 - arielb1:rollup, r=arielb1
Rollup of 9 pull requests

- Successful merges: #41370, #41456, #41493, #41499, #41501, #41524, #41546, #41550, #41552
- Failed merges:
2017-04-27 00:04:03 +00:00
Ariel Ben-Yehuda 60837b1e8d Rollup merge of #41552 - jessicah:updated-num-cpus-dep, r=alexcrichton
Update num_cpus dependency to 1.x (1.4.0)
2017-04-26 22:11:10 +00:00
Ariel Ben-Yehuda f69c7770a9 Rollup merge of #41550 - wesleywiser:fix_33287, r=estebank
Add a regression test for ICE #33287

Fixes #33287
2017-04-26 22:11:09 +00:00
Ariel Ben-Yehuda 95c2f06162 Rollup merge of #41546 - cuviper:reduced-rust-src, r=alexcrichton
Shrink the rust-src component

Before this change, the installable rust-src component had essentially the same contents as the rustc-src dist tarball, just additionally wrapped in a rust-installer.  As discussed on [internals], rust-src is only meant to support uses for the standard library, so it doesn't really need the rest of the compiler sources.

Now rust-src only contains libstd and its path dependencies, which roughly matches the set of crates that have rust-analysis data.  The result is **significantly** smaller, from 36MB to 1.3MB compressed, and from 247MB to 8.5MB uncompressed.

[internals]: https://internals.rust-lang.org/t/minimizing-the-rust-src-component/5117
2017-04-26 22:11:08 +00:00
Ariel Ben-Yehuda c6ff8326ec Rollup merge of #41524 - michaelwu:basic-hexagon, r=alexcrichton
Add Hexagon support

This requires an updated LLVM with https://reviews.llvm.org/D31999 and https://reviews.llvm.org/D32000 to build libcore.

A basic hello world builds and runs successfully on the hexagon simulator. libcore is fine with LLVM fixes, but libstd requires a lot more work since there's a custom rtos running on most hexagon cores. Running Linux sounds possible though, so maybe getting linux + musl going would be easier.

Here's the target file I've been using for testing
```
{
    "arch": "hexagon",
    "llvm-target": "hexagon-unknown-elf",
    "os": "none",
    "target-endian": "little",
    "target-pointer-width": "32",

    "data-layout": "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048",
    "linker": "hexagon-clang",
    "linker-flavor": "gcc",
    "executables": true,
    "cpu": "hexagonv60"
}
```
2017-04-26 22:11:07 +00:00
Ariel Ben-Yehuda ccc790f9e6 Rollup merge of #41501 - GuillaumeGomez:invalid_module_location, r=jseyfried
Invalid module location

Fixes #38110.

r? @jseyfried
2017-04-26 22:11:06 +00:00
Ariel Ben-Yehuda 84f6e017d6 Rollup merge of #41499 - steveklabnik:gh25164, r=alexcrichton
Address platform-specific behavior in TcpStream::shutdown

Fixes #25164

r? @rust-lang/libs from the GitHub thread, it seems like documenting this behavior is okay, but I want to make sure that's what you want.
2017-04-26 22:11:05 +00:00
Ariel Ben-Yehuda 25834dcb9b Rollup merge of #41493 - scottmcm:fix-step-replace, r=sfackler
Step::replace_one should put a one, not a zero (Issue #41492)

Turns out all six of the replace_* impls were backwards.
2017-04-26 22:11:04 +00:00
Ariel Ben-Yehuda 639000ea2e Rollup merge of #41456 - jessicah:haiku-support, r=alexcrichton
Haiku: fix initial platform support
2017-04-26 22:11:03 +00:00
Ariel Ben-Yehuda a3dde0b457 Rollup merge of #41370 - malbarbo:android-bootstrap, r=alexcrichton
Add bootstrap support for android
2017-04-26 22:11:02 +00:00
Aidan Hobson Sayers 367e90775b Make sure openssl compiles with only one core
Fixes #40417
2017-04-26 21:21:27 +01:00
Josh Stone c5cd4cb51e Add a distcheck for rust-src completeness 2017-04-26 12:37:12 -07:00
Michael Wu 22eb3c69b9 Enable building the LLVM Hexagon target 2017-04-26 12:00:16 -04:00
Ariel Ben-Yehuda 07b16cb508 don't allocate in get_symbol_hash 2017-04-26 17:45:02 +03:00
Ariel Ben-Yehuda 9aac5fc0f3 refactor away trans::symbol_map 2017-04-26 17:45:02 +03:00
Ariel Ben-Yehuda a517343566 cache symbol names in ty::maps
this fixes a performance regression introduced in commit
39a58c38a0.
2017-04-26 17:45:02 +03:00
Gianni Ciccarelli b48eb5e0be support `default impl` for specialization
`[default] [unsafe] impl` and typecheck
2017-04-26 14:43:09 +00:00
Michael Woerister ab9691d5b7 Add some documentation for -Zremap-path-prefix to the unstable book 2017-04-26 16:13:16 +02:00
Michael Woerister 5c62ce4a82 Make codegen test for remap-path-prefix more thorough. 2017-04-26 15:44:02 +02:00
Michael Woerister eb6308fc34 remap-path-prefix: Validate number of commandline arguments passed. 2017-04-26 15:44:02 +02:00
Michael Woerister 39ffea31df Implement a file-path remapping feature in support of debuginfo and reproducible builds. 2017-04-26 15:44:02 +02:00
bors 0ee56f686d Auto merge of #41352 - kennytm:macos-sanitizers, r=alexcrichton
Support AddressSanitizer and ThreadSanitizer on x86_64-apple-darwin

[ASan](https://clang.llvm.org/docs/AddressSanitizer.html#supported-platforms) and [TSan](https://clang.llvm.org/docs/ThreadSanitizer.html#supported-platforms) are supported on macOS, and this commit enables their support.

The sanitizers are always built as `*.dylib` on Apple platforms, so they cannot be statically linked into the corresponding `rustc_?san.rlib`. The dylibs are directly copied to `lib/rustlib/x86_64-apple-darwin/lib/` instead.

Note, although Xcode also ships with their own copies of ASan/TSan dylibs, we cannot use them due to version mismatch.

----

~~There is a caveat: the sanitizer libraries are linked as `@rpath/` (due to https://reviews.llvm.org/D6018), so the user needs to additionally pass `-C rpath`:~~

**Edit:** Passing rpath is now automatic.
2017-04-26 12:34:45 +00:00
bors b0a4074c5e Auto merge of #41504 - eddyb:query-api, r=nikomatsakis
Improve the librustc on-demand/query API ergonomics.

Queries are now performed through these two forms:
* `tcx.type_of(def_id)` (the most common usage)
* `tcx.at(span).type_of(def_id)` (to provide a more specific location in the cycle stack)

Several queries were renamed to work better as method names, i.e. by suffixing with `_of`.

r? @nikomatsakis
2017-04-26 09:54:11 +00:00
steveklabnik 29e6656859 Address platform-specific behavior in TcpStream::shutdown
Fixes #25164
2017-04-26 05:30:35 -04:00
steveklabnik 7b7fe9b5c1 Clean up TcpStream example
Fixes #35950
2017-04-26 05:27:03 -04:00
bors dad9814eb0 Auto merge of #41258 - clarcharr:str_box_extras, r=Kimundi
More methods for str boxes. (reduce Box<[u8]> ↔ Box<str> transmutes)

This is a follow-up to #41096 that adds safer methods for converting between `Box<str>` and `Box<[u8]>`. They're gated under a different feature from the `&mut str` methods because they may be too niche to include in public APIs, although having them internally helps reduce the number of transmutes the standard library uses.

What's added:

* `From<Box<str>> for Box<[u8]>`
* `<Box<str>>::into_boxed_bytes` (just calls `Into::into`)
* `alloc::str` (new module)
* `from_boxed_utf8` and `from_boxed_utf8_unchecked`, defined in `alloc:str`, exported in `collections::str`
* exports `from_utf8_mut` in `collections::str` (missed from previous PR)
2017-04-26 06:18:17 +00:00
Michael Wu 27b00ec752 Cherry pick LLVM hexagon fixes 2017-04-26 02:11:49 -04:00
Esteban Küber 1ca1483113 Point at variable moved by closure 2017-04-25 22:03:05 -07:00
Jessica Hamilton 85c2ff1c46 Update num_cpus dependency to 1.x (1.4.0) 2017-04-26 15:25:03 +12:00
Corey Farwell 1fd8ba9088 Rollup merge of #41535 - steveklabnik:gh37746, r=alexcrichton
Fix up vec guarnatee around capacity

Fixes #37746

r? @rust-lang/libs
2017-04-25 23:06:01 -04:00
Corey Farwell e2a04678da Rollup merge of #41530 - GuillaumeGomez:vec-from, r=aturon
Implement From<&mut [T]> for Vec

Fixes #41386.
2017-04-25 23:06:00 -04:00
Corey Farwell 9ae413c386 Rollup merge of #41528 - steveklabnik:gh33269, r=frewsxcv
Clarify "side effect" in peek's docs

Fixes #33269

/cc @tshepang
2017-04-25 23:05:59 -04:00
Corey Farwell e7f1c4fd14 Rollup merge of #41527 - steveklabnik:gh41285, r=frewsxcv
Clarify the doc index

With regards to the unstable book, the reference, and the
processes involved.

Also, fix up a link by pointing to the new tracking issue rather than
the older one.

Fixes #41285

r? @frewsxcv
2017-04-25 23:05:58 -04:00
Corey Farwell 997593f16c Rollup merge of #41518 - tbu-:pr_fix_cp_error, r=sfackler
Fix a copy-paste error in `Instant::sub_duration`

Fixes #41514.
2017-04-25 23:05:58 -04:00
Corey Farwell 41933c315c Rollup merge of #41500 - steveklabnik:gh37866, r=frewsxcv
use the word 'length' in Vec::len's docs

Fixes #37866
2017-04-25 23:05:57 -04:00
Corey Farwell 5f62b2716f Rollup merge of #41463 - SergioBenitez:master, r=alexcrichton
Add internal accessor methods to io::{Chain, Take}.

Resolves #29067.
2017-04-25 23:05:56 -04:00
Corey Farwell 2a320c32ed Rollup merge of #41442 - tbu-:pr_writeall_interrupted, r=aturon
Specify behavior of `write_all` for `ErrorKind::Interrupted` errors

Also spell out that read and write operations should be retried on
`ErrorKind::Interrupted` errors.

Fixes #38494.
2017-04-25 23:05:55 -04:00
Corey Farwell 27fbe8cbca Rollup merge of #39983 - AndrewGaspar:rust-windbg, r=brson
Adds rust-windbg.cmd script

Adds rust-gdb/rust-lldb equivalent for windbg that loads the Rust .natvis files on start.

This change modifies the bootstrap code to add rust-windbg to bin and the .natvis files to lib/rustlib/etc.

Example usage from cmd or PowerShell:
```
rust-windbg -c "bu rs_f442289d74765418!rs::main;g" target\debug\rs.exe
```
2017-04-25 23:05:54 -04:00
Michael Wu 32aeb22f54 Avoid the hexagon backend on old versions of LLVM 2017-04-25 22:59:31 -04:00
Wesley Wiser 9f96d0a7b8 Add a regression test for ICE #33287
Fixes #33287
2017-04-25 22:57:04 -04:00
Josh Stone b9bdb1766d Reduce the contents of the rust-src component 2017-04-25 16:13:46 -07:00
Josh Stone 7248f67f1b Build the rustc-src tarball before the rust-src component 2017-04-25 16:13:45 -07:00
Vadim Petrochenkov d349e87d61 Parse trait object types starting with a lifetime bound 2017-04-25 23:58:05 +03:00
Vadim Petrochenkov 4bd417e438 Fix object safety violations in the test 2017-04-25 22:38:39 +03:00
Vadim Petrochenkov 1883b8d715 privacy: Rename and cleanup PrivacyVisitor 2017-04-25 22:38:39 +03:00
Vadim Petrochenkov 82e030322b Check privacy of trait items in all contexts 2017-04-25 22:38:39 +03:00
bors 2b4c911581 Auto merge of #41362 - alexcrichton:run-cargot-ests, r=aturon
Run tests for the cargo submodule in tree

Previously the `cargotest` suite would run some arbitrary revision of Cargo's
test suite, but now that we're bundling it in tree we should be running the
Cargo submodule's test suite instead.
2017-04-25 15:51:40 +00:00
steveklabnik 19b7272dbc Fix up vec guarnatee around capacity
Fixes #37746
2017-04-25 10:41:17 -04:00
Cameron Hart a510e1df76 Added test for #41479 from @eddyb. 2017-04-25 21:18:30 +10:00
Guillaume Gomez e70a266b3b Implement From<&mut [T]> for Vec 2017-04-25 12:34:45 +02:00
kennytm 164fd696bf
Do not check if libclang_rt.?san_*_dynamic.dylib is an unstable crate.
These are not even crates...
2017-04-25 18:34:21 +08:00
bors c7e724a148 Auto merge of #40434 - mattico:splice-update, r=alexcrichton
Implement Vec::splice and String::splice (RFC 1432)

RFC: rust-lang/rfcs#1432, tracking issue: #32310
A rebase of https://github.com/rust-lang/rust/pull/32355 with a few more tests.

Let me know if you have any ideas for more tests.

cc @SimonSapin
2017-04-25 10:34:07 +00:00
Cameron Hart 72acea0e80 Add missing struct field index adjustments.
Some accesses in OperandPairs were missing. Fixes #41479.
2017-04-25 20:27:29 +10:00
Guillaume Gomez 3f97b2a65c Add ui tests 2017-04-25 12:21:28 +02:00
steveklabnik 696df71d0c Clarify "side effect" in peek's docs
Fixes #33269
2017-04-25 05:38:26 -04:00
steveklabnik dce33e96bc Clarify the doc index
With regards to the unstable book, the reference, and the
processes involved.

Also, fix up a link by pointing to the new tracking issue rather than
the older one.

Fixes #41285
2017-04-25 05:35:51 -04:00
Michael Wu c558a2ae37 Add Hexagon support
This requires an updated LLVM with D31999 and D32000 to build libcore.

A basic hello world builds and runs successfully on the hexagon simulator.
2017-04-25 01:56:44 -04:00
Gianni Ciccarelli 715811d0be support `default impl` for specialization
pr review
2017-04-25 05:28:22 +00:00
kennytm 86747a9952
Force link with an absolute rpath when using sanitizer on macOS. 2017-04-25 10:31:01 +08:00
kennytm 00dff0aa59
Support AddressSanitizer and ThreadSanitizer on x86_64-apple-darwin.
ASan and TSan are supported on macOS, and this commit enables their
support.

The sanitizers are always built as *.dylib on Apple platforms, so they
cannot be statically linked into the corresponding `rustc_?san.rlib`. The
dylibs are directly copied to `lib/rustlib/x86_64-apple-darwin/lib/`
instead.

Note, although Xcode also ships with their own copies of ASan/TSan dylibs,
we cannot use them due to version mismatch.

There is a caveat: the sanitizer libraries are linked as @rpath, so the
user needs to additionally pass `-C rpath`:

    rustc -Z sanitizer=address -C rpath file.rs
                               ^~~~~~~~

Otherwise there will be a runtime error:

    dyld: Library not loaded: @rpath/libclang_rt.asan_osx_dynamic.dylib
      Referenced from: /path/to/executable
      Reason: image not found
    Abort trap: 6

The next commit includes a temporary change in compiler to force the linker
to emit a usable @rpath.
2017-04-25 10:31:01 +08:00
kennytm 93d57d64b8
Pass `--format-version 1` to `cargo metadata`.
Suppress warning introduced by rust-lang/cargo#3841.
2017-04-25 10:31:00 +08:00
Sergio Benitez c168d8bb07 Add cautions to io::get_mut method documentation. 2017-04-24 17:12:42 -07:00
Sergio Benitez 76397aea50 Reference tracking issue for more_io_inner_methods. 2017-04-24 17:12:38 -07:00
Sergio Benitez aab87e3e9e Add more_io_inner_methods feature to unstable book. 2017-04-24 16:36:50 -07:00
Sergio Benitez a765dcaf53 Add internal accessor methods to io::{Chain, Take}.
Resolves #29067.
2017-04-24 16:36:50 -07:00
Andrew Gaspar 70e673952e Adds rust-windbg.cmd script 2017-04-24 16:26:00 -07:00
Tobias Bucher 957d51aecb Fix a copy-paste error in `Instant::sub_duration`
Fixes #41514.
2017-04-25 01:02:59 +02:00
bors 0777c757a6 Auto merge of #40123 - TimNN:llvm40, r=alexcrichton
LLVM 4.0 Upgrade

Since nobody has done this yet, I decided to get things started:

**Todo:**

* [x] push the relevant commits to `rust-lang/llvm` and `rust-lang/compiler-rt`
* [x] cleanup `.gitmodules`
* [x] Verify if there are any other commits from `rust-lang/llvm` which need backporting
* [x] Investigate / fix debuginfo ("`<optimized out>`") failures
* [x] Use correct emscripten version in docker image

---

Closes #37609.

---

**Test results:**

Everything is green 🎉
2017-04-24 22:18:16 +00:00
Clar Charr c66c6e9697 More methods for str boxes. 2017-04-24 17:51:49 -04:00
Alex Crichton 009f45f8f1 Run tests for the cargo submodule in tree
Previously the `cargotest` suite would run some arbitrary revision of Cargo's
test suite, but now that we're bundling it in tree we should be running the
Cargo submodule's test suite instead.
2017-04-24 08:08:40 -07:00