]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoRollup merge of #41534 - achernyak:master, r=eddyb
Corey Farwell [Fri, 28 Apr 2017 04:29:35 +0000 (00:29 -0400)]
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.

7 years agoAuto merge of #41591 - frewsxcv:rollup, r=frewsxcv
bors [Fri, 28 Apr 2017 00:48:57 +0000 (00:48 +0000)]
Auto merge of #41591 - frewsxcv:rollup, r=frewsxcv

Rollup of 7 pull requests

- Successful merges: #41438, #41523, #41526, #41546, #41556, #41572, #41578
- Failed merges:

7 years agoRollup merge of #41578 - arielb1:missing-adjustment, r=eddyb
Corey Farwell [Thu, 27 Apr 2017 23:59:18 +0000 (19:59 -0400)]
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).

7 years agoRollup merge of #41572 - frewsxcv:bump-mdbook, r=steveklabnik
Corey Farwell [Thu, 27 Apr 2017 23:59:17 +0000 (19:59 -0400)]
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

7 years agoRollup merge of #41556 - pftbest:fix_msp430_codegen, r=alexcrichton
Corey Farwell [Thu, 27 Apr 2017 23:59:16 +0000 (19:59 -0400)]
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

7 years agoRollup merge of #41526 - steveklabnik:gh35950, r=GuillaumeGomez
Corey Farwell [Thu, 27 Apr 2017 23:59:15 +0000 (19:59 -0400)]
Rollup merge of #41526 - steveklabnik:gh35950, r=GuillaumeGomez

Clean up TcpStream example

Fixes #35950

7 years agoRollup merge of #41523 - estebank:moved, r=arielb1
Corey Farwell [Thu, 27 Apr 2017 23:59:14 +0000 (19:59 -0400)]
Rollup merge of #41523 - estebank:moved, r=arielb1

Point at variable moved by closure

Fix #41482, #31752.

7 years agoRollup merge of #41438 - projektir:mpsc_docs, r=steveklabnik
Corey Farwell [Thu, 27 Apr 2017 23:59:13 +0000 (19:59 -0400)]
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`.

7 years agoAuto merge of #41529 - bitshifter:issue-41479, r=eddyb
bors [Thu, 27 Apr 2017 21:54:07 +0000 (21:54 +0000)]
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 https://github.com/rust-lang/rust/commit/6d841da4a0d7629f826117f99052e3d4a7997a7e.

7 years agoquery for describe_def
achernyak [Thu, 27 Apr 2017 18:27:16 +0000 (13:27 -0500)]
query for describe_def

7 years agoAuto merge of #41447 - alexcrichton:sccache-everywhere, r=brson
bors [Thu, 27 Apr 2017 16:38:19 +0000 (16:38 +0000)]
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.

7 years agoBump mdbook dep to pick up new 'create missing' toggle feature.
Corey Farwell [Thu, 27 Apr 2017 02:04:04 +0000 (22:04 -0400)]
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

7 years agoappveyor: Use Ninja/sccache on MSVC
Alex Crichton [Sat, 25 Feb 2017 17:53:46 +0000 (09:53 -0800)]
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.

7 years agotravis: Update sccache build used
Alex Crichton [Wed, 19 Apr 2017 15:58:27 +0000 (08:58 -0700)]
travis: Update sccache build used

This build is no longer a forked version with temporary bugfixes, everything
should be upstreamed!

7 years agotypeck: resolve type vars before calling `try_index_step`
Ariel Ben-Yehuda [Thu, 27 Apr 2017 13:40:49 +0000 (16:40 +0300)]
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.

7 years agoAuto merge of #41507 - arielb1:symbol-cache, r=nikomatsakis
bors [Thu, 27 Apr 2017 13:17:55 +0000 (13:17 +0000)]
Auto merge of #41507 - arielb1:symbol-cache, r=nikomatsakis

cache symbol names in ty::maps

this fixes a performance regression introduced in commit 39a58c38a0b9ac9e822a1732f073abe8ddf65cfb.

r? @nikomatsakis

7 years agoAuto merge of #41433 - estebank:constructor, r=michaelwoerister
bors [Thu, 27 Apr 2017 10:47:56 +0000 (10:47 +0000)]
Auto merge of #41433 - estebank:constructor, r=michaelwoerister

Do not show `::{{constructor}}` on tuple struct diagnostics

Fix #41313.

7 years agoUpdate LLVM to fix incorrect codegen on MSP430.
Vadzim Dambrouski [Wed, 26 Apr 2017 14:04:25 +0000 (17:04 +0300)]
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

7 years agoAdding links and examples for various mspc pages #29377
projektir [Fri, 21 Apr 2017 03:53:38 +0000 (23:53 -0400)]
Adding links and examples for various mspc pages #29377

7 years agoAuto merge of #37860 - giannicic:defaultimpl, r=nagisa
bors [Thu, 27 Apr 2017 02:48:17 +0000 (02:48 +0000)]
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

7 years agoAuto merge of #41567 - arielb1:rollup, r=arielb1
bors [Thu, 27 Apr 2017 00:04:03 +0000 (00:04 +0000)]
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:

7 years agoRollup merge of #41552 - jessicah:updated-num-cpus-dep, r=alexcrichton
Ariel Ben-Yehuda [Wed, 26 Apr 2017 22:11:10 +0000 (22:11 +0000)]
Rollup merge of #41552 - jessicah:updated-num-cpus-dep, r=alexcrichton

Update num_cpus dependency to 1.x (1.4.0)

7 years agoRollup merge of #41550 - wesleywiser:fix_33287, r=estebank
Ariel Ben-Yehuda [Wed, 26 Apr 2017 22:11:09 +0000 (22:11 +0000)]
Rollup merge of #41550 - wesleywiser:fix_33287, r=estebank

Add a regression test for ICE #33287

Fixes #33287

7 years agoRollup merge of #41546 - cuviper:reduced-rust-src, r=alexcrichton
Ariel Ben-Yehuda [Wed, 26 Apr 2017 22:11:08 +0000 (22:11 +0000)]
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

7 years agoRollup merge of #41524 - michaelwu:basic-hexagon, r=alexcrichton
Ariel Ben-Yehuda [Wed, 26 Apr 2017 22:11:07 +0000 (22:11 +0000)]
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"
}
```

7 years agoRollup merge of #41501 - GuillaumeGomez:invalid_module_location, r=jseyfried
Ariel Ben-Yehuda [Wed, 26 Apr 2017 22:11:06 +0000 (22:11 +0000)]
Rollup merge of #41501 - GuillaumeGomez:invalid_module_location, r=jseyfried

Invalid module location

Fixes #38110.

r? @jseyfried

7 years agoRollup merge of #41499 - steveklabnik:gh25164, r=alexcrichton
Ariel Ben-Yehuda [Wed, 26 Apr 2017 22:11:05 +0000 (22:11 +0000)]
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.

7 years agoRollup merge of #41493 - scottmcm:fix-step-replace, r=sfackler
Ariel Ben-Yehuda [Wed, 26 Apr 2017 22:11:04 +0000 (22:11 +0000)]
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.

7 years agoRollup merge of #41456 - jessicah:haiku-support, r=alexcrichton
Ariel Ben-Yehuda [Wed, 26 Apr 2017 22:11:03 +0000 (22:11 +0000)]
Rollup merge of #41456 - jessicah:haiku-support, r=alexcrichton

Haiku: fix initial platform support

7 years agoRollup merge of #41370 - malbarbo:android-bootstrap, r=alexcrichton
Ariel Ben-Yehuda [Wed, 26 Apr 2017 22:11:02 +0000 (22:11 +0000)]
Rollup merge of #41370 - malbarbo:android-bootstrap, r=alexcrichton

Add bootstrap support for android

7 years agoAuto merge of #41563 - aidanhs:aphs-fix-spurious-osx-openssl-failure, r=alexcrichton
bors [Wed, 26 Apr 2017 21:26:14 +0000 (21:26 +0000)]
Auto merge of #41563 - aidanhs:aphs-fix-spurious-osx-openssl-failure, r=alexcrichton

Make sure openssl compiles with only one core

This is (hopefully) a fix for the osx openssl spurious failure - #40417.

The intermittent failures and failing in different ways made me think of a race condition. But programs are parallel make safe right? [Not openssl](https://github.com/openssl/openssl/issues/298). But we don't do a parallel make on openssl [do we](https://github.com/rust-lang/rust/blob/8c4f2c64c6759a82f143e23964a46a65c67509c9/src/bootstrap/native.rs#L309)? This confused me, except "Waiting for unfinished jobs" is present in the logs...which is evidence of a parallel make!

It turns out that when we invoke to top level target [in run.sh](https://github.com/rust-lang/rust/blob/036983201d4e9aeb5c5e56e47c305971972b2569/src/ci/run.sh#L75-L77), make will [pass the flags downwards](https://www.gnu.org/software/make/manual/html_node/Options_002fRecursion.html) in order to take advantage of parallelism in sub-makes. Of course, we don't want this in openssl! Override this by explicitly disabling parallelism on the command line.

I don't know why this hasn't happened on anything except OSX. Maybe Linux binutils check if the file is in use?

r? @alexcrichton

7 years agoMake sure openssl compiles with only one core
Aidan Hobson Sayers [Wed, 26 Apr 2017 20:21:27 +0000 (21:21 +0100)]
Make sure openssl compiles with only one core

Fixes #40417

7 years agoEnable building the LLVM Hexagon target
Michael Wu [Tue, 18 Apr 2017 20:23:47 +0000 (16:23 -0400)]
Enable building the LLVM Hexagon target

7 years agoAuto merge of #41420 - alexcrichton:mingw-6.3.0, r=petrochenkov
bors [Wed, 26 Apr 2017 15:12:30 +0000 (15:12 +0000)]
Auto merge of #41420 - alexcrichton:mingw-6.3.0, r=petrochenkov

appveyor: Upgrade to gcc for mingw 6.3.0

This commit sort of brings back #40777 by upgrading back to 6.3.0. While
investigating #40546 it was discovered that 6.3.0 appears to not spurious
fail in the same way that 6.2.0 does (which we're currently using). The
workaround for #40184 contained in #40777 did not work so this commit also
contains a different workaround for the gdb issue. We will not download the
6.2.0 version of gdb and use that instead of the default version that comes with
6.3.0.

I'm going to optimistically say...

Closes #40546

7 years agodon't allocate in get_symbol_hash
Ariel Ben-Yehuda [Mon, 24 Apr 2017 17:32:11 +0000 (20:32 +0300)]
don't allocate in get_symbol_hash

7 years agorefactor away trans::symbol_map
Ariel Ben-Yehuda [Mon, 24 Apr 2017 17:27:59 +0000 (20:27 +0300)]
refactor away trans::symbol_map

7 years agocache symbol names in ty::maps
Ariel Ben-Yehuda [Mon, 24 Apr 2017 16:35:47 +0000 (19:35 +0300)]
cache symbol names in ty::maps

this fixes a performance regression introduced in commit
39a58c38a0b9ac9e822a1732f073abe8ddf65cfb.

7 years ago support `default impl` for specialization
Gianni Ciccarelli [Wed, 26 Apr 2017 03:17:48 +0000 (03:17 +0000)]
support `default impl` for specialization

    `[default] [unsafe] impl` and typecheck

7 years agoappveyor: Upgrade to gcc for mingw 6.3.0
Alex Crichton [Thu, 20 Apr 2017 15:35:03 +0000 (08:35 -0700)]
appveyor: Upgrade to gcc for mingw 6.3.0

This commit sort of brings back #40777 by upgrading back to 6.3.0. While
investigating #40546 it was discovered that 6.3.0 appears to not spurious
fail in the same way that 6.2.0 does (which we're currently using). The
workaround for #40184 contained in #40777 did not work so this commit also
contains a different workaround for the gdb issue. We will not download the
6.2.0 version of gdb and use that instead of the default version that comes with
6.3.0.

I'm going to optimistically say...

Closes #40546

7 years agoAuto merge of #41352 - kennytm:macos-sanitizers, r=alexcrichton
bors [Wed, 26 Apr 2017 12:34:45 +0000 (12:34 +0000)]
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.

7 years agoAuto merge of #41504 - eddyb:query-api, r=nikomatsakis
bors [Wed, 26 Apr 2017 09:54:11 +0000 (09:54 +0000)]
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

7 years agoAddress platform-specific behavior in TcpStream::shutdown
steveklabnik [Mon, 24 Apr 2017 11:20:16 +0000 (07:20 -0400)]
Address platform-specific behavior in TcpStream::shutdown

Fixes #25164

7 years agoClean up TcpStream example
steveklabnik [Tue, 25 Apr 2017 08:10:06 +0000 (04:10 -0400)]
Clean up TcpStream example

Fixes #35950

7 years agoAuto merge of #41258 - clarcharr:str_box_extras, r=Kimundi
bors [Wed, 26 Apr 2017 06:18:17 +0000 (06:18 +0000)]
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)

7 years agoCherry pick LLVM hexagon fixes
Michael Wu [Tue, 25 Apr 2017 22:50:41 +0000 (18:50 -0400)]
Cherry pick LLVM hexagon fixes

7 years agoPoint at variable moved by closure
Esteban Küber [Tue, 25 Apr 2017 03:25:30 +0000 (20:25 -0700)]
Point at variable moved by closure

7 years agoAuto merge of #41551 - frewsxcv:rollup, r=frewsxcv
bors [Wed, 26 Apr 2017 03:26:12 +0000 (03:26 +0000)]
Auto merge of #41551 - frewsxcv:rollup, r=frewsxcv

Rollup of 9 pull requests

- Successful merges: #39983, #41442, #41463, #41500, #41518, #41527, #41528, #41530, #41535
- Failed merges:

7 years agoUpdate num_cpus dependency to 1.x (1.4.0)
Jessica Hamilton [Wed, 26 Apr 2017 03:20:09 +0000 (15:20 +1200)]
Update num_cpus dependency to 1.x (1.4.0)

7 years agoRollup merge of #41535 - steveklabnik:gh37746, r=alexcrichton
Corey Farwell [Wed, 26 Apr 2017 03:06:01 +0000 (23:06 -0400)]
Rollup merge of #41535 - steveklabnik:gh37746, r=alexcrichton

Fix up vec guarnatee around capacity

Fixes #37746

r? @rust-lang/libs

7 years agoRollup merge of #41530 - GuillaumeGomez:vec-from, r=aturon
Corey Farwell [Wed, 26 Apr 2017 03:06:00 +0000 (23:06 -0400)]
Rollup merge of #41530 - GuillaumeGomez:vec-from, r=aturon

Implement From<&mut [T]> for Vec

Fixes #41386.

7 years agoRollup merge of #41528 - steveklabnik:gh33269, r=frewsxcv
Corey Farwell [Wed, 26 Apr 2017 03:05:59 +0000 (23:05 -0400)]
Rollup merge of #41528 - steveklabnik:gh33269, r=frewsxcv

Clarify "side effect" in peek's docs

Fixes #33269

/cc @tshepang

7 years agoRollup merge of #41527 - steveklabnik:gh41285, r=frewsxcv
Corey Farwell [Wed, 26 Apr 2017 03:05:58 +0000 (23:05 -0400)]
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

7 years agoRollup merge of #41518 - tbu-:pr_fix_cp_error, r=sfackler
Corey Farwell [Wed, 26 Apr 2017 03:05:58 +0000 (23:05 -0400)]
Rollup merge of #41518 - tbu-:pr_fix_cp_error, r=sfackler

Fix a copy-paste error in `Instant::sub_duration`

Fixes #41514.

7 years agoRollup merge of #41500 - steveklabnik:gh37866, r=frewsxcv
Corey Farwell [Wed, 26 Apr 2017 03:05:57 +0000 (23:05 -0400)]
Rollup merge of #41500 - steveklabnik:gh37866, r=frewsxcv

use the word 'length' in Vec::len's docs

Fixes #37866

7 years agoRollup merge of #41463 - SergioBenitez:master, r=alexcrichton
Corey Farwell [Wed, 26 Apr 2017 03:05:56 +0000 (23:05 -0400)]
Rollup merge of #41463 - SergioBenitez:master, r=alexcrichton

Add internal accessor methods to io::{Chain, Take}.

Resolves #29067.

7 years agoRollup merge of #41442 - tbu-:pr_writeall_interrupted, r=aturon
Corey Farwell [Wed, 26 Apr 2017 03:05:55 +0000 (23:05 -0400)]
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.

7 years agoRollup merge of #39983 - AndrewGaspar:rust-windbg, r=brson
Corey Farwell [Wed, 26 Apr 2017 03:05:54 +0000 (23:05 -0400)]
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
```

7 years agoAvoid the hexagon backend on old versions of LLVM
Michael Wu [Tue, 25 Apr 2017 22:08:13 +0000 (18:08 -0400)]
Avoid the hexagon backend on old versions of LLVM

7 years agoAdd a regression test for ICE #33287
Wesley Wiser [Wed, 26 Apr 2017 02:55:58 +0000 (22:55 -0400)]
Add a regression test for ICE #33287

Fixes #33287

7 years agoAuto merge of #41332 - petrochenkov:privti, r=eddyb
bors [Tue, 25 Apr 2017 23:46:37 +0000 (23:46 +0000)]
Auto merge of #41332 - petrochenkov:privti, r=eddyb

Check privacy of trait items in all contexts

Fixes https://github.com/rust-lang/rust/issues/28514

This is a sufficiently rare scenario and it's currently guarded by `private_in_public` lint, so it shouldn't be a [breaking-change] in practice.

7 years agoReduce the contents of the rust-src component
Josh Stone [Tue, 25 Apr 2017 22:58:07 +0000 (15:58 -0700)]
Reduce the contents of the rust-src component

7 years agoBuild the rustc-src tarball before the rust-src component
Josh Stone [Tue, 25 Apr 2017 22:34:31 +0000 (15:34 -0700)]
Build the rustc-src tarball before the rust-src component

7 years agoFix object safety violations in the test
Vadim Petrochenkov [Tue, 25 Apr 2017 19:38:21 +0000 (22:38 +0300)]
Fix object safety violations in the test

7 years agoprivacy: Rename and cleanup PrivacyVisitor
Vadim Petrochenkov [Sun, 16 Apr 2017 18:19:24 +0000 (21:19 +0300)]
privacy: Rename and cleanup PrivacyVisitor

7 years agoCheck privacy of trait items in all contexts
Vadim Petrochenkov [Sun, 16 Apr 2017 16:06:26 +0000 (19:06 +0300)]
Check privacy of trait items in all contexts

7 years agoAuto merge of #41362 - alexcrichton:run-cargot-ests, r=aturon
bors [Tue, 25 Apr 2017 15:51:40 +0000 (15:51 +0000)]
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.

7 years agoFix up vec guarnatee around capacity
steveklabnik [Tue, 25 Apr 2017 14:41:17 +0000 (10:41 -0400)]
Fix up vec guarnatee around capacity

Fixes #37746

7 years agoAdded test for #41479 from @eddyb.
Cameron Hart [Tue, 25 Apr 2017 11:16:41 +0000 (21:16 +1000)]
Added test for #41479 from @eddyb.

7 years agoImplement From<&mut [T]> for Vec
Guillaume Gomez [Tue, 25 Apr 2017 10:34:45 +0000 (12:34 +0200)]
Implement From<&mut [T]> for Vec

7 years agoDo not check if libclang_rt.?san_*_dynamic.dylib is an unstable crate.
kennytm [Tue, 25 Apr 2017 10:34:21 +0000 (18:34 +0800)]
Do not check if libclang_rt.?san_*_dynamic.dylib is an unstable crate.

These are not even crates...

7 years agoAuto merge of #40434 - mattico:splice-update, r=alexcrichton
bors [Tue, 25 Apr 2017 10:34:07 +0000 (10:34 +0000)]
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

7 years agoAdd missing struct field index adjustments.
Cameron Hart [Tue, 25 Apr 2017 10:24:33 +0000 (20:24 +1000)]
Add missing struct field index adjustments.

Some accesses in OperandPairs were missing. Fixes #41479.

7 years agoAdd ui tests
Guillaume Gomez [Mon, 24 Apr 2017 14:26:04 +0000 (16:26 +0200)]
Add ui tests

7 years agoClarify "side effect" in peek's docs
steveklabnik [Tue, 25 Apr 2017 09:38:26 +0000 (05:38 -0400)]
Clarify "side effect" in peek's docs

Fixes #33269

7 years agoClarify the doc index
steveklabnik [Tue, 25 Apr 2017 09:35:51 +0000 (05:35 -0400)]
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

7 years agoAdd Hexagon support
Michael Wu [Sun, 9 Apr 2017 06:03:31 +0000 (02:03 -0400)]
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.

7 years ago support `default impl` for specialization
Gianni Ciccarelli [Mon, 24 Apr 2017 09:56:54 +0000 (09:56 +0000)]
support `default impl` for specialization

    pr review

7 years agoForce link with an absolute rpath when using sanitizer on macOS.
kennytm [Thu, 20 Apr 2017 00:31:43 +0000 (08:31 +0800)]
Force link with an absolute rpath when using sanitizer on macOS.

7 years agoSupport AddressSanitizer and ThreadSanitizer on x86_64-apple-darwin.
kennytm [Mon, 17 Apr 2017 20:22:16 +0000 (04:22 +0800)]
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.

7 years agoPass `--format-version 1` to `cargo metadata`.
kennytm [Mon, 17 Apr 2017 16:07:36 +0000 (00:07 +0800)]
Pass `--format-version 1` to `cargo metadata`.

Suppress warning introduced by rust-lang/cargo#3841.

7 years agoAdd cautions to io::get_mut method documentation.
Sergio Benitez [Mon, 24 Apr 2017 23:46:21 +0000 (16:46 -0700)]
Add cautions to io::get_mut method documentation.

7 years agoReference tracking issue for more_io_inner_methods.
Sergio Benitez [Mon, 24 Apr 2017 23:46:05 +0000 (16:46 -0700)]
Reference tracking issue for more_io_inner_methods.

7 years agoAdd more_io_inner_methods feature to unstable book.
Sergio Benitez [Sat, 22 Apr 2017 10:35:53 +0000 (03:35 -0700)]
Add more_io_inner_methods feature to unstable book.

7 years agoAdd internal accessor methods to io::{Chain, Take}.
Sergio Benitez [Sat, 22 Apr 2017 08:14:18 +0000 (01:14 -0700)]
Add internal accessor methods to io::{Chain, Take}.

Resolves #29067.

7 years agoAdds rust-windbg.cmd script
Andrew Gaspar [Mon, 20 Feb 2017 19:10:32 +0000 (11:10 -0800)]
Adds rust-windbg.cmd script

7 years agoFix a copy-paste error in `Instant::sub_duration`
Tobias Bucher [Mon, 24 Apr 2017 23:02:59 +0000 (01:02 +0200)]
Fix a copy-paste error in `Instant::sub_duration`

Fixes #41514.

7 years agoAuto merge of #40123 - TimNN:llvm40, r=alexcrichton
bors [Mon, 24 Apr 2017 22:18:16 +0000 (22:18 +0000)]
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 🎉

7 years agoMore methods for str boxes.
Clar Charr [Tue, 11 Apr 2017 20:02:43 +0000 (16:02 -0400)]
More methods for str boxes.

7 years agoRun tests for the cargo submodule in tree
Alex Crichton [Tue, 18 Apr 2017 00:24:05 +0000 (17:24 -0700)]
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.

7 years agorustc: use tcx.at(span) to set the location of a query.
Eduard-Mihai Burtescu [Mon, 24 Apr 2017 15:06:39 +0000 (18:06 +0300)]
rustc: use tcx.at(span) to set the location of a query.

7 years agoAdd Splice forget test
Matt Ickstadt [Mon, 24 Apr 2017 14:49:29 +0000 (09:49 -0500)]
Add Splice forget test

7 years agoHaiku: add missing cases of using LIBRARY_PATH
Jessica Hamilton [Mon, 24 Apr 2017 14:21:36 +0000 (14:21 +0000)]
Haiku: add missing cases of using LIBRARY_PATH

7 years agorustc: expose the common DUMMY_SP query case as tcx methods.
Eduard-Mihai Burtescu [Mon, 24 Apr 2017 14:23:36 +0000 (17:23 +0300)]
rustc: expose the common DUMMY_SP query case as tcx methods.

7 years agoRemove strip prefix
Guillaume Gomez [Sat, 25 Feb 2017 16:08:46 +0000 (17:08 +0100)]
Remove strip prefix

7 years agoAdd tests for module suggestions
Guillaume Gomez [Tue, 3 Jan 2017 11:19:13 +0000 (12:19 +0100)]
Add tests for module suggestions

7 years agoFix invalid module suggestion
Guillaume Gomez [Fri, 9 Dec 2016 00:12:38 +0000 (16:12 -0800)]
Fix invalid module suggestion

7 years agoAuto merge of #40634 - GuillaumeGomez:refcell-docs, r=steveklabnik
bors [Mon, 24 Apr 2017 13:09:35 +0000 (13:09 +0000)]
Auto merge of #40634 - GuillaumeGomez:refcell-docs, r=steveklabnik

Add more explanation on RefCell::get_mut

Fixes #40203.

r? @rust-lang/docs

7 years agoAdd more explanation on RefCell::get_mut
Guillaume Gomez [Sat, 18 Mar 2017 14:33:56 +0000 (15:33 +0100)]
Add more explanation on RefCell::get_mut

7 years agorustc: rename some of the queries to match tcx methods.
Eduard-Mihai Burtescu [Mon, 24 Apr 2017 12:20:46 +0000 (15:20 +0300)]
rustc: rename some of the queries to match tcx methods.

7 years agouse the word 'length' in Vec::len's docs
steveklabnik [Mon, 24 Apr 2017 11:47:00 +0000 (07:47 -0400)]
use the word 'length' in Vec::len's docs

Fixes #37866