Commit Graph

60917 Commits

Author SHA1 Message Date
Steve Klabnik
4b52600b15 update mailmap for @pliniker 2017-01-31 13:19:03 -05:00
bors
24055d0f2a Auto merge of #39379 - segevfiner:fix-backtraces-on-i686-pc-windows-gnu, r=alexcrichton
Fix backtraces on i686-pc-windows-gnu by disabling FPO

This might have performance implications. But do note that MSVC
disables FPO by default nowadays and it's use is limited in exception
heavy languages like C++.

See discussion in: #39234
Closes: #28218
2017-01-31 11:18:22 +00:00
bors
cd692cc7ec Auto merge of #39354 - alexcrichton:less-output, r=steveklabnik
rustdoc: Suppress warnings/errors with --test

Threads spawned by the test framework have their output captured by default, so
for `rustdoc --test` threads this propagates that capturing to the spawned
thread that we now have.

Closes #39327
2017-01-31 08:44:07 +00:00
bors
0c85f2a1bd Auto merge of #38847 - michaelwoerister:gate-on-incr-comp, r=alexcrichton
travis: Gate on some minimal support for incremental compilation.

This commit adds a travis job that

1. builds a stage2 compiler in incremental mode (but with empty incremental compilation cache), and
2. builds and runs the run-pass test suite also in incremental mode.

Building incrementally with an empty cache makes sure that the compiler doesn't crash in dependency tracking during bootstrapping. Executing the incrementally built test suite gives some measure of confidence that we generate valid code.

Note, however, that the above does not give strong guarantees about the validity of incremental compilation, it just provides a basis for being able to rely on from-scratch incr. comp. builds as reference values in further tests (which then do actual incremental compilation).

r? @alexcrichton
2017-01-31 06:13:05 +00:00
bors
b854d74bb8 Auto merge of #39250 - cseale:issue_30924, r=est31
[Gate Tests] - marking feature tests

Removal of the lang feature gate tests whitelist #39059

r? @est31
2017-01-31 03:28:12 +00:00
Colm Seale
94e9086685 [Gate Tests] - marking feature tests
Removal of the lang feature gate tests whitelist #39059

r? @est31
2017-01-31 00:24:06 +00:00
bors
8e9e055276 Auto merge of #39230 - petrochenkov:nobox, r=eddyb
Refactoring TyBox -> TyAdt

r? @eddyb
cc @Manishearth
2017-01-31 00:02:15 +00:00
Michael Woerister
d292e1229f compiletest: Clear RUSTFLAGS env-var for run-make tests. 2017-01-30 15:38:11 -05:00
Vadim Petrochenkov
93e3f634b0 Fix debuginfo scope issue with Box 2017-01-30 23:18:29 +03:00
Vadim Petrochenkov
a5d725cc82 cleanup: Refactor away DtorKind 2017-01-30 23:18:22 +03:00
Vadim Petrochenkov
4a4f8ff0a3 Implement Drop for Box 2017-01-30 23:14:15 +03:00
Vadim Petrochenkov
ffba0cea62 Merge ty::TyBox into ty::TyAdt 2017-01-30 23:14:15 +03:00
bors
8921707653 Auto merge of #39368 - alexcrichton:fix-upload-dirs, r=aturon
travis: Tweak artifact uploads

* Don't upload `*.wixpdb` files by accident
* Don't upload `doc` dir by accident
* Fix level of indirection on Travis
2017-01-30 19:43:08 +00:00
Alex Crichton
45d203df30 travis: Tweak artifact uploads
* Don't upload `*.wixpdb` files by accident
* Don't upload `doc` dir by accident
* Fix level of indirection on Travis
2017-01-30 08:56:30 -08:00
bors
55f9712d14 Auto merge of #39407 - GuillaumeGomez:convert_module, r=frewsxcv
Add missing url in convert module

r? @frewsxcv
2017-01-30 13:16:57 +00:00
bors
c8699376cd Auto merge of #39405 - tshepang:nits, r=sfackler
doc: minor Option improvements
2017-01-30 06:45:13 +00:00
Tshepang Lekhonkhobe
4814fa488e doc: minor Option improvements 2017-01-30 08:39:03 +02:00
bors
15ad83f1d9 Auto merge of #39389 - Wilfred:patch-2, r=apasel422
Minor grammar fix 'can not' -> 'cannot'

The previous version suggested that the compiler chooses not to check, rather than being unable to check.
2017-01-30 02:47:06 +00:00
bors
4ef2c3e075 Auto merge of #39392 - ishitatsuyuki:master, r=alexcrichton
Bootstrap: append libjemalloc_pic.a

Fix #35349
2017-01-30 00:17:57 +00:00
Guillaume Gomez
19c9f18b2c Add missing url in convert module 2017-01-29 23:33:12 +01:00
bors
d01e22e53f Auto merge of #39382 - cuviper:ibm-rewind, r=alexcrichton
travis: move IBM backwards in time

Using Ubuntu's cross-toolchains for powerpc* and s390x meant they were
depending on glibc symbols from Ubuntu 16.04. And if that host is ever
updated to a new release, the toolchains would raise the bar too.

This switches powerpc, powerpc64, and s390x to use crosstool-ng
toolchains, configured approximately like RHEL6 with kernel 2.6.32 and
glibc 2.12. This ABI level should also be compatible with Debian 7
(wheezy) and Ubuntu 12.04 (precise).

For powerpc64le, the challenge was that only glibc-2.19 officially added
support, but RHEL7 backported those changes to glibc-2.17. The backport
patches are complex and numerous, so instead of trying to push those
into crosstool-ng, this just uses glibc binaries directly from CentOS 7
and builds the toolchain manually.

This is ported from rust-lang/rust-buildbot#149.

r? @alexcrichton
2017-01-29 21:28:28 +00:00
Tatsuyuki Ishi
149242e519 Bootstrap: append libjemalloc_pic.a
Fix #35349
2017-01-29 20:35:11 +09:00
Wilfred Hughes
87bbb3c738 Minor grammar fix 'can not' -> 'cannot'
The previous version suggested that the compiler chooses not to check, rather than being unable to check.
2017-01-29 10:51:26 +00:00
bors
4be49e1937 Auto merge of #39378 - jtxx000:master, r=eddyb
Fix typo in librustc_trans/collector.rs
2017-01-29 09:05:53 +00:00
bors
b37edea656 Auto merge of #39380 - est31:remove_dead_peq, r=jseyfried
Remove dead recursive partial eq impl

Its nowhere used (if it had been used used, the rust stack would have overflown
due to the recursion). Its presence was confusing for mrustc.

cc @thepowersgang
2017-01-29 06:20:33 +00:00
Josh Stone
cb47d9ffc3 Fix the powerpc64 PATH 2017-01-28 22:02:49 -08:00
Josh Stone
c051d2c8ad Add a license to build-powerpc64le-toolchain.sh 2017-01-28 21:41:35 -08:00
Josh Stone
23e8f70b46 travis: move IBM backwards in time
Using Ubuntu's cross-toolchains for powerpc* and s390x meant they were
depending on glibc symbols from Ubuntu 16.04. And if that host is ever
updated to a new release, the toolchains would raise the bar too.

This switches powerpc, powerpc64, and s390x to use crosstool-ng
toolchains, configured approximately like RHEL6 with kernel 2.6.32 and
glibc 2.12. This ABI level should also be compatible with Debian 7
(wheezy) and Ubuntu 12.04 (precise).

For powerpc64le, the challenge was that only glibc-2.19 officially added
support, but RHEL7 backported those changes to glibc-2.17. The backport
patches are complex and numerous, so instead of trying to push those
into crosstool-ng, this just uses glibc binaries directly from CentOS 7
and builds the toolchain manually.

This is ported from rust-lang/rust-buildbot#149.

r? @alexcrichton
2017-01-28 21:25:11 -08:00
est31
7ed78fcbdf Remove dead recursive partial eq impl
Its nowhere used (if it had been used used, the rust stack would have overflown
due to the recursion). Its presence was confusing for mrustc.
2017-01-29 06:07:45 +01:00
Segev Finer
3f1d3948d6 Fix backtraces on i686-pc-windows-gnu by disabling FPO
This might have performance implications. But do note that MSVC
disables FPO by default nowadays and it's use is limited in exception
heavy languages like C++.

Closes: #28218
2017-01-29 06:46:42 +02:00
Caleb Reach
7e73884941 Fix typo in librustc_trans/collector.rs 2017-01-28 23:02:31 -05:00
bors
f39f273826 Auto merge of #39375 - seeekr:patch-1, r=apasel422
Fix typo in liballoc/lib.rs
2017-01-28 23:14:22 +00:00
Denis Andrejew
339bdc158f Fix typo in liballoc/lib.rs 2017-01-28 22:16:16 +00:00
bors
1491e04259 Auto merge of #39234 - segevfiner:fix-backtraces-on-windows-gnu, r=petrochenkov
Make backtraces work on Windows GNU targets again.

This is done by adding a function that can return a filename
to pass to backtrace_create_state. The filename is obtained in
a safe way by first getting the filename, locking the file so it can't
be moved, and then getting the filename again and making sure it's the same.

See: https://github.com/rust-lang/rust/pull/37359#issuecomment-260123399
Issue: #33985

Note though that this isn't that pretty...

I had to implement a `WideCharToMultiByte` wrapper function to convert to the ANSI code page. This will work better than only allowing ASCII provided that the ANSI code page is set to the user's local language, which is often the case.

Also, please make sure that I didn't break the Unix build.
2017-01-28 20:32:56 +00:00
Segev Finer
ab21314c3f Disable backtrace tests on i686-pc-windows-gnu since it's broken by FPO 2017-01-28 21:52:31 +02:00
bors
c81c1d6a41 Auto merge of #39360 - osa1:typos, r=GuillaumeGomez
Fix typos in libsyntax/tokenstream.rs
2017-01-28 14:13:00 +00:00
Ömer Sinan Ağacan
15411fb0fa Fix typos in libsyntax/tokenstream.rs 2017-01-28 17:00:43 +03:00
bors
010c3e25c4 Auto merge of #39340 - GuillaumeGomez:empty_comment, r=frewsxcv
Don't generate doc if doc comments only filled with 'white' characters

Fixes #39339.

r? @steveklabnik

cc @rust-lang/docs
2017-01-28 09:41:40 +00:00
bors
0f49616a53 Auto merge of #39305 - eddyb:synelide, r=nikomatsakis
Perform lifetime elision (more) syntactically, before type-checking.

The *initial* goal of this patch was to remove the (contextual) `&RegionScope` argument passed around `rustc_typeck::astconv` and allow converting arbitrary (syntactic) `hir::Ty` to (semantic) `Ty`.
I've tried to closely match the existing behavior while moving the logic to the earlier `resolve_lifetime` pass, and [the crater report](https://gist.github.com/eddyb/4ac5b8516f87c1bfa2de528ed2b7779a) suggests none of the changes broke real code, but I will try to list everything:

There are few cases in lifetime elision that could trip users up due to "hidden knowledge":
```rust
type StaticStr = &'static str; // hides 'static
trait WithLifetime<'a> {
    type Output; // can hide 'a
}

// This worked because the type of the first argument contains
// 'static, although StaticStr doesn't even have parameters.
fn foo(x: StaticStr) -> &str { x }

// This worked because the compiler resolved the argument type
// to <T as WithLifetime<'a>>::Output which has the hidden 'a.
fn bar<'a, T: WithLifetime<'a>>(_: T::Output) -> &str { "baz" }
```

In the two examples above, elision wasn't using lifetimes that were in the source, not even *needed* by paths in the source, but rather *happened* to be part of the semantic representation of the types.
To me, this suggests they should have never worked through elision (and they don't with this PR).

Next we have an actual rule with a strange result, that is, the return type here elides to `&'x str`:
```rust
impl<'a, 'b> Trait for Foo<'a, 'b> {
    fn method<'x, 'y>(self: &'x Foo<'a, 'b>, _: Bar<'y>) -> &str {
        &self.name
    }
}
```
All 3 of `'a`, `'b` and `'y` are being ignored, because the `&self` elision rule only cares that the first argument is "`self` by reference". Due implementation considerations (elision running before typeck), I've limited it in this PR to a reference to a primitive/`struct`/`enum`/`union`, but not other types, but I am doing another crater run to assess the impact of limiting it to literally `&self` and `self: &Self` (they're identical in HIR).

It's probably ideal to keep an "implicit `Self` for `self`" type around and *only* apply the rule to `&self` itself, but that would result in more bikeshed, and #21400 suggests some people expect otherwise.
Another decent option is treating `self: X, ... -> Y` like `X -> Y` (one unique lifetime in `X` used for `Y`).

The remaining changes have to do with "object lifetime defaults" (see RFCs [599](https://github.com/rust-lang/rfcs/blob/master/text/0599-default-object-bound.md) and [1156](https://github.com/rust-lang/rfcs/blob/master/text/1156-adjust-default-object-bounds.md)):
```rust
trait Trait {}
struct Ref2<'a, 'b, T: 'a+'b>(&'a T, &'b T);

// These apply specifically within a (fn) body,
// which allows type and lifetime inference:
fn main() {
    // Used to be &'a mut (Trait+'a) - where 'a is one
    // inference variable - &'a mut (Trait+'b) in this PR.
    let _: &mut Trait;

    // Used to be an ambiguity error, but in this PR it's
    // Ref2<'a, 'b, Trait+'c> (3 inference variables).
    let _: Ref2<Trait>;
}
```
What's happening here is that inference variables are created on the fly by typeck whenever a lifetime has no resolution attached to it - while it would be possible to alter the implementation to reuse inference variables based on decisions made early by `resolve_lifetime`, not doing that is more flexible and works better - it can compile all testcases from #38624 by not ending up with `&'static mut (Trait+'static)`.

The ambiguity specifically cannot be an early error, because this is only the "default" (typeck can still pick something better based on the definition of `Trait` and whether it has any lifetime bounds), and having an error at all doesn't help anyone, as we can perfectly infer an appropriate lifetime inside the `fn` body.

**TODO**: write tests for the user-visible changes.

cc @nikomatsakis @arielb1
2017-01-28 06:21:23 +00:00
bors
0f8a296475 Auto merge of #39353 - alexcrichton:rollup, r=alexcrichton
Rollup of 21 pull requests

- Successful merges: #38617, #39284, #39285, #39290, #39302, #39305, #39306, #39307, #39311, #39313, #39314, #39321, #39325, #39332, #39335, #39344, #39345, #39346, #39348, #39350, #39351
- Failed merges:
2017-01-28 02:50:51 +00:00
Eduard-Mihai Burtescu
c0e474d9a6 test: add missing lifetime in recently added test. 2017-01-28 02:56:46 +02:00
Eduard-Mihai Burtescu
9a0af1638a rustc: remove unused bounds field from RegionParameterDef. 2017-01-28 02:56:46 +02:00
Eduard-Mihai Burtescu
4eac052a33 rustc: move object default lifetimes to resolve_lifetimes. 2017-01-28 02:56:46 +02:00
Eduard-Mihai Burtescu
c5befdc630 rustc: always keep an explicit lifetime in trait objects. 2017-01-28 02:56:46 +02:00
Eduard-Mihai Burtescu
41553d6fbc rustc: lower trait type paths as TyTraitObject. 2017-01-28 02:56:46 +02:00
Eduard-Mihai Burtescu
9783947c2a rustc_typeck: move impl Trait checks out of RegionScope. 2017-01-28 02:56:46 +02:00
Eduard-Mihai Burtescu
ba1849daec rustc: move most of lifetime elision to resolve_lifetimes. 2017-01-28 02:56:46 +02:00
Eduard-Mihai Burtescu
bbc341424c rustc: simplify scope-tracking in resolve_lifetime. 2017-01-28 02:56:46 +02:00
Eduard-Mihai Burtescu
0682a75f44 rustc: clean up the style of middle::resolve_lifetime. 2017-01-28 02:56:46 +02:00
Eduard-Mihai Burtescu
7a2a669bb7 rustc: always include elidable lifetimes in HIR types. 2017-01-28 02:56:46 +02:00