Commit Graph

46017 Commits

Author SHA1 Message Date
Nicholas Seckar
ab45e51afa Fix typo in doc string. 2015-08-15 20:17:52 -07:00
Alex Crichton
8ef1e3b77f test: Fix tests for requiring issues 2015-08-15 19:35:52 -07:00
bors
fc7efab3ab Auto merge of #27851 - nikomatsakis:cleanup-ty-decoder, r=eddyb
Just a little code cleanup I was doing as part of another refactoring (which may turn out not to be needed). The main thrust of this is to cleanup the interface to `tydecode.rs` to be less ridiculously repetitive. I also purged the generic "def-id conversion" parameter in favor of a trait object, just to reduce code duplication a bit and make the signatures a bit less messy. I measured the bootstrapping time to build stage2 with these changes, it was identical. (But it'd be easy enough to restore the unboxed closure if we wanted it.)
2015-08-16 02:25:36 +00:00
Niko Matsakis
7a3a1be5e4 remove the last remnants of old interface 2015-08-15 21:35:49 -04:00
Alex Crichton
2972b77134 Add issue for the rustc_private feature everywhere 2015-08-15 18:09:17 -07:00
Alex Crichton
5f625620b5 std: Add issues to all unstable features 2015-08-15 18:09:17 -07:00
Alex Crichton
377c11aa83 collections: Add issues for unstable features 2015-08-15 18:09:17 -07:00
Alex Crichton
3263d41bac rustc_unicode: Add issues for unstable features 2015-08-15 18:09:16 -07:00
Alex Crichton
59dac3175f libc,rand: Add issues for all unstable features 2015-08-15 18:09:16 -07:00
Alex Crichton
6734c933b5 alloc: Add issues for all unstable features 2015-08-15 18:09:16 -07:00
Alex Crichton
b7dcf272d9 core: Fill out issues for unstable features 2015-08-15 18:09:16 -07:00
Alex Crichton
6634777ae0 syntax: Require issues for unstable features
This turns an `#[unstable]` tag without an `issue` annotation into a hard error
to ensure that we've always got a tracking issue for unstable features in the
standard library.
2015-08-15 18:09:16 -07:00
Alex Crichton
cc65f79e55 test: Fix tests for MUSL
Some new allocator tests require dynamic libraries to run the full test, but
dylibs aren't currently working on MUSL.
2015-08-15 13:29:12 -07:00
Jonas Schievink
5e8d39ebfd Slightly improved macro diagnostics + Indentation fixes 2015-08-15 21:27:52 +02:00
bors
f05b22efb5 Auto merge of #27845 - dylanmckay:abstract-pointer-size-away, r=alexcrichton
This patch rewrites code in several places which assume that the current target has either 32-bit or 64-bit pointers so that it can support arbitrary-width pointers.

It does not completely remove all assumptions of pointer width, but it does reduce them significantly. There is a discussion [here](https://internals.rust-lang.org/t/adding-16-bit-pointer-support/2484/10) about the change.
2015-08-15 19:10:40 +00:00
Ariel Ben-Yehuda
91be125899 prevent non-dict-structs from being intialized via FRU
Fixes #27831
2015-08-15 21:03:10 +03:00
Ariel Ben-Yehuda
ba98228b4d clean-up ExprStruct and PatStruct type-checking
This fixes the crazy "transparent aliases" bug, which I hope nobody
relied on.
2015-08-15 20:39:28 +03:00
bors
753a6a9e29 Auto merge of #27847 - birkenfeld:patch-3, r=sfackler 2015-08-15 17:30:15 +00:00
bors
29455557aa Auto merge of #27827 - w00ns:for-loop-expn-issue-27639, r=alexcrichton
Fixes #27639
2015-08-15 14:50:13 +00:00
Guillaume Gomez
768111fa93 Add E0325 error explanation 2015-08-15 12:24:10 +02:00
Guillaume Gomez
1ac7633c8a Add E0324 error explanation 2015-08-15 12:24:10 +02:00
Guillaume Gomez
6715ec8da0 Add E0323 error explanation 2015-08-15 12:24:10 +02:00
Guillaume Gomez
8ef395fb7f Add E0369 error explanation 2015-08-15 12:22:45 +02:00
Guillaume Gomez
2f84173f2c Add E0103 error explanation 2015-08-15 12:21:35 +02:00
Georg Brandl
56f3282f31 Iterator::all() - document short-circuiting property parallel to any() 2015-08-15 11:49:33 +02:00
bors
316f5e5acf Auto merge of #27846 - AlisdairO:diagnostics248, r=Manishearth
As title :-)
Part of #24407.

r? @Manishearth
2015-08-15 09:26:48 +00:00
Dylan McKay
ea7768c2dd Improve 'unknown instrinsic' error message
If you had previously tried to get the ValueRef associated with an
intrinsic that hadn't been described in
`trans::context::declare_intrinsic()`, the compile would panic with
an empty message.

Now we print out details about the error in the panic message.
2015-08-15 21:06:06 +12:00
Alisdair Owens
26cca1c258 Add extended diagnostics for E0248 2015-08-15 10:02:54 +01:00
Niko Matsakis
b09cf1293a astencode: convert code to use TyDecoder directly 2015-08-15 05:01:47 -04:00
Niko Matsakis
38e6b5780e s/PState/TyDecoder/ 2015-08-15 05:01:47 -04:00
Niko Matsakis
70e2df5b1b tydecode: tighten privacy 2015-08-15 05:01:47 -04:00
Niko Matsakis
2a53744aaa convert tydecode to use an impl, eliminating a lot of boilerplate 2015-08-15 05:01:47 -04:00
w00ns
ae68e90af4 Fix issue with for loop expansion 2015-08-15 10:17:12 +02:00
Dylan McKay
30ec363c76 Reduce rustc::trans's dependence on pointer width 2015-08-15 20:04:21 +12:00
Dylan McKay
7ebc5e5134 Reduce libcore/liballoc's dependence on pointer sizes 2015-08-15 19:19:13 +12:00
bors
e859498d1c Auto merge of #27841 - jonas-schievink:still-repeating-span, r=alexcrichton
Current behaviour demo: http://is.gd/l3FEgo
(The span is printed at the start of the source code)

This patch moves the span to the use of `$i` in the macro rhs (as the code comment already claims)
2015-08-15 06:16:41 +00:00
bors
1e1b7f3022 Auto merge of #27825 - withoutboats:default_array, r=alexcrichton
Implemented Default for arrays up to length 32 where T: Default using an additional macro.
2015-08-15 04:19:14 +00:00
bors
ec8f072c18 Auto merge of #27839 - gkoz:netbsd_ar, r=brson
NetBSD didn't get its fix for #27124 and still suffers from that issue.
2015-08-15 01:45:15 +00:00
Niko Matsakis
c9bb5a68f8 convert tydecode to use a closure for def-id conversion and
to store the closure in the PSState struct
2015-08-14 20:16:31 -04:00
Niko Matsakis
8a6118b748 move InlinedItem into librustc, where it belongs 2015-08-14 20:07:55 -04:00
bors
ab450ef22b Auto merge of #27400 - alexcrichton:less-jemalloc, r=brson
This commit is an implementation of [RFC 1183][rfc] which allows swapping out
the default allocator on nightly Rust. No new stable surface area should be
added as a part of this commit.

[rfc]: https://github.com/rust-lang/rfcs/pull/1183

Two new attributes have been added to the compiler:

* `#![needs_allocator]` - this is used by liballoc (and likely only liballoc) to
  indicate that it requires an allocator crate to be in scope.
* `#![allocator]` - this is a indicator that the crate is an allocator which can
  satisfy the `needs_allocator` attribute above.

The ABI of the allocator crate is defined to be a set of symbols that implement
the standard Rust allocation/deallocation functions. The symbols are not
currently checked for exhaustiveness or typechecked. There are also a number of
restrictions on these crates:

* An allocator crate cannot transitively depend on a crate that is flagged as
  needing an allocator (e.g. allocator crates can't depend on liballoc).
* There can only be one explicitly linked allocator in a final image.
* If no allocator is explicitly requested one will be injected on behalf of the
  compiler. Binaries and Rust dylibs will use jemalloc by default where
  available and staticlibs/other dylibs will use the system allocator by
  default.

Two allocators are provided by the distribution by default, `alloc_system` and
`alloc_jemalloc` which operate as advertised.

Closes #27389
2015-08-14 22:52:11 +00:00
Jonas Schievink
59f8e3238a Fix span of invalid metavariable repetition 2015-08-15 00:45:34 +02:00
Alex Crichton
45bf1ed1a1 rustc: Allow changing the default allocator
This commit is an implementation of [RFC 1183][rfc] which allows swapping out
the default allocator on nightly Rust. No new stable surface area should be
added as a part of this commit.

[rfc]: https://github.com/rust-lang/rfcs/pull/1183

Two new attributes have been added to the compiler:

* `#![needs_allocator]` - this is used by liballoc (and likely only liballoc) to
  indicate that it requires an allocator crate to be in scope.
* `#![allocator]` - this is a indicator that the crate is an allocator which can
  satisfy the `needs_allocator` attribute above.

The ABI of the allocator crate is defined to be a set of symbols that implement
the standard Rust allocation/deallocation functions. The symbols are not
currently checked for exhaustiveness or typechecked. There are also a number of
restrictions on these crates:

* An allocator crate cannot transitively depend on a crate that is flagged as
  needing an allocator (e.g. allocator crates can't depend on liballoc).
* There can only be one explicitly linked allocator in a final image.
* If no allocator is explicitly requested one will be injected on behalf of the
  compiler. Binaries and Rust dylibs will use jemalloc by default where
  available and staticlibs/other dylibs will use the system allocator by
  default.

Two allocators are provided by the distribution by default, `alloc_system` and
`alloc_jemalloc` which operate as advertised.

Closes #27389
2015-08-14 15:13:10 -07:00
Gleb Kozyrev
ad9dd48059 fixes #27124 for netbsd
NetBSD didn't get its fix for #27124 and still suffers from that issue.
2015-08-14 22:26:29 +03:00
bors
c1e865c9df Auto merge of #27838 - AlisdairO:diagnostics221, r=Manishearth
As title :-)
Part of #24407.

r? @Manishearth
2015-08-14 19:21:59 +00:00
Alisdair Owens
de26d5e712 add diagnostics for E0221 2015-08-14 20:21:24 +01:00
Without Boats
975a8ed312 Implemented Default for arrays up to [T; 32]. 2015-08-14 10:11:19 -07:00
bors
e7261f3ab6 Auto merge of #27641 - nikomatsakis:soundness-rfc-1214, r=nrc
This PR implements the majority of RFC 1214. In particular, it implements:

- the new outlives relation
- comprehensive WF checking

For the most part, new code receives warnings, not errors, though 3 regressions were found via a crater run. 

There are some deviations from RFC 1214. Most notably:

- we still consider implied bounds from fn ret; this intersects other soundness issues that I intend to address in detail in a follow-up RFC. Fixing this without breaking a lot of code probably requires rewriting compare-method somewhat (which is probably a good thing).
- object types do not check trait bounds for fear of encountering `Self`; this was left as an unresolved question in RFC 1214, but ultimately feels inconsistent.

Both of those two issues are highlighted in the tracking issue, https://github.com/rust-lang/rust/issues/27579. #27579 also includes a testing matrix with new tests that I wrote -- these probably duplicate some existing tests, I tried to check but wasn't quite sure what to look for. I tried to be thorough in testing the WF relation, at least, but would welcome suggestions for missing tests.

r? @nrc (or perhaps someone else?)
2015-08-14 15:26:09 +00:00
Ariel Ben-Yehuda
b87c292627 be more robust to bogus items in struct patterns/constructors
Fixes #27815
2015-08-14 17:03:11 +03:00
Niko Matsakis
7f8942c18d Correct nits from @nrc 2015-08-14 09:26:19 -04:00