Commit Graph

57706 Commits

Author SHA1 Message Date
Jonas Schievink
bcfbdb871f Rename MIR local iterators to match convention 2016-09-26 22:50:03 +02:00
Jonas Schievink
3b0c318a5f Make spreading use Option<Local> 2016-09-26 22:44:01 +02:00
Jonas Schievink
894c083c40 Remove TODOs (they're done) 2016-09-26 22:30:56 +02:00
Jonas Schievink
e75feea696 Fix off-by-one when emitting StorageDead for vars 2016-09-26 22:30:56 +02:00
Michael Woerister
76f76ae1d8 incr.comp.: Add file header to on-disk artifacts for validation. 2016-09-26 16:05:01 -04:00
Andrew Lygin
157208b046 New error format for E0512 2016-09-26 22:49:22 +03:00
Tomasz Miąsko
c52b957b89 When getaddrinfo returns EAI_SYSTEM retrieve actual error from errno.
Fixes issue #36546. This change also updates libc to earliest version
that includes EAI_SYSTEM constant.
2016-09-26 21:25:59 +02:00
Vanja Cosic
0bd7ef0996 Remove whitespace from line endings 2016-09-26 20:55:59 +02:00
Srinivas Reddy Thatiparthy
45f2b6abb5
run rustfmt on libstd/collections/hash folder 2016-09-27 00:25:47 +05:30
Guillaume Gomez
96a0f06b2f Update E0513 to new error format 2016-09-26 20:52:01 +02:00
Guillaume Gomez
1e4e81c320 Add compile-fail test for E0513 2016-09-26 20:52:01 +02:00
Guillaume Gomez
09a63c1571 Add E0513 error explanation 2016-09-26 20:51:56 +02:00
Guillaume Gomez
4e7338afa8 Add missing links on cmp module 2016-09-26 20:43:54 +02:00
Jonas Schievink
393db2d830 [WIP] Move MIR towards a single kind of local 2016-09-26 20:41:54 +02:00
bors
8ccfc695b5 Auto merge of #36719 - shepmaster:build-env-var-reporting, r=alexcrichton
Report which required build-time environment variable is not set
2016-09-26 11:12:42 -07:00
Aleksey Kladov
300e13808e Remove CString drop test.
The test relies on the undefined behavior, and so may fail in some
circumstances. This can be worked around by stubbing a memory allocator
in the test, but it is a bit of work, and LLVM could still theoretically
eliminate the write of the zero byte in release mode (which is
intended).

So let's just remove the test and mark the function as inline. It
shouldn't be optimized away when inlined into the debug build of user's
code.
2016-09-26 20:50:32 +03:00
Jonas Schievink
205dac9355 Move "rust-call" tuple spreading out of ArgDecl
If MIR is for a "rust-call" ABI function, the last arg would always
have `spread` set to `true`. Move this flag into `Mir` instead.
2016-09-26 19:42:01 +02:00
Jake Goulding
e6e117c33a Extend preprocessor LLVM version checks to support LLVM 4.x
This doesn't actually do anything for LLVM 4.x yet, but sets the stage.
2016-09-26 13:40:29 -04:00
Joe Neeman
159aa0b902 Add a compile-fail test. 2016-09-26 18:48:35 +02:00
Frank Rehberger
6c4616c72d Update set.rs 2016-09-26 18:16:06 +02:00
Frank Rehberger
ba84d4ff81 Update map.rs 2016-09-26 18:15:27 +02:00
Tim Neumann
f0e1738e51 fix rebase fallout 2016-09-26 17:21:45 +02:00
bors
c2769285ad Auto merge of #36735 - srinivasreddy:typck/variance, r=nrc
run rustfmt on librustc_typeck/variance folder
2016-09-26 07:53:27 -07:00
Frank Rehberger
3551008022 Update set.rs 2016-09-26 16:03:37 +02:00
Frank Rehberger
bd80e7bce7 Update map.rs 2016-09-26 16:00:24 +02:00
Frank Rehberger
aed99c800e Document init of HashSet/HashMap from vector 2016-09-26 13:39:31 +02:00
bors
3bf4a7ad45 Auto merge of #36734 - nnethercote:fix-HashSet-sizing, r=Aatch
Don't allocate during default HashSet creation.

The following `HashMap` creation functions don't allocate heap storage for elements.
```
HashMap::new()
HashMap::default()
HashMap::with_hasher()
```
This is good, because it's surprisingly common to create a HashMap and never
use it. So that case should be cheap.

However, `HashSet` does not have the same behaviour. The corresponding creation
functions *do* allocate heap storage for the default number of non-zero
elements (which is 32 slots for 29 elements).
```
HashMap::new()
HashMap::default()
HashMap::with_hasher()
```
This commit gives `HashSet` the same behaviour as `HashMap`, by simply calling
the corresponding `HashMap` functions (something `HashSet` already does for
`with_capacity` and `with_capacity_and_hasher`). It also reformats one existing
`HashSet` construction to use a consistent single-line format.

This speeds up rustc itself by 1.01--1.04x on most of the non-tiny
rustc-benchmarks.
2016-09-26 04:38:18 -07:00
Jeffrey Seyfried
df0e4bf911 Move ensure_complete_parse into expand.rs. 2016-09-26 11:24:10 +00:00
bors
b786976a15 Auto merge of #36730 - jseyfried:make_macro_rules_invocations_magic, r=nrc
Forbid user-defined macros named "macro_rules"

This is a [breaking-change].
r? @nrc
2016-09-26 01:21:00 -07:00
Alexander von Gluck IV
7c34d9c144 Haiku: Use common thread set_name stub 2016-09-26 00:41:41 -05:00
Tim Neumann
cf1fc2ce13 appease tidy 2016-09-26 07:07:41 +02:00
Tim Neumann
0dc2a95f1e emit feature help in cheat mode 2016-09-26 07:07:41 +02:00
Tim Neumann
ad81f11b01 deduplicate inline is_nightly_build implementations 2016-09-26 07:07:41 +02:00
Tim Neumann
3f287efc82 refactor away get_unstable_features_setting 2016-09-26 07:07:41 +02:00
Tim Neumann
ba838dc4e9 make is_nightly_build a method on UnstableFeatures 2016-09-26 07:07:41 +02:00
Tim Neumann
6d09d8d7d9 add unstable_features to ParseSess 2016-09-26 07:07:41 +02:00
Tim Neumann
b0dba7439d make emit_feature_err take a ParseSess 2016-09-26 07:07:41 +02:00
bors
0a0215ddcd Auto merge of #36652 - giannicic:issue-36553, r=nrc
this commit corrects E0520 error text.
See referenced issue for further info

r? @nrc
2016-09-25 22:03:28 -07:00
Tim Neumann
51ea050457 reject macros with empty repetitions 2016-09-26 06:59:06 +02:00
Jeffrey Seyfried
34f4ad1b71 Add regression test. 2016-09-26 04:38:53 +00:00
Jeffrey Seyfried
b90ceddcee Refactor ensure_complete_parse. 2016-09-26 04:29:30 +00:00
Jeffrey Seyfried
4a8467b62d Remove TokResult. 2016-09-26 04:16:55 +00:00
Jeffrey Seyfried
8b40eaddf1 Refactor parse_expansion out of ResultAnyMacro. 2016-09-26 04:15:27 +00:00
Srinivas Reddy Thatiparthy
765eaac000
run rustfmt on librustc_typeck/variance folder 2016-09-26 08:44:41 +05:30
Nicholas Nethercote
4eb069c981 Don't allocate during default HashSet creation.
The following `HashMap` creation functions don't allocate heap storage for elements.
```
HashMap::new()
HashMap::default()
HashMap::with_hasher()
```
This is good, because it's surprisingly common to create a HashMap and never
use it. So that case should be cheap.

However, `HashSet` does not have the same behaviour. The corresponding creation
functions *do* allocate heap storage for the default number of non-zero
elements (which is 32 slots for 29 elements).
```
HashMap::new()
HashMap::default()
HashMap::with_hasher()
```
This commit gives `HashSet` the same behaviour as `HashMap`, by simply calling
the corresponding `HashMap` functions (something `HashSet` already does for
`with_capacity` and `with_capacity_and_hasher`). It also reformats one existing
`HashSet` construction to use a consistent single-line format.

This speeds up rustc itself by 1.01--1.04x on most of the non-tiny
rustc-benchmarks.
2016-09-26 13:05:54 +10:00
Srinivas Reddy Thatiparthy
a33b921c0d
run rustfmt on typecheck/coherence folder 2016-09-26 07:56:44 +05:30
bors
9966397b61 Auto merge of #36151 - camlorn:struct_layout_optimization, r=eddyb
refactor to remove trans::adt and make rustc::ty::layout authoritative

I asked on IRC about optimizing struct layout by reordering fields from most-aligned to least-aligned and somehow ended up getting talked into doing this.  The goal here is to make `layout` authoritative and to remove `adt`.  The former has been accomplished by reimplementing `represent_type_uncached` and the latter is in progress.  @eddyb thought I should make the PR now.

My plan is to reserve the actual optimization for a second PR, as this work is useful by itself.
2016-09-25 18:47:00 -07:00
Gianni Ciccarelli
63a58929b9 #36553 specialisation error 520 is misleading
fit string in one line
2016-09-26 03:18:42 +02:00
Jeffrey Seyfried
77958d56bc Forbid user-defined macros named "macro_rules". 2016-09-26 00:22:40 +00:00
Austin Hicks
467454b0d2 Incorporate review comments. 2016-09-25 20:14:34 -04:00