Commit Graph

59686 Commits

Author SHA1 Message Date
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
e70415bd71 Auto merge of #38411 - japaric:gh38406, r=alexcrichton
llvm: backport r280651

fixes #38406

r? @alexcrichton

(I'm secretly hoping this will error in the same way as #38314. That would sort of confirm that the problem is OOM and not enabling the SPARC backend)
2016-12-19 07:52:42 +00: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
Clar Charr
5049ad22ec From<[u16; 8]> for Ipv6Addr. 2016-12-18 23:09:48 -05:00
Jorge Aparicio
bd85a6dbe7 target spec: add an asm-args field to pass arguments to the external ..
assembler
2016-12-18 22:25:46 -05: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
Jeffrey Seyfried
dcae8bfb40 Give extern crates' root modules a better name. 2016-12-18 23:26:32 +00:00
Jeffrey Seyfried
745ddf2aa7 Refactor out mark.as_placeholder_id(). 2016-12-18 23:26:31 +00:00
Jeffrey Seyfried
6f040b48ef Avoid including attributes in bang macro invocations. 2016-12-18 23:26:31 +00:00
Jeffrey Seyfried
421c5d11c1 Remove scope placeholders, remove method add_macro of ext::base::Resolver. 2016-12-18 23:26:30 +00:00
Jeffrey Seyfried
e80d1a8faf Remove MacroDef's fields imported_from and allow_internal_unstable,
remove `export` argument of `resolver.add_macro()`.
2016-12-18 23:26:29 +00:00
Jeffrey Seyfried
4d638fd113 Canonicalize lifetime names. 2016-12-18 23:26:29 +00:00
Jeffrey Seyfried
532b013b28 Rename ModuleS -> ModuleData. 2016-12-18 23:26:27 +00:00
Jeffrey Seyfried
aa19274b72 De-genericize try_define. 2016-12-18 23:26:26 +00:00
Jeffrey Seyfried
59de7f8f04 Add ident.unhygienize() and use Ident more instead of Name in resolve. 2016-12-18 23:26:22 +00:00
Jeffrey Seyfried
83ab9f7fac Remove some unused functions and fix formatting. 2016-12-18 23:25:30 +00:00
Jeffrey Seyfried
b35c306b65 Fix the path resolutions of glob imports. 2016-12-18 23:23:23 +00:00
Corey Farwell
86fc63e62d Implement fmt::Debug for all structures in libstd.
Part of https://github.com/rust-lang/rust/issues/31869.

Also turn on the `missing_debug_implementations` lint at the crate
level.
2016-12-18 14:55:14 -08: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
Simonas Kazlauskas
b3b2f1b0d6 Use exec for the wrapper on UNIXes
This not only avoids the small – and unnecessary – constant overhead for each compiler invocation,
but also helps somewhat by only having “correct” rustc processes to look for in `/proc/`.

This also makes the wrapper behave effectively as a regular exec wrapper its intended to be.
2016-12-18 23:56:50 +02: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
Sébastien Marie
2c39ee12a9 OpenBSD has two stdc++ libraries: use the newer
stdc++ is from base, and is an old library (GCC 4.2)
estdc++ is from ports, and is a recent library (GCC 4.9 currently)

as LLVM requires the newer version, use it if under OpenBSD.
2016-12-18 18:43:05 +01: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
Sébastien Marie
a7d9025e40 let BSD to use gmake for GNU-make
the diff extends build_helper to provide an function to return the
expected name of GNU-make on the host: "make" or "gmake".

Fixes #38429
2016-12-17 20:09:23 +01:00
Sébastien Marie
9f8c1e28a5 disable run-pass/backtrace for openbsd
the backtrace test doesn't work on openbsd as it doesn't
have support for libbacktrace without using filename.
2016-12-17 20:01:05 +01: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
Stjepan Glavina
18ff6410d8 Minor fix in the merge_sort comments
There was an off-by-one error discovered by @tbelaire.
So, the two invariants we are enforcing are:

1. Run lengths are decreasing.
2. Sum of lengths of any two adjacent runs is less than the length of
their predecessor.

This commit changes the comment to be clearer and have correct bounds on `i`.
2016-12-17 17:48:17 +01:00
Sébastien Marie
dd0fc0a03a Disconnect ar from cc on OpenBSD
OpenBSD usually use an alternative compiler (`egcc') from ports. But the
`ar' is unprefixed as it comes from base.
2016-12-17 14:48:27 +01: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
Michael Woerister
77e659a6d3 Remove some more things that were only needed for inlined-HIR DefIds 2016-12-16 20:11:59 -05: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
Michael Woerister
45571f34aa definitions: Add some documentation. 2016-12-16 19:14:16 -05:00
Michael Woerister
70944c2b5f No need to have tcx::opt_def_path() now that we store all DefPaths 2016-12-16 19:14:16 -05:00
Michael Woerister
72f95aac1b Move retrace_path() implementation to DefPathTable 2016-12-16 19:14:16 -05:00
Michael Woerister
ea733b589c No need to store Definitions in RefCell within HIR map 2016-12-16 19:14:16 -05:00