Commit Graph

59792 Commits

Author SHA1 Message Date
Mark-Simulacrum ed989d39a1 Simple cleanups/inlines in cleanup 2016-12-20 20:02:48 -07:00
Mark-Simulacrum 86b2bdb435 Rename LandingPad to Funclet
Changes internal storage to direct field values instead of Options,
since both fields are always either set or not set.
2016-12-20 20:02:48 -07:00
Mark-Simulacrum 8f3d824cc7 Remove common::Block. 2016-12-20 20:02:46 -07:00
Mark-Simulacrum 3dbd141b8c Remove unused map_block 2016-12-20 20:01:41 -07:00
Mark-Simulacrum fec59c5f73 Replace lpad().and_then(..) with None 2016-12-20 20:01:41 -07:00
Mark-Simulacrum ad0a901d37 Remove *_builder 2016-12-20 20:01:40 -07:00
Mark-Simulacrum e77d928990 Add notes regarding malloc_raw_dyn being unwind incompatible 2016-12-20 20:01:40 -07:00
Mark-Simulacrum 59ef51c12a Replace build.rs with calling functions on builder directly 2016-12-20 20:01:40 -07:00
Mark-Simulacrum 3f17ab9618 Remove unreachable and terminated from Block 2016-12-20 20:01:40 -07:00
Mark-Simulacrum bf7d4534a7 Refactor Block into BlockAndBuilder 2016-12-20 20:01:40 -07:00
Alex Crichton 839b6961b0 mk: Fix compile with makefiles
A tweak was made to dependencies in #38451 but the makefiles weren't updated to
accompany this. Instead of trying to integerate the `build_helper` crate into
the makefiles (which currently isn't present) this commit takes the approach of
just duplicating the required logic, which should be small enough for now.
2016-12-20 18:51:54 -08:00
bors 164619a8cf Auto merge of #38499 - alexcrichton:rollup, r=alexcrichton
Rollup of 29 pull requests

- Successful merges: #37761, #38006, #38131, #38150, #38158, #38171, #38208, #38215, #38236, #38245, #38289, #38302, #38315, #38346, #38388, #38395, #38398, #38418, #38432, #38451, #38463, #38468, #38470, #38471, #38472, #38478, #38486, #38493, #38498
- Failed merges: #38271, #38483
2016-12-20 22:21:53 +00:00
Alex Crichton d5f1c6e67c Merge remote-tracking branch 'origin/master' into rollup 2016-12-20 14:20:44 -08:00
Alex Crichton 214a6c6166 Fix compile errors and such 2016-12-20 14:09:50 -08:00
Alex Crichton 0cf7d5dcae Merge branch 'rfc_1560_warning_cycle' of https://github.com/jseyfried/rust into rollup
Conflicts:
	src/librustc_resolve/lib.rs
	src/librustc_resolve/resolve_imports.rs
2016-12-20 13:00:16 -08:00
Alex Crichton 5f1ecb0fdc Merge branch 'fix_closure_debuginfo' of https://github.com/camlorn/rust into rollup
Conflicts:
	src/librustc_trans/mir/mod.rs
2016-12-20 12:59:14 -08:00
Alex Crichton 6b8dda5c7e Merge branch 'local-sccache' of https://github.com/alexcrichton/rust into rollup 2016-12-20 12:59:14 -08:00
Alex Crichton 7b8cbbe092 Merge branch 'rustbuild-warnings' of https://github.com/alexcrichton/rust into rollup 2016-12-20 12:59:13 -08:00
Alex Crichton 00fdc0ce84 Rollup merge of #38498 - alexcrichton:actually-test-musl, r=brson
rustbuild: Actually test musl on the musl bot

A typo unfortunately meant that we haven't been testing musl for a bit, so now
it's time to discover if we accidentally introduced a regression!
2016-12-20 12:59:12 -08:00
Alex Crichton c188635a2a Rollup merge of #38493 - sanxiyn:filecheck, r=alexcrichton
Find FileCheck using llvm-config

This allows using system LLVM from Debian package to run codegen tests.

Fix #36282.

r? @alexcrichton
2016-12-20 12:59:11 -08:00
Alex Crichton 10bb4a4801 Rollup merge of #38486 - est31:master, r=petrochenkov
Add regression test for #38458

Closes #38458
2016-12-20 12:59:11 -08:00
Alex Crichton 802784d89b Rollup merge of #38478 - brson:bump, r=alexcrichton
Bump version to 1.16
2016-12-20 12:59:10 -08:00
Alex Crichton 6737f1abcf 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.
2016-12-20 12:59:10 -08:00
Alex Crichton da73b4e40b 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.
2016-12-20 12:59:09 -08:00
Alex Crichton 1509155f4d 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.
2016-12-20 12:59:09 -08:00
Alex Crichton 6e2a901930 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
2016-12-20 12:59:08 -08:00
Alex Crichton cade120da3 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
2016-12-20 12:59:07 -08:00
Alex Crichton 60842c1c1f 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
2016-12-20 12:59:07 -08:00
Alex Crichton a8e7f9530a 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
2016-12-20 12:59:06 -08:00
Alex Crichton 21f33dbf71 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
2016-12-20 12:59:05 -08:00
Alex Crichton 210411105e 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.
2016-12-20 12:59:05 -08:00
Alex Crichton 55b8660b67 Rollup merge of #38395 - tshepang:nit, r=steveklabnik
rustdoc: a formatting nit
2016-12-20 12:59:04 -08:00
Alex Crichton 08741494db 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`
2016-12-20 12:59:03 -08:00
Alex Crichton adfafffce8 Rollup merge of #38346 - GuillaumeGomez:duration_doc, r=frewsxcv
Duration doc

r? @frewsxcv
2016-12-20 12:59:03 -08:00
Alex Crichton a7710eff06 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.
2016-12-20 12:59:02 -08:00
Alex Crichton dfa9948d76 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
2016-12-20 11:16:30 -08:00
Alex Crichton 2f4ca4e2df 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.
2016-12-20 11:16:29 -08:00
Alex Crichton 4cfb2b48fe Rollup merge of #38236 - GuillaumeGomez:unix_socket_doc, r=frewsxcv
Unix socket doc

r? @frewsxcv
2016-12-20 11:16:26 -08:00
Alex Crichton 70e1275a1a Rollup merge of #38215 - liigo:patch-12, r=petrochenkov
minor fix about visibility in reference
2016-12-20 11:16:25 -08:00
Alex Crichton b070feb440 Rollup merge of #38208 - frewsxcv:btreesetdocs, r=alexcrichton
Improvements to `BTreeSet` documentation.

None
2016-12-20 11:16:24 -08:00
Alex Crichton 551cb0646f Rollup merge of #38171 - jseyfried:cleanup, r=nrc
Miscellaneous cleanup/refactoring in `resolve` and `syntax::ext`

r? @nrc
2016-12-20 11:16:23 -08:00
Alex Crichton 58d58c24dc Rollup merge of #38158 - sourcefrog:doc-iter, r=GuillaumeGomez
Explain meaning of Result iters and link to factory functions
2016-12-20 11:16:22 -08:00
Alex Crichton 2fb2d307e0 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.
2016-12-20 11:16:20 -08:00
Alex Crichton 65e9691cef 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.
2016-12-20 11:16:19 -08:00
Alex Crichton 68dd6fd964 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.
2016-12-20 11:16:17 -08:00
Alex Crichton 7fe44f77f4 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.
2016-12-20 11:16:17 -08:00
Corey Farwell fe0d0927f7 Indicate that `BTreeSet::iter` returns values in ascending order.
Fixes https://github.com/rust-lang/rust/issues/38204.
2016-12-20 10:44:33 -08:00
Alex Crichton 70ef94db22 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.
2016-12-20 10:21:19 -08:00
Alex Crichton 49546cc6bb rustbuild: Actually test musl on the musl bot
A typo unfortunately meant that we haven't been testing musl for a bit, so now
it's time to discover if we accidentally introduced a regression!
2016-12-20 10:19:02 -08:00
bors 3038f30f96 Auto merge of #38271 - jseyfried:rfc_1560_warning_cycle, r=nrc
resolve: change most backwards incompatible ambiguity errors to `legacy_imports` warnings

Fixes #38176.
r? @nrc or @nikomatsakis
2016-12-20 17:44:15 +00:00