Commit Graph

50488 Commits

Author SHA1 Message Date
Jeffrey Seyfried
845ad1b4ed Stop trying to resolve an import directive after the resolution fails 2016-02-17 23:55:00 +00:00
bors
57c357d891 Auto merge of #31680 - arielb1:fast-fulfill, r=nikomatsakis
this improves typeck performance by 5% (LLVM times are still huge).

Basically fixes #25916 (still O(n^2), but the example takes <1s to
compile).

r? @nikomatsakis
2016-02-16 22:35:09 +00:00
bors
9658645407 Auto merge of #31534 - jseyfried:restrict_noninline_mod, r=nikomatsakis
This PR disallows non-inline modules without path annotations that are either in a block or in an inline module whose containing file is not a directory owner (fixes #29765).
This is a [breaking-change].
r? @nikomatsakis
2016-02-16 19:34:57 +00:00
bors
18f8143530 Auto merge of #30714 - wesleywiser:fix_29914, r=arielb1
The issue was that the const evaluator was returning an error because
the feature flag const_indexing wasn't turned on. The error was then
reported as a bug.

Fixes #29914
2016-02-16 17:13:46 +00:00
bors
94ecd483e5 Auto merge of #31678 - JohanLorenzo:follow-up-31368, r=alexcrichton
Thanks for catching this @tamird. Here's a quick fix. I didn't pick "let the linker link dead code" or "link dead code" because it would add no extra information to the flag name. Here's a another proposal.

r? @alexcrichton
2016-02-16 15:12:40 +00:00
bors
4f86b8e732 Auto merge of #31675 - pitdicker:fs_metadata, r=alexcrichton
Because we no longer use `GetFileAttributesExW` FileAttr is never created directly from `WIN32_FILE_ATTRIBUTE_DATA` anymore. So we should no longer store FileAttr's attributes in that c struct.

r? @alexcrichton
Is this what you had in mind?
2016-02-16 13:09:55 +00:00
bors
8018280d6f Auto merge of #31672 - semarie:rmake-cxx, r=alexcrichton
use CXX value found at configure time inside run-make tests.

it permits OpenBSD to pass llvm-module-pass test (which use CXX
variable).

r? @alexcrichton
2016-02-16 11:10:30 +00:00
bors
0bf6394801 Auto merge of #31669 - frewsxcv:llvm-function-pass-rmake-test, r=alexcrichton
Part of https://github.com/rust-lang/rust/issues/31185.

Similar to https://github.com/rust-lang/rust/pull/31391.
2016-02-16 09:07:37 +00:00
bors
28bcafa456 Auto merge of #31668 - cuviper:lfs, r=alexcrichton
This follows the pattern already used for stat functions from #31551.  Now
`ftruncate`, `lseek`, and `readdir_r` use their explicit 64-bit variants for
LFS support, using wider `off_t` and `dirent` types.  This also updates to
`open64`, which uses no different types but implies the `O_LARGEFILE` flag.

Non-Linux platforms just map their normal functions to the 64-bit names.

r? @alexcrichton
2016-02-16 07:01:34 +00:00
Sébastien Marie
263de3d0e7 pass CXX to run-make
use CXX value found at configure time inside run-make tests.

it permits OpenBSD to pass llvm-module-pass test (which use CXX
variable).
2016-02-16 06:30:30 +01:00
bors
29e8ac5114 Auto merge of #31627 - KiChjang:unstable-lint, r=alexcrichton
Fixes #31122.
2016-02-16 05:16:55 +00:00
bors
23130720b3 Auto merge of #31639 - quodlibetor:doc-search-with-unknown-types, r=alexcrichton
This enables `*` in all type positions in doc searches, which I often
want in order to find functions that create or convert specific
types (e.g. `* -> vec`) but I don't actually know what kinds of input
they expect.

I actually started working on this because of #31598, but I've wanted it
several times when exploring new crates.
2016-02-16 03:03:35 +00:00
bors
13675a57c7 Auto merge of #31646 - Manishearth:rollup, r=Manishearth
- Successful merges: #31551, #31581, #31614, #31626, #31632, #31642
- Failed merges:
2016-02-15 22:41:02 +00:00
Johan Lorenzo
39c2d8534e Fix wrong help message left in #31368 2016-02-16 04:10:31 +05:30
Dirk Gadsden
f2bea1cb70 Clarify contiguous memory array structure of vectors in documentation
Closes #31554.

Contributes to #29380.
2016-02-16 04:10:30 +05:30
Brandon W Maister
17691af38d doc pages: add the ability to search unknown types
This enables `*` in all type positions in doc searches, which I often
want in order to find functions that create or convert specific
types (e.g. `* -> vec`) but I don't actually know what kinds of input
they expect.

I actually started working on this because of #31598, but I've wanted it
several times when exploring new crates.
2016-02-16 04:10:30 +05:30
Keith Yeung
3e1a6c71aa Add lint to check that all crates have #![unstable] 2016-02-16 04:10:30 +05:30
bors
17d284b4b5 Auto merge of #31530 - dirk:dirk/restrict-matching-of-cfg-opts, r=alexcrichton
Fixes #31497.
2016-02-15 19:30:37 +00:00
bors
7a737d56e9 Auto merge of #31663 - nodakai:cleanup-uint_module, r=alexcrichton 2016-02-15 17:33:09 +00:00
Ariel Ben-Yehuda
3d46d095c8 use stalled_on in all obligation types
this improves typeck performance by 5% (LLVM times are still huge).

Basically fixes #25916 (still O(n^2), but the example takes <1s to
compile).
2016-02-15 19:08:53 +02:00
Johan Lorenzo
040cbc4566 Fix wrong help message left in #31368 2016-02-15 17:44:06 +01:00
Corey Farwell
a60ec05fdc Add LLVM FunctionPass regression test using run-make.
Part of https://github.com/rust-lang/rust/issues/31185.

Similar to https://github.com/rust-lang/rust/pull/31391.
2016-02-15 10:08:04 -05:00
bors
7ce4afbdda Auto merge of #31656 - jonas-schievink:mirdump, r=nrc
This allows obtaining a textual MIR dump for individual items or all items in the crate.

I haven't added any tests since ~~I'm too lazy~~ this is an unstable debugging option, but I'll add one if required.

MIR for a single function can now be dumped using `rustc -Zunstable-options --unpretty mir=my_function` and no longer requires the use of in-source `#[rustc_mir]` attributes.

Blocks rust-lang/rust-playpen#154 (if MIR dump support from the playpen is even wanted).

Example output:
```rust
fn main() {
    let x = Some(0);
    x.unwrap_or_else(|| 1);
}
```

```
MIR for expr || 1 (id=16)
fn(arg0: [closure@test.rs:3:22: 3:26]) -> i32 {
    let mut tmp0: ();

    bb0: {
        return = const 1;
        goto -> bb1;
    }

    bb1: {
        return;
    }
}
MIR for fn main::main (id=4)
fn() -> () {
    let var0: core::option::Option<i32>; // x
    let mut tmp0: ();
    let mut tmp1: i32;
    let mut tmp2: core::option::Option<i32>;
    let mut tmp3: [closure@test.rs:3:22: 3:26];

    bb0: {
        var0 = core::option::Option::Some(const 0);
        tmp2 = var0;
        tmp3 = [closure@test.rs:3:22: 3:26];
        tmp1 = core::option::Option<T>::unwrap_or_else(tmp2, tmp3) -> bb2;
    }

    bb1: {
        return;
    }

    bb2: {
        drop(tmp1) -> bb3;
    }

    bb3: {
        return = ();
        goto -> bb1;
    }
}
```
2016-02-15 14:57:44 +00:00
bors
3a254fe4bd Auto merge of #31640 - rkruppe:require-py27, r=sanxiyn
In other words, enforce what was documented in #30626 (and also stop blaming it on LLVM, we have at least one Python script of our own).

Also, there is no Python later than 2.7 and there never will be.
2016-02-15 13:04:00 +00:00
Paul Dicker
44e31b91ad Refactor windows::fs::FileAttr
Because we no longer use `GetFileAttributesExW` FileAttr is never created
directly from `WIN32_FILE_ATTRIBUTE_DATA` anymore.
So we should no longer store FileAttr's attributes in that c struct.
2016-02-15 12:43:30 +01:00
bors
9a7913786c Auto merge of #31653 - tomaka:emscripten-abi, r=eddyb
Needs a correct review because I'm not too confident with how this works.
All tests related to the C ABI are now passing.

References:
- dbe68fecd0/lib/CodeGen/TargetInfo.cpp (L479-L489)
- dbe68fecd0/lib/CodeGen/TargetInfo.cpp (L466-L477)

The `classifyArgumentType` function has two different paths depending on `RAA == CGCXXABI::RAA_DirectInMemory`, but I don't really know what's the corresponding option in Rust.

cc @brson @eddyb
2016-02-15 11:07:02 +00:00
bors
5ba94028ac Auto merge of #31652 - semarie:openbsd-os-raw, r=alexcrichton
remove unused import that cause an error at compile-time.

r? @alexcrichton
2016-02-15 09:10:52 +00:00
bors
4ce803837e Auto merge of #31648 - jseyfried:fix_diagnostics, r=nrc
This PR fixes two unrelated diagnostics bugs in resolve.

First, it reports privacy errors for an import only after the import resolution is determined, fixing #31402.

Second, it expands the per-module map from block ids to anonymous modules so that it also maps module declarations ids to modules, and it uses this map to in `with_scope` to fix #31644.

r? @nrc
2016-02-15 07:13:02 +00:00
Dirk Gadsden
2766e254b1 Rename error-index-generator to error_index_generator
This is because the tool compiler passes the name of the tool
as a command line `--cfg`. The improved session config parser
is stricter and no longer permits invalid meta items (such as
"error-index-generator").
2016-02-14 22:29:45 -08:00
Keith Yeung
6f092c83dd Add lint to check that all crates have #![unstable] 2016-02-15 01:09:42 -05:00
bors
69ad91290d Auto merge of #31566 - jseyfried:fix_regression, r=nrc
This fixes a regression caused by #31461 allowing extern crates to be glob imported, and it fixes the test that was supposed to catch it.
r? @nrc
2016-02-15 05:19:29 +00:00
bors
f9543a9b74 Auto merge of #31555 - nrc:err-recover, r=pnkfelix
Recover from missing brackets in the parser
2016-02-15 03:17:35 +00:00
Josh Stone
c84ab39635 std: use LFS open64 on Linux 2016-02-14 19:11:39 -08:00
Josh Stone
8f2d7d956c std: use LFS readdir64_r on Linux 2016-02-14 19:11:39 -08:00
Josh Stone
dcdfed49d7 std: use LFS lseek64 on Linux 2016-02-14 19:11:39 -08:00
Josh Stone
1ea38f8928 std: use LFS ftruncate64 on Linux 2016-02-14 19:11:39 -08:00
Dirk Gadsden
b122064a33 Stricter matching of --cfg options on rustc
Includes compile-fail test to check that it fails on incomplete
`--cfg` matches.

Fixes #31497.
2016-02-14 16:44:39 -08:00
Nick Cameron
73a8513b88 Rebasing 2016-02-15 13:14:31 +13:00
NODA, Kai
e03cea40e8
libcore/num: Remove unused macro argument.
It is no longer necessary after dd0d495f50

Signed-off-by: NODA, Kai <nodakai@gmail.com>
2016-02-15 07:44:32 +08:00
bors
2808df961b Auto merge of #31661 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #31607, #31649, #31655, #31658
- Failed merges:
2016-02-14 23:18:00 +00:00
Steve Klabnik
fb09a441c6 Rollup merge of #31658 - felgru:master, r=steveklabnik
In the Rust code above this block of compiler output, the function is called print_sum, so use the same function name in the error message.
2016-02-14 18:02:32 -05:00
Steve Klabnik
c244acceb4 Rollup merge of #31655 - ollie27:patch-4, r=steveklabnik
r? @steveklabnik
2016-02-14 18:02:32 -05:00
Steve Klabnik
6ba5d9cfd5 Rollup merge of #31649 - fbergr:doc, r=steveklabnik 2016-02-14 18:02:32 -05:00
Steve Klabnik
c49edbc5ee Rollup merge of #31607 - steveklabnik:gh31599, r=brson
Fixes #31599
2016-02-14 18:02:32 -05:00
bors
a888333ea6 Auto merge of #31460 - alexcrichton:supafast-rustc, r=brson
Looking at some profiles of rustc recently, these seemed like two pretty easy wins we could get in terms of performance on the table.
2016-02-14 21:24:45 +00:00
Nick Cameron
4e1a6f6b36 Tests 2016-02-15 09:33:21 +13:00
Nick Cameron
847a0d2150 Some error recovery in the parser 2016-02-15 09:33:21 +13:00
Nick Cameron
ffd2a0b9d7 Add some simple error recovery to the parser and fix tests
Some tests just add the extra errors, others I fix by doing some simple error recovery. I've tried to avoid doing too much in the hope of doing something more principled later.

In general error messages are getting worse at this stage, but I think in the long run they will get better.
2016-02-15 09:30:23 +13:00
Nick Cameron
0ef9c5f585 error correction for missing or mismatched closing brackets 2016-02-15 09:30:23 +13:00
Nick Cameron
36a9f0cff1 refactoring: inline some function in the parser 2016-02-15 09:30:23 +13:00