Commit Graph

59537 Commits

Author SHA1 Message Date
Seo Sanghyeon
fda41c6b5c Rollup merge of #38445 - est31:master, r=apasel422
stage0.txt: typo fix
2016-12-19 16:59:44 +09:00
Seo Sanghyeon
9f18f25464 Rollup merge of #38438 - alexcrichton:update-beta, r=brson
Update beta bootstrap compiler

The current beta that rustc is bootstrapping from contains a bug in Cargo that
erroneously links to OpenSSL in /usr/local, but this is fixed in the most recent
1.14 beta, so let's use that.
2016-12-19 16:59:43 +09:00
Seo Sanghyeon
49cd809e7a Rollup merge of #38433 - GuillaumeGomez:thread_docs, r=frewsxcv
Thread docs

r? @frewscvx
2016-12-19 16:59:41 +09:00
Seo Sanghyeon
813af34c92 Rollup merge of #38422 - zackmdavis:enjoy_tidy_path_error_macro_nicety, r=bluss
tidy features: use 2-parameter form of internal try macro for open err

This tiny patch merely applies @bluss's suggestion for how to get a more
informative error message when the feature check can't open a file, a
matter that had briefly annoyed the present author, leading to the
filing of #38417.

Resolves #38417.
2016-12-19 16:59:40 +09:00
Seo Sanghyeon
4b5cffc04b Rollup merge of #38421 - apasel422:issue-36934, r=alexcrichton
Replace invalid use of `&mut` with `UnsafeCell` in `std::sync::mpsc`

Closes #36934

r? @alexcrichton
2016-12-19 16:59:38 +09:00
Seo Sanghyeon
d38beccdc4 Rollup merge of #38413 - rillian:armv7-neon, r=alexcrichton
rustc: Disable NEON on armv7 android.

We thought Google's ABI for arvm7 required neon, but it is
currently optional, perhaps because there is a significant
population of Tegra 2 devices still in use.

This turns off neon code generation outside #[target-feature]
blocks just like we do on armv7-unknown-linux-gnu, but unlike
most other armv7 targets. LLVM defaults to +neon for this target,
so an explicit disable is necessary.

See https://developer.android.com/ndk/guides/abis.html#v7a
for instruction set extension requirements.

Closes #38402.
2016-12-19 16:59:37 +09:00
Seo Sanghyeon
0c4e1db935 Rollup merge of #38397 - frewsxcv:platform-specific-process-exit, r=alexcrichton
Document platform-specific differences for `std::process::exit`.

Fixes https://github.com/rust-lang/rust/issues/35046.
2016-12-19 16:59:36 +09:00
Seo Sanghyeon
86cf9222e9 Rollup merge of #38334 - frewsxcv:BuildHasherDefault, r=GuillaumeGomez
Rewrite, improve documentation for `core:#️⃣:BuildHasherDefault`.

Fixes https://github.com/rust-lang/rust/issues/31242.
2016-12-19 16:59:35 +09:00
bors
cc662efca1 Auto merge of #38194 - sgrif:sg-no-span-mangling, r=nrc
Don't perform span mangling when building field/tup access nodes

There are no guarantees that the two spans used to create the new one
come from the same place or are even valid.

Fixes #36081.
2016-12-19 04:39:18 +00:00
bors
0102127963 Auto merge of #38140 - jseyfried:proc_macro_visibility, r=nrc
Require `#[proc_macro_derive]` functions to be `pub`

r? @nrc
2016-12-19 01:23:32 +00:00
bors
71c06a56a1 Auto merge of #38051 - sanxiyn:unused-type-alias-3, r=eddyb
Warn unused type aliases, reimplemented

Reimplementation of #37631. Fix #37455.
2016-12-18 22:06:34 +00:00
Corey Farwell
4d392d355e Document platform-specific differences for std::process::exit.
Fixes https://github.com/rust-lang/rust/issues/35046.
2016-12-18 09:47:22 -08:00
bors
1f965cc8e9 Auto merge of #38369 - aturon:stab-1.15, r=alexcrichton
Library stabilizations/deprecations for 1.15 release

Stabilized:

- `std::iter::Iterator::{min_by, max_by}`
- `std::os::*::fs::FileExt`
- `std::sync::atomic::Atomic*::{get_mut, into_inner}`
- `std::vec::IntoIter::{as_slice, as_mut_slice}`
- `std::sync::mpsc::Receiver::try_iter`
- `std::os::unix::process::CommandExt::before_exec`
- `std::rc::Rc::{strong_count, weak_count}`
- `std::sync::Arc::{strong_count, weak_count}`
- `std::char::{encode_utf8, encode_utf16}`
- `std::cell::Ref::clone`
- `std::io::Take::into_inner`

Deprecated:

- `std::rc::Rc::{would_unwrap, is_unique}`
- `std::cell::RefCell::borrow_state`

Closes #23755
Closes #27733
Closes #27746
Closes #27784
Closes #28356
Closes #31398
Closes #34931
Closes #35601
Closes #35603
Closes #35918
Closes #36105
2016-12-18 17:37:25 +00:00
Seo Sanghyeon
f71f31aa61 Update commit hash in cargotest 2016-12-18 23:15:53 +09:00
Seo Sanghyeon
5a1b62c0fd Fix Windows 2016-12-18 22:19:57 +09:00
Guillaume Gomez
79e8a70b62 Add missing urls for thread doc module 2016-12-18 11:36:13 +01:00
bors
8327b5afaf Auto merge of #37429 - camlorn:univariant_layout_optimization, r=eddyb
struct field reordering and optimization

This is work in progress.  The goal is to divorce the order of fields in source code from the order of fields in the LLVM IR, then optimize structs (and tuples/enum variants)by always ordering fields from least to most aligned.  It does not work yet.  I intend to check compiler memory usage as a benchmark, and a crater run will probably be required.

I don't know enough of the compiler to complete this work unaided.  If you see places that still need updating, please mention them.  The only one I know of currently is debuginfo, which I'm putting off intentionally until a bit later.

r? @eddyb
2016-12-18 07:59:32 +00:00
bors
d54e723179 Auto merge of #38440 - alexcrichton:fix-osx-nightlies, r=brson
rustbuild: Fix LC_ID_DYLIB directives on OSX

Currently libraries installed by rustbuild on OSX have an incorrect
`LC_ID_DYLIB` directive located in the dynamic libraries that are
installed. The directive we expect looks like:

    @rpath/libstd.dylib

Which means that if you want to find that dynamic library you should
look at the dylib's other `@rpath` directives. Typically our `@rpath`
directives look like `@loader_path/../lib` for the compiler as that's
where the installed libraries will be located. Currently, though,
rustbuild produces dylibs with the directive that looks like:

    /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps/libstd-713ad88203512705.dylib

In other words, the build directory is encoded erroneously. The compiler
already [knows how] to change this directive, but it only passes that
argument when `-C rpath` is also passed. The rustbuild system, however,
explicitly [does not pass] this option explicitly and instead bakes its
own. This logic then also erroneously didn't pass `-Wl,-install_name`
like the compiler.

[knows how]: 4a008cccaa/src/librustc_trans/back/linker.rs (L210-L214)
[does not pass]: 4a008cccaa/src/bootstrap/bin/rustc.rs (L133-L158)

To fix this regression this patch introduces a new `-Z` flag, `-Z
osx-rpath-install-name` which basically just forces the compiler to take
the previous `-install_name` branch when creating a dynamic library.
Hopefully we can sort out a better rpath story in the future, but for
now this "hack" should suffice in getting our nightly builds back to the
same state as before.

Closes #38430
2016-12-18 04:38:27 +00:00
est31
1e7bc90708 stage0.txt: typo fix 2016-12-18 03:12:18 +01:00
bors
32d02bbafa Auto merge of #38439 - alexcrichton:fix-nightlies, r=brson
rustbuild: Create directories in mingw dist

Previously we accidentally relied on the mingw dist step running last, but the
step just needed to ensure the directories were created.
2016-12-18 01:07:35 +00:00
Alex Crichton
1b8e6c152c rustbuild: Fix LC_ID_DYLIB directives on OSX
Currently libraries installed by rustbuild on OSX have an incorrect
`LC_ID_DYLIB` directive located in the dynamic libraries that are
installed. The directive we expect looks like:

    @rpath/libstd.dylib

Which means that if you want to find that dynamic library you should
look at the dylib's other `@rpath` directives. Typically our `@rpath`
directives look like `@loader_path/../lib` for the compiler as that's
where the installed libraries will be located. Currently, though,
rustbuild produces dylibs with the directive that looks like:

    /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps/libstd-713ad88203512705.dylib

In other words, the build directory is encoded erroneously. The compiler
already [knows how] to change this directive, but it only passes that
argument when `-C rpath` is also passed. The rustbuild system, however,
explicitly [does not pass] this option explicitly and instead bakes its
own. This logic then also erroneously didn't pass `-Wl,-install_name`
like the compiler.

[knows how]: 4a008cccaa/src/librustc_trans/back/linker.rs (L210-L214)
[does not pass]: 4a008cccaa/src/bootstrap/bin/rustc.rs (L133-L158)

To fix this regression this patch introduces a new `-Z` flag, `-Z
osx-rpath-install-name` which basically just forces the compiler to take
the previous `-install_name` branch when creating a dynamic library.
Hopefully we can sort out a better rpath story in the future, but for
now this "hack" should suffice in getting our nightly builds back to the
same state as before.

Closes #38430
2016-12-17 16:14:11 -08:00
Alex Crichton
bc06bbb401 rustbuild: Create directories in mingw dist
Previously we accidentally relied on the mingw dist step running last, but the
step just needed to ensure the directories were created.
2016-12-17 13:51:51 -08:00
bors
ec8bb45624 Auto merge of #38279 - KalitaAlexey:issue-8521, r=jseyfried
macros: allow a `path` fragment to be parsed as a type parameter bound

Allow a `path` fragment to be parsed as a type parameter bound.
Fixes #8521.
2016-12-17 21:49:51 +00:00
Alex Crichton
c3423a6640 Update beta bootstrap compiler
The current beta that rustc is bootstrapping from contains a bug in Cargo that
erroneously links to OpenSSL in /usr/local, but this is fixed in the most recent
1.14 beta, so let's use that.
2016-12-17 13:47:31 -08:00
bors
4a008cccaa Auto merge of #38122 - brson:book-rustup, r=steveklabnik
Update book for rustup

Supersedes https://github.com/rust-lang/rust/pull/37934

Don't land yet. Needs coordination with https://github.com/rust-lang/rust-www/pull/621

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

r? @steveklabnik
2016-12-17 17:25:30 +00:00
bors
dea7ef3424 Auto merge of #38419 - alexcrichton:travis-osx-32-bit, r=brson
travis: Fix testing 32-bit OSX target

We passed --target when we meant to pass --build, meaning we tested only the
standard library for 32-bit, not the whole compiler like we intended.
2016-12-17 11:10:11 +00:00
bors
f99d4dfef2 Auto merge of #38205 - jseyfried:fix_module_directory_regression, r=eddyb
macros: fix the expected paths for a non-inline module matched by an `item` fragment

Fixes #38190.
r? @nrc
2016-12-17 06:43:16 +00:00
Aaron Turon
9a5cef4de5 Address fallout 2016-12-16 19:42:17 -08:00
Zack M. Davis
ca376049ca tidy features: use 2-parameter form of internal try macro for open err
This tiny patch merely applies @bluss's suggestion for how to get a more
informative error message when the feature check can't open a file, a
matter that had briefly annoyed the present author, leading to the
filing of #38417.
2016-12-16 17:45:59 -08:00
Andrew Paseltiner
26d4308c6a
Replace invalid use of &mut with UnsafeCell in std::sync::mpsc
Closes #36934
2016-12-16 19:52:12 -05:00
Alex Crichton
0f742e600b travis: Fix testing 32-bit OSX target
We passed --target when we meant to pass --build, meaning we tested only the
standard library for 32-bit, not the whole compiler like we intended.
2016-12-16 16:32:40 -08:00
Brian Anderson
7550e32146 Update book for rustup 2016-12-16 21:18:44 +00:00
Steve Klabnik
38cb687075 Book: rustup.sh -> rustup.rs
Fixes #35653

cc https://github.com/rust-lang/rust-www/pull/621
2016-12-16 21:18:43 +00:00
Austin Hicks
ff59474ed3 flock needs repr(C) 2016-12-16 15:50:14 -05:00
Ralph Giles
9e01f76349 rustc: Link to Android ABI requirements.
Hopefully these references will be stable and provide guidance
when requirements change in the future.
2016-12-16 11:27:12 -08:00
Ralph Giles
e900f6c7fe rustc: Disable NEON on armv7 android.
We thought Google's ABI for arvm7 required neon, but it is
currently optional, perhaps because there is a significant
population of Tegra 2 devices still in use.

This turns off neon code generation outside #[target-feature]
blocks just like we do on armv7-unknown-linux-gnu, but unlike
most other armv7 targets. LLVM defaults to +neon for this target,
so an explicit disable is necessary.

See https://developer.android.com/ndk/guides/abis.html#v7a
for instruction set extension requirements.

Closes #38402.
2016-12-16 10:54:48 -08:00
Corey Farwell
d409fc378c Rewrite, improve documentation for core:#️⃣:BuildHasherDefault.
Fixes https://github.com/rust-lang/rust/issues/31242.
2016-12-16 12:27:03 -05:00
Austin Hicks
f22a22b286 Incorporate review comments. 2016-12-16 12:06:12 -05:00
Kalita Alexey
12a6cf1123 Allow path fragments to be parsed as type parameter bounds in macro expansion 2016-12-16 14:16:46 +03:00
bors
d250169cb5 Auto merge of #38359 - alexcrichton:sccache, r=brson
rustbuild: Add sccache support

This commit adds support for sccache, a ccache-like compiler which works on MSVC
and stores results into an S3 bucket. This also switches over all Travis and
AppVeyor automation to using sccache to ensure a shared and unified cache over
time which can be shared across builders.

The support for sccache manifests as a new `--enable-sccache` option which
instructs us to configure LLVM differently to use a 'sccache' binary instead of
a 'ccache' binary. All docker images for Travis builds are updated to download
Mozilla's tooltool builds of sccache onto various containers and systems.
Additionally a new `rust-lang-ci-sccache` bucket is configured to hold all of
our ccache goodies.

---

Note that this does not currently change Windows [due to previously written up issues](https://github.com/rust-lang/rust/issues/38119#issuecomment-266631585). Despite that, however, I was curious to get timings for the builds on Travis to see what ranges we're working with. As a result, this is a WIP PR I'm using to gauge build times and such.
2016-12-16 07:26:41 +00:00
bors
c6d8ab09e3 Auto merge of #38357 - arielb1:deterministic-hash, r=michaelwoerister
make deterministic_hash host-architecture-independent

`DefPath::deterministic_hash` used to call `std:#️⃣:Hash`, which depends on the current architecture in several ways, which would prevent metadata written on one host architecture from being successfully read on another one.

Use a hasher we control instead.

Fixes #38177.

r? @michaelwoerister
2016-12-16 03:56:47 +00:00
bors
8ae904062b Auto merge of #38352 - bluss:unaligned-metadata, r=eddyb
Fix unaligned loads in librustc_metadata

Creating a `&[u32]` from an `&[u8]` is not necessarily valid, and crashes
on certain platforms if the data is not well aligned.
2016-12-16 00:52:35 +00:00
bors
8f02c429ad Auto merge of #38394 - alexcrichton:fix-nightlies, r=brson
rustbuild: Package rust-mingw by default

This fixes the `make dist` step on MinGW to package the `rust-mingw` component
by default. This should hopefully be the last step in fixing nightlies.
2016-12-15 19:43:28 +00:00
Aaron Turon
fce6af2a67 Stabilize std::io::Take::into_inner 2016-12-15 10:56:56 -08:00
Aaron Turon
dc2d5058e9 Deprecate std::cell::RefCell::borrow_state 2016-12-15 10:56:55 -08:00
Aaron Turon
b2882709b3 Stabilize std::cell::Ref::clone 2016-12-15 10:56:55 -08:00
Aaron Turon
415f3de7aa Stabilize std::char::{encode_utf8, encode_utf16} 2016-12-15 10:56:55 -08:00
Aaron Turon
b02ed1e1d4 Stabilize:
- `std::rc::Rc::{strong_count, weak_count}`
- `std::sync::Arc::{strong_count, weak_count}`

Deprecate:

- `std::rc::Rc::{would_unwrap, is_unique}`
2016-12-15 10:56:55 -08:00
Aaron Turon
65b144c964 Stabilize std::os::unix::process::CommandExt::before_exec 2016-12-15 10:56:55 -08:00
Aaron Turon
9e8fd24383 Stabilize std::sync::mpsc::Receiver::try_iter 2016-12-15 10:56:55 -08:00