]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoRollup merge of #38486 - est31:master, r=petrochenkov
Alex Crichton [Tue, 20 Dec 2016 19:16:49 +0000 (11:16 -0800)]
Rollup merge of #38486 - est31:master, r=petrochenkov

Add regression test for #38458

Closes #38458

7 years agoRollup merge of #38478 - brson:bump, r=alexcrichton
Alex Crichton [Tue, 20 Dec 2016 19:16:47 +0000 (11:16 -0800)]
Rollup merge of #38478 - brson:bump, r=alexcrichton

Bump version to 1.16

7 years agoRollup merge of #38472 - alexcrichton:fix-cargotest, r=brson
Alex Crichton [Tue, 20 Dec 2016 19:16:46 +0000 (11:16 -0800)]
Rollup merge of #38472 - alexcrichton:fix-cargotest, r=brson

travis: Fix the cargotest bot

Recently the Cargo revision running on cargotest was updated in #38051, and the
updated version of Cargo pulls in the openssl-sys 0.9 crate instead of the old
openssl-sys 0.7 crate. The 0.9 release of openssl-sys has slightly different
requirements and logic for detecting OpenSSL, namely it requires `pkg-config` to
be present on Linux typically.

This commit fixes this problem by installing pkg-config in the cargotest
container that's running on the bots. This in turn should hopefully fix the
build script and allow it to find the already-installed local OpenSSL libraries.

7 years agoRollup merge of #38471 - alexcrichton:run-debuginfo-tests, r=brson
Alex Crichton [Tue, 20 Dec 2016 19:16:45 +0000 (11:16 -0800)]
Rollup merge of #38471 - alexcrichton:run-debuginfo-tests, r=brson

rustbuild: Run debuginfo tests by default

This fixes an accidental regression in rustbuild which stopped running debuginfo
tests by default. Here we flag the test suites as `default(true)` to ensure that
they're run on bots, for example.

7 years agoRollup merge of #38470 - alexcrichton:really-fix-osx, r=brson
Alex Crichton [Tue, 20 Dec 2016 19:16:44 +0000 (11:16 -0800)]
Rollup merge of #38470 - alexcrichton:really-fix-osx, r=brson

rustbuild: Update Cargo download location

I updated the beta compiler used to bootstrap the master branch in #38438 with
the intention of fixing Travis OSX linkage issues but I mistakenly forgot that
the PR only updated rustc, not Cargo itself. Cargo has a new release process
with downloads in a different location, so this commit updates rustbuild to
download from this new location by tracking revisions instead of Cargo nightly
dates.

7 years agoRollup merge of #38468 - xen0n:tarball-wrangling, r=alexcrichton
Alex Crichton [Tue, 20 Dec 2016 19:16:42 +0000 (11:16 -0800)]
Rollup merge of #38468 - xen0n:tarball-wrangling, r=alexcrichton

rustbuild: Eliminate duplication of dist tarballs

Fixes #38365 by not constructing the duplicate steps in the first place, as suggested. The source package step is lacking the check as in other steps, so it is added as well.

Tested locally with the `alexcrichton/rust-slave-linux-cross:2016-11-11` container (with the build slave init replaced with no-op, of course).

r? @alexcrichton

7 years agoRollup merge of #38463 - japaric:asm-args, r=alexcrichton
Alex Crichton [Tue, 20 Dec 2016 19:16:41 +0000 (11:16 -0800)]
Rollup merge of #38463 - japaric:asm-args, r=alexcrichton

target spec: add an asm-args field to pass arguments to the external ..

assembler

The main use case is the (still out of tree) msp430 target. For that target we use an external assembler, `mps430-elf-gcc`, to produce object files from the assembly rustc/llvm outputs. The problem is that by default `msp430-elf-gcc` produces object files for the MSP430**X** ABI but we want to use produce objects using the MSP430 (note: no X) ABI. To do that we have to pass `-mcpu=msp430` to the assembler and that's what this flag is for.

r? @alexcrichton
cc @pftbest

7 years agoRollup merge of #38451 - semarie:openbsd-rustbuild, r=alexcrichton
Alex Crichton [Tue, 20 Dec 2016 19:16:40 +0000 (11:16 -0800)]
Rollup merge of #38451 - semarie:openbsd-rustbuild, r=alexcrichton

adaptation to rustbuild for openbsd

Since the switch to rustbuild, the build for openbsd is broken:
  - [X] `ar` inference based on compiler name is wrong (OpenBSD usually use `egcc`, but `ear` doesn't exist)
  - [X] `make` isn't GNU-make under OpenBSD (and others BSD platforms)
  - [x] `stdc++` isn't the right stdc++ library to link with (it should be `estdc++`)
  - [x] corrects tests that don't pass anymore (problems related to rustbuild)

r? @alexcrichton

7 years agoRollup merge of #38432 - stjepang:fix-sort-comment, r=bluss
Alex Crichton [Tue, 20 Dec 2016 19:16:39 +0000 (11:16 -0800)]
Rollup merge of #38432 - stjepang:fix-sort-comment, r=bluss

Minor fix in the merge_sort comments

There was an off-by-one error discovered by @tbelaire.
So, to repeat... 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 relevant comment to be clearer and have correct bounds on `i`.

r? @bluss

7 years agoRollup merge of #38418 - michaelwoerister:def_path_cleanup, r=eddyb
Alex Crichton [Tue, 20 Dec 2016 19:16:38 +0000 (11:16 -0800)]
Rollup merge of #38418 - michaelwoerister:def_path_cleanup, r=eddyb

Cleanup refactoring around DefPath handling

This PR makes two big changes:
* All DefPaths of a crate are now stored in metadata in their own table (as opposed to `DefKey`s as part of metadata `Entry`s.
* The compiler will no longer allocate a pseudo-local DefId for inlined HIR nodes (because those are gross). Inlined HIR nodes will have a NodeId but they don't have there own DefId anymore. Turns out they were not needed anymore either. Hopefully HIR inlining will be gone completely one day but if until then we start needing to be able to map inlined NodeIds to original DefIds, we can add an additional table to metadata that allows for reconstructing this.

Overall this makes for some nice simplifications and removal of special cases.

r? @eddyb

cc @rust-lang/compiler

7 years agoRollup merge of #38398 - ollie27:patch-1, r=alexcrichton
Alex Crichton [Tue, 20 Dec 2016 19:16:37 +0000 (11:16 -0800)]
Rollup merge of #38398 - ollie27:patch-1, r=alexcrichton

rustbuild: Stop building docs for libtest by default

They cause the search index from the std docs to get overwritten just like #34800.

Part of #38319.

7 years agoRollup merge of #38395 - tshepang:nit, r=steveklabnik
Alex Crichton [Tue, 20 Dec 2016 19:16:36 +0000 (11:16 -0800)]
Rollup merge of #38395 - tshepang:nit, r=steveklabnik

rustdoc: a formatting nit

7 years agoRollup merge of #38388 - redox-os:config_toml_prefix, r=alexcrichton
Alex Crichton [Tue, 20 Dec 2016 19:16:35 +0000 (11:16 -0800)]
Rollup merge of #38388 - redox-os:config_toml_prefix, r=alexcrichton

Add prefix to config.toml

This allows `rustbuild` to be used to install to a prefix.
```toml
[build]
prefix = "/path/to/install"
```
For example, the following `config.toml` will cause `x.py dist --install` to install to `/path/to/install`

7 years agoRollup merge of #38346 - GuillaumeGomez:duration_doc, r=frewsxcv
Alex Crichton [Tue, 20 Dec 2016 19:16:34 +0000 (11:16 -0800)]
Rollup merge of #38346 - GuillaumeGomez:duration_doc, r=frewsxcv

Duration doc

r? @frewsxcv

7 years agoRollup merge of #38315 - jonhoo:better-E0309, r=pnkfelix
Alex Crichton [Tue, 20 Dec 2016 19:16:32 +0000 (11:16 -0800)]
Rollup merge of #38315 - jonhoo:better-E0309, r=pnkfelix

Expand E0309 explanation with motivating example

I recently started reading @Gankro's "[Learning Rust With Entirely Too Many Linked Lists](http://cglab.ca/~abeinges/blah/too-many-lists/book/README.html)", and came across [a part](http://cglab.ca/~abeinges/blah/too-many-lists/book/second-iter.html) where he comes across `E0309`, and after showing `rustc --explain E0309` prompty says

> This is dumb. I think it's dumb. You have to do it.

Humor aside, I think this says something about the current explanation being somewhat lacking.

This patch introduces a motivating example saying why `T: 'a` is a necessary restriction. Hopefully, this will help new Rustaceans understand why leaving out the `'a` bound on `T` might lead to broken code.

7 years agoRollup merge of #38289 - bluss:mir-verbose-test-fail, r=michaelwoerister
Alex Crichton [Tue, 20 Dec 2016 19:16:30 +0000 (11:16 -0800)]
Rollup merge of #38289 - bluss:mir-verbose-test-fail, r=michaelwoerister

A more verbose matching failure for mir tests

This makes it easier to work with mir test failures during development.

- Show which expected line was not found
- Show full expected output
- Show full actual output

7 years agoRollup merge of #38245 - estebank:cast-deref-hint-2, r=nikomatsakis
Alex Crichton [Tue, 20 Dec 2016 19:16:29 +0000 (11:16 -0800)]
Rollup merge of #38245 - estebank:cast-deref-hint-2, r=nikomatsakis

When cast needs a dereference point at full cast

After the fix of #37453 in PR #37369, instead of pointing at only the cast type, point at the full cast span when a cast needs a dereference, as well as assign the error label to the correct span for proper coloring:

<img width="471" alt="error span pointing at the entire cast" src="https://cloud.githubusercontent.com/assets/1606434/21024245/8797fc2e-bd38-11e6-82c1-66c281c656c1.png">

instead of

<img width="471" alt="error span pointing at the type of the cast" src="https://cloud.githubusercontent.com/assets/1606434/21023777/d4814aa6-bd36-11e6-9fc3-b2a0ea5ee15d.png">

Move `compile-fail` test to `ui` test.

7 years agoRollup merge of #38236 - GuillaumeGomez:unix_socket_doc, r=frewsxcv
Alex Crichton [Tue, 20 Dec 2016 19:16:26 +0000 (11:16 -0800)]
Rollup merge of #38236 - GuillaumeGomez:unix_socket_doc, r=frewsxcv

Unix socket doc

r? @frewsxcv

7 years agoRollup merge of #38215 - liigo:patch-12, r=petrochenkov
Alex Crichton [Tue, 20 Dec 2016 19:16:25 +0000 (11:16 -0800)]
Rollup merge of #38215 - liigo:patch-12, r=petrochenkov

minor fix about visibility in reference

7 years agoRollup merge of #38208 - frewsxcv:btreesetdocs, r=alexcrichton
Alex Crichton [Tue, 20 Dec 2016 19:16:24 +0000 (11:16 -0800)]
Rollup merge of #38208 - frewsxcv:btreesetdocs, r=alexcrichton

Improvements to `BTreeSet` documentation.

None

7 years agoRollup merge of #38171 - jseyfried:cleanup, r=nrc
Alex Crichton [Tue, 20 Dec 2016 19:16:23 +0000 (11:16 -0800)]
Rollup merge of #38171 - jseyfried:cleanup, r=nrc

Miscellaneous cleanup/refactoring in `resolve` and `syntax::ext`

r? @nrc

7 years agoRollup merge of #38158 - sourcefrog:doc-iter, r=GuillaumeGomez
Alex Crichton [Tue, 20 Dec 2016 19:16:22 +0000 (11:16 -0800)]
Rollup merge of #38158 - sourcefrog:doc-iter, r=GuillaumeGomez

Explain meaning of Result iters and link to factory functions

7 years agoRollup merge of #38150 - estebank:fix-23286, r=nikomatsakis
Alex Crichton [Tue, 20 Dec 2016 19:16:20 +0000 (11:16 -0800)]
Rollup merge of #38150 - estebank:fix-23286, r=nikomatsakis

Point out the known type when field doesn't satisfy bound

For file

```rust
use std::path::Path;

fn f(p: Path) { }
```

provide the following error

```nocode
error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied in `std::path::Path`
 --> file.rs:3:6
  |
3 | fn f(p: Path) { }
  |      ^ within `std::path::Path`, the trait `std::marker::Sized` is not implemented for `[u8]`
  |
  = note: `[u8]` does not have a constant size known at compile-time
  = note: required because it appears within the type `std::path::Path`
  = note: all local variables must have a statically known size
```

Fix #23286.

7 years agoRollup merge of #38131 - clarcharr:from_segments, r=alexcrichton
Alex Crichton [Tue, 20 Dec 2016 19:16:19 +0000 (11:16 -0800)]
Rollup merge of #38131 - clarcharr:from_segments, r=alexcrichton

Add From<[u16; 8]> to Ipv6Addr

Not really sure that this requires an RFC, but I figured that I'd offer a pull request and see what people think. It seems like a reasonable addition.

7 years agoRollup merge of #38006 - frewsxcv:libstd-debug, r=alexcrichton
Alex Crichton [Tue, 20 Dec 2016 19:16:17 +0000 (11:16 -0800)]
Rollup merge of #38006 - frewsxcv:libstd-debug, r=alexcrichton

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.

7 years agoRollup merge of #37761 - christophebiocca:borrow-stdlib-fn-refactor, r=alexcrichton
Alex Crichton [Tue, 20 Dec 2016 19:16:17 +0000 (11:16 -0800)]
Rollup merge of #37761 - christophebiocca:borrow-stdlib-fn-refactor, r=alexcrichton

Use Borrow for binary_search and contains methods in the standard library

Fixes all standard library methods in #32822 that can be fixed without backwards compatibility issues.

7 years agoIndicate that `BTreeSet::iter` returns values in ascending order.
Corey Farwell [Wed, 7 Dec 2016 01:47:33 +0000 (15:47 -1000)]
Indicate that `BTreeSet::iter` returns values in ascending order.

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

7 years agorustbuild: Run debuginfo tests by default
Alex Crichton [Mon, 19 Dec 2016 18:42:04 +0000 (10:42 -0800)]
rustbuild: Run debuginfo tests by default

This fixes an accidental regression in rustbuild which stopped running debuginfo
tests by default. Here we flag the test suites as `default(true)` to ensure that
they're run on bots, for example.

7 years agorustbuild: package src only once for build triple
Wang Xuerui [Mon, 19 Dec 2016 08:39:19 +0000 (16:39 +0800)]
rustbuild: package src only once for build triple

7 years agorustbuild: only plan from build triple for dist
Wang Xuerui [Mon, 19 Dec 2016 07:30:14 +0000 (15:30 +0800)]
rustbuild: only plan from build triple for dist

We only want to package each host/target once for `dist`. The obvious
solution takes the form of step dependency, which is implemented at
least for the `dist-rustc` step. Unfortunately since the steps are
created from `hosts x targets` during planning and *not* de-duplicated
afterwards, the problem still persists.

We therefore move the check inside `plan()` instead, to avoid creating
the duplicate steps in the first place.

7 years agoAdd regression test for #38458
est31 [Tue, 20 Dec 2016 02:34:36 +0000 (03:34 +0100)]
Add regression test for #38458

7 years agorustbuild: Update Cargo download location
Alex Crichton [Mon, 19 Dec 2016 17:45:42 +0000 (09:45 -0800)]
rustbuild: Update Cargo download location

I updated the beta compiler used to bootstrap the master branch in #38438 with
the intention of fixing Travis OSX linkage issues but I mistakenly forgot that
the PR only updated rustc, not Cargo itself. Cargo has a new release process
with downloads in a different location, so this commit updates rustbuild to
download from this new location by tracking revisions instead of Cargo nightly
dates.

7 years agoRemove trailing whitespace
Jeremy Soller [Tue, 20 Dec 2016 00:42:07 +0000 (17:42 -0700)]
Remove trailing whitespace

7 years agoMove prefix to [install] section
Jeremy Soller [Mon, 19 Dec 2016 22:49:57 +0000 (15:49 -0700)]
Move prefix to [install] section

7 years agoBump version to 1.16
Brian Anderson [Mon, 19 Dec 2016 21:57:43 +0000 (21:57 +0000)]
Bump version to 1.16

7 years agoSimplify `TyCtxt::create_and_enter`.
Jeffrey Seyfried [Thu, 15 Dec 2016 11:13:24 +0000 (11:13 +0000)]
Simplify `TyCtxt::create_and_enter`.

7 years agoClean up `get_traits_containing_item`.
Jeffrey Seyfried [Wed, 14 Dec 2016 09:59:41 +0000 (09:59 +0000)]
Clean up `get_traits_containing_item`.

7 years agoMinor bugfix for macro invocation path resolution.
Jeffrey Seyfried [Mon, 12 Dec 2016 10:09:22 +0000 (10:09 +0000)]
Minor bugfix for macro invocation path resolution.

7 years agoresolve: clean up diagnostics for name conflicts.
Jeffrey Seyfried [Mon, 12 Dec 2016 08:17:47 +0000 (08:17 +0000)]
resolve: clean up diagnostics for name conflicts.

7 years agoOptimize `ast::PathSegment`.
Jeffrey Seyfried [Sat, 10 Dec 2016 06:45:58 +0000 (06:45 +0000)]
Optimize `ast::PathSegment`.

7 years agoAuto merge of #38072 - nikomatsakis:bootstrap-incremental, r=acrichto
bors [Mon, 19 Dec 2016 20:07:49 +0000 (20:07 +0000)]
Auto merge of #38072 - nikomatsakis:bootstrap-incremental, r=acrichto

add preliminary support for incremental compilation to rustbuild.py

This implements the integration described in #37929. It requires the use of a local nightly as your bootstrap compiler. The setup is described in `src/bootstrap/README.md`.

This does NOT implement the "copy stage0 libs to stage1" optimization described in #37929, just because that seems orthogonal to me.

In local testing, I do not yet see any incremental re-use when building rustc. I'm not sure why that is, more investigation needed.

(For these reasons, this is not marked as fixing the relevant issue.)

r? @alexcrichton -- I included one random cleanup (`Step::noop()`) that turned out to not be especially relevant. Feel free to tell me you liked it better the old way.

7 years agotravis: Fix the cargotest bot
Alex Crichton [Mon, 19 Dec 2016 19:40:36 +0000 (11:40 -0800)]
travis: Fix the cargotest bot

Recently the Cargo revision running on cargotest was updated in #38051, and the
updated version of Cargo pulls in the openssl-sys 0.9 crate instead of the old
openssl-sys 0.7 crate. The 0.9 release of openssl-sys has slightly different
requirements and logic for detecting OpenSSL, namely it requires `pkg-config` to
be present on Linux typically.

This commit fixes this problem by installing pkg-config in the cargotest
container that's running on the bots. This in turn should hopefully fix the
build script and allow it to find the already-installed local OpenSSL libraries.

7 years agoDon't try get local DefId of imported macro in rustdoc.
Michael Woerister [Mon, 19 Dec 2016 19:24:33 +0000 (14:24 -0500)]
Don't try get local DefId of imported macro in rustdoc.

7 years agoadd and document `--incremental` flag along with misc other changes
Niko Matsakis [Wed, 16 Nov 2016 23:02:56 +0000 (18:02 -0500)]
add and document `--incremental` flag along with misc other changes

For example:

- we now support `-vv` to get very verbose output.
- RUSTFLAGS is respected by `x.py`
- better error messages for some cases

7 years agoadd concept of `Step::noop()`
Niko Matsakis [Wed, 16 Nov 2016 22:37:20 +0000 (17:37 -0500)]
add concept of `Step::noop()`

7 years agoAuto merge of #38405 - alexcrichton:rustbuild-fixes, r=japaric
bors [Mon, 19 Dec 2016 15:36:15 +0000 (15:36 +0000)]
Auto merge of #38405 - alexcrichton:rustbuild-fixes, r=japaric

rustbuild: Fix `copy` helper with existing files

This erroneously truncated files when the destination already existed and was an
existing hard link to the source. This in turn caused weird bugs!

Closes #37745

7 years agoAuto merge of #38466 - sanxiyn:rollup, r=sanxiyn
bors [Mon, 19 Dec 2016 12:17:24 +0000 (12:17 +0000)]
Auto merge of #38466 - sanxiyn:rollup, r=sanxiyn

Rollup of 9 pull requests

- Successful merges: #38334, #38397, #38413, #38421, #38422, #38433, #38438, #38445, #38459
- Failed merges:

7 years agoRollup merge of #38459 - nagisa:rustbuild-exec, r=alexcrichton
Seo Sanghyeon [Mon, 19 Dec 2016 07:59:44 +0000 (16:59 +0900)]
Rollup merge of #38459 - nagisa:rustbuild-exec, r=alexcrichton

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.

I also took liberty to change the fallback error code from `1` to `0xfe` (now only relevant on windows) so that when people complain about “compiler exited with code 254”, its obvious where the issue lies (wrapper losing the exit code somehow).

r? @alexcrichton

7 years agoRollup merge of #38445 - est31:master, r=apasel422
Seo Sanghyeon [Mon, 19 Dec 2016 07:59:44 +0000 (16:59 +0900)]
Rollup merge of #38445 - est31:master, r=apasel422

stage0.txt: typo fix

7 years agoRollup merge of #38438 - alexcrichton:update-beta, r=brson
Seo Sanghyeon [Mon, 19 Dec 2016 07:59:43 +0000 (16:59 +0900)]
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.

7 years agoRollup merge of #38433 - GuillaumeGomez:thread_docs, r=frewsxcv
Seo Sanghyeon [Mon, 19 Dec 2016 07:59:41 +0000 (16:59 +0900)]
Rollup merge of #38433 - GuillaumeGomez:thread_docs, r=frewsxcv

Thread docs

r? @frewscvx

7 years agoRollup merge of #38422 - zackmdavis:enjoy_tidy_path_error_macro_nicety, r=bluss
Seo Sanghyeon [Mon, 19 Dec 2016 07:59:40 +0000 (16:59 +0900)]
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.

7 years agoRollup merge of #38421 - apasel422:issue-36934, r=alexcrichton
Seo Sanghyeon [Mon, 19 Dec 2016 07:59:38 +0000 (16:59 +0900)]
Rollup merge of #38421 - apasel422:issue-36934, r=alexcrichton

Replace invalid use of `&mut` with `UnsafeCell` in `std::sync::mpsc`

Closes #36934

r? @alexcrichton

7 years agoRollup merge of #38413 - rillian:armv7-neon, r=alexcrichton
Seo Sanghyeon [Mon, 19 Dec 2016 07:59:37 +0000 (16:59 +0900)]
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.

7 years agoRollup merge of #38397 - frewsxcv:platform-specific-process-exit, r=alexcrichton
Seo Sanghyeon [Mon, 19 Dec 2016 07:59:36 +0000 (16:59 +0900)]
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.

7 years agoRollup merge of #38334 - frewsxcv:BuildHasherDefault, r=GuillaumeGomez
Seo Sanghyeon [Mon, 19 Dec 2016 07:59:35 +0000 (16:59 +0900)]
Rollup merge of #38334 - frewsxcv:BuildHasherDefault, r=GuillaumeGomez

Rewrite, improve documentation for `core::hash::BuildHasherDefault`.

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

7 years agoAuto merge of #38411 - japaric:gh38406, r=alexcrichton
bors [Mon, 19 Dec 2016 07:52:42 +0000 (07:52 +0000)]
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)

7 years agoAuto merge of #38194 - sgrif:sg-no-span-mangling, r=nrc
bors [Mon, 19 Dec 2016 04:39:18 +0000 (04:39 +0000)]
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.

7 years agoFrom<[u16; 8]> for Ipv6Addr.
Clar Charr [Fri, 2 Dec 2016 17:18:01 +0000 (12:18 -0500)]
From<[u16; 8]> for Ipv6Addr.

7 years agotarget spec: add an asm-args field to pass arguments to the external ..
Jorge Aparicio [Mon, 19 Dec 2016 03:25:46 +0000 (22:25 -0500)]
target spec: add an asm-args field to pass arguments to the external ..

assembler

7 years agoAuto merge of #38140 - jseyfried:proc_macro_visibility, r=nrc
bors [Mon, 19 Dec 2016 01:23:32 +0000 (01:23 +0000)]
Auto merge of #38140 - jseyfried:proc_macro_visibility, r=nrc

Require `#[proc_macro_derive]` functions to be `pub`

r? @nrc

7 years agoGive extern crates' root modules a better name.
Jeffrey Seyfried [Tue, 6 Dec 2016 06:25:41 +0000 (06:25 +0000)]
Give extern crates' root modules a better name.

7 years agoRefactor out `mark.as_placeholder_id()`.
Jeffrey Seyfried [Thu, 1 Dec 2016 22:49:32 +0000 (22:49 +0000)]
Refactor out `mark.as_placeholder_id()`.

7 years agoAvoid including attributes in bang macro invocations.
Jeffrey Seyfried [Thu, 1 Dec 2016 11:54:01 +0000 (11:54 +0000)]
Avoid including attributes in bang macro invocations.

7 years agoRemove scope placeholders, remove method `add_macro` of `ext::base::Resolver`.
Jeffrey Seyfried [Thu, 1 Dec 2016 11:20:04 +0000 (11:20 +0000)]
Remove scope placeholders, remove method `add_macro` of `ext::base::Resolver`.

7 years agoRemove `MacroDef`'s fields `imported_from` and `allow_internal_unstable`,
Jeffrey Seyfried [Tue, 29 Nov 2016 23:36:27 +0000 (23:36 +0000)]
Remove `MacroDef`'s fields `imported_from` and `allow_internal_unstable`,
remove `export` argument of `resolver.add_macro()`.

7 years agoCanonicalize lifetime names.
Jeffrey Seyfried [Sat, 26 Nov 2016 12:48:46 +0000 (12:48 +0000)]
Canonicalize lifetime names.

7 years agoRename `ModuleS` -> `ModuleData`.
Jeffrey Seyfried [Sat, 26 Nov 2016 12:47:52 +0000 (12:47 +0000)]
Rename `ModuleS` -> `ModuleData`.

7 years agoDe-genericize `try_define`.
Jeffrey Seyfried [Tue, 29 Nov 2016 02:53:00 +0000 (02:53 +0000)]
De-genericize `try_define`.

7 years agoAdd `ident.unhygienize()` and use `Ident` more instead of `Name` in `resolve`.
Jeffrey Seyfried [Tue, 29 Nov 2016 02:07:12 +0000 (02:07 +0000)]
Add `ident.unhygienize()` and use `Ident` more instead of `Name` in `resolve`.

7 years agoRemove some unused functions and fix formatting.
Jeffrey Seyfried [Tue, 29 Nov 2016 02:07:02 +0000 (02:07 +0000)]
Remove some unused functions and fix formatting.

7 years agoFix the path resolutions of glob imports.
Jeffrey Seyfried [Fri, 2 Dec 2016 23:10:44 +0000 (23:10 +0000)]
Fix the path resolutions of glob imports.

7 years agoImplement `fmt::Debug` for all structures in libstd.
Corey Farwell [Fri, 25 Nov 2016 18:21:49 +0000 (13:21 -0500)]
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.

7 years agoAuto merge of #38051 - sanxiyn:unused-type-alias-3, r=eddyb
bors [Sun, 18 Dec 2016 22:06:34 +0000 (22:06 +0000)]
Auto merge of #38051 - sanxiyn:unused-type-alias-3, r=eddyb

 Warn unused type aliases, reimplemented

Reimplementation of #37631. Fix #37455.

7 years agoUse exec for the wrapper on UNIXes
Simonas Kazlauskas [Sun, 18 Dec 2016 21:45:39 +0000 (23:45 +0200)]
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.

7 years agoDocument platform-specific differences for `std::process::exit`.
Corey Farwell [Thu, 15 Dec 2016 21:07:37 +0000 (16:07 -0500)]
Document platform-specific differences for `std::process::exit`.

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

7 years agoOpenBSD has two stdc++ libraries: use the newer
Sébastien Marie [Sun, 18 Dec 2016 17:31:42 +0000 (18:31 +0100)]
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.

7 years agoAuto merge of #38369 - aturon:stab-1.15, r=alexcrichton
bors [Sun, 18 Dec 2016 17:37:25 +0000 (17:37 +0000)]
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

7 years agoUpdate commit hash in cargotest
Seo Sanghyeon [Thu, 8 Dec 2016 06:59:40 +0000 (15:59 +0900)]
Update commit hash in cargotest

7 years agoFix Windows
Seo Sanghyeon [Thu, 15 Dec 2016 09:47:05 +0000 (18:47 +0900)]
Fix Windows

7 years agoAdd missing urls for thread doc module
Guillaume Gomez [Sat, 17 Dec 2016 17:09:05 +0000 (18:09 +0100)]
Add missing urls for thread doc module

7 years agoAuto merge of #37429 - camlorn:univariant_layout_optimization, r=eddyb
bors [Sun, 18 Dec 2016 07:59:32 +0000 (07:59 +0000)]
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

7 years agoAuto merge of #38440 - alexcrichton:fix-osx-nightlies, r=brson
bors [Sun, 18 Dec 2016 04:38:27 +0000 (04:38 +0000)]
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]: https://github.com/rust-lang/rust/blob/4a008cccaabc8b3fe65ccf5868b9d16319c9ac58/src/librustc_trans/back/linker.rs#L210-L214
[does not pass]: https://github.com/rust-lang/rust/blob/4a008cccaabc8b3fe65ccf5868b9d16319c9ac58/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

7 years agostage0.txt: typo fix
est31 [Sun, 18 Dec 2016 02:12:18 +0000 (03:12 +0100)]
stage0.txt: typo fix

7 years agoAuto merge of #38439 - alexcrichton:fix-nightlies, r=brson
bors [Sun, 18 Dec 2016 01:07:35 +0000 (01:07 +0000)]
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.

7 years agorustbuild: Fix LC_ID_DYLIB directives on OSX
Alex Crichton [Sat, 17 Dec 2016 22:11:02 +0000 (14:11 -0800)]
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]: https://github.com/rust-lang/rust/blob/4a008cccaabc8b3fe65ccf5868b9d16319c9ac58/src/librustc_trans/back/linker.rs#L210-L214
[does not pass]: https://github.com/rust-lang/rust/blob/4a008cccaabc8b3fe65ccf5868b9d16319c9ac58/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

7 years agorustbuild: Create directories in mingw dist
Alex Crichton [Sat, 17 Dec 2016 21:51:51 +0000 (13:51 -0800)]
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.

7 years agoAuto merge of #38279 - KalitaAlexey:issue-8521, r=jseyfried
bors [Sat, 17 Dec 2016 21:49:51 +0000 (21:49 +0000)]
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.

7 years agoUpdate beta bootstrap compiler
Alex Crichton [Sat, 17 Dec 2016 21:47:31 +0000 (13:47 -0800)]
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.

7 years agolet BSD to use gmake for GNU-make
Sébastien Marie [Sat, 17 Dec 2016 19:09:23 +0000 (20:09 +0100)]
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

7 years agodisable run-pass/backtrace for openbsd
Sébastien Marie [Sat, 17 Dec 2016 19:01:05 +0000 (20:01 +0100)]
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.

7 years agoAuto merge of #38122 - brson:book-rustup, r=steveklabnik
bors [Sat, 17 Dec 2016 17:25:30 +0000 (17:25 +0000)]
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

7 years agoMinor fix in the merge_sort comments
Stjepan Glavina [Sat, 17 Dec 2016 16:36:33 +0000 (17:36 +0100)]
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`.

7 years agoDisconnect ar from cc on OpenBSD
Sébastien Marie [Sat, 17 Dec 2016 10:22:41 +0000 (11:22 +0100)]
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.

7 years agoAuto merge of #38419 - alexcrichton:travis-osx-32-bit, r=brson
bors [Sat, 17 Dec 2016 11:10:11 +0000 (11:10 +0000)]
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.

7 years agoAuto merge of #38205 - jseyfried:fix_module_directory_regression, r=eddyb
bors [Sat, 17 Dec 2016 06:43:16 +0000 (06:43 +0000)]
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

7 years agoAddress fallout
Aaron Turon [Wed, 14 Dec 2016 21:02:00 +0000 (13:02 -0800)]
Address fallout

7 years agotidy features: use 2-parameter form of internal try macro for open err
Zack M. Davis [Sat, 17 Dec 2016 01:45:59 +0000 (17:45 -0800)]
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.

7 years agoRemove some more things that were only needed for inlined-HIR DefIds
Michael Woerister [Sat, 17 Dec 2016 01:11:59 +0000 (20:11 -0500)]
Remove some more things that were only needed for inlined-HIR DefIds

7 years agoReplace invalid use of `&mut` with `UnsafeCell` in `std::sync::mpsc`
Andrew Paseltiner [Fri, 16 Dec 2016 23:10:09 +0000 (18:10 -0500)]
Replace invalid use of `&mut` with `UnsafeCell` in `std::sync::mpsc`

Closes #36934