Commit Graph

56110 Commits

Author SHA1 Message Date
Eduard Burtescu
34f856e905 Update LLVM to include 4 backported commits by @majnemer. 2016-08-17 05:37:48 +03:00
Chris Stankus
f0ff2d32c8 E0403 update error format 2016-08-16 20:49:09 -05:00
Andrew Paseltiner
7e148cd062
Make vec::IntoIter covariant again
Closes #35721
2016-08-16 20:45:07 -04:00
bors
1bf5fa3269 Auto merge of #35538 - cgswords:libproc_macro, r=nrc
Kicking off libproc_macro

This PR introduces `libproc_macro`, which is currently quite bare-bones (just a few macro construction tools and an initial `quote!` macro).

This PR also introduces a few test cases for it, and an additional `shim` file (at `src/libsyntax/ext/proc_macro_shim.rs` to allow a facsimile usage of Macros 2.0 *today*!
2016-08-16 16:35:10 -07:00
Dustin Bensing
4cfdf634c1 Update E0005 Unit-Test 2016-08-17 00:40:08 +02:00
Nick Cameron
77ca7dd107 rustdoc: redirects from sane, namespaced URLs to Rustdoc's ridiculous ones
cc #35020 which does this properly
2016-08-17 10:30:39 +12:00
Nick Cameron
a41454bf65 rustdoc: add namespaces for items 2016-08-17 10:30:39 +12:00
Nick Cameron
7a7cd644cb rustdoc: refactoring and tidying up
pulled out of #35020
2016-08-17 10:30:39 +12:00
Jorge Aparicio
1cf9cafeb1 add mips-uclibc targets
These targets cover OpenWRT 15.05 devices, which use the soft float ABI
and the uclibc library. None of the other built-in mips targets covered
those devices (mips-gnu is hard float and glibc-based, mips-musl is
musl-based).

With this commit one can now build std for these devices using these
commands:

```
$ configure --enable-rustbuild --target=mips-unknown-linux-uclibc
$ make
```

cc #35673
2016-08-16 17:12:51 -05:00
Dustin Bensing
1fc18aab5d Update E0005 to use a label 2016-08-16 23:50:32 +02:00
Amanieu d'Antras
330b7f7359 Implement RFC 1649 2016-08-16 22:22:53 +01:00
bors
514d4cef24 Auto merge of #35354 - tomgarcia:covariant-drain, r=alexcrichton
Made vec_deque::Drain, hash_map::Drain, and hash_set::Drain covariant

Fixed the rest of the Drain iterators.
2016-08-16 13:26:15 -07:00
cgswords
98c8e0a05d Proc_macro is alive 2016-08-16 13:17:36 -07:00
Mikhail Modin
193b9ae86b update to new error format E0409 2016-08-16 22:13:09 +03:00
Knight
3caa451b9d Updated E0394 to new error message 2016-08-17 03:02:25 +08:00
Knight
d2e78956c3 Updated E0422 to new error message 2016-08-17 03:02:25 +08:00
Brian Anderson
16fc02569d Bump version to 1.13 2016-08-16 11:29:50 -07:00
bors
db7300d414 Auto merge of #35637 - japaric:no-builtins-lto, r=alexcrichton
exclude `#![no_builtins]` crates from LTO

this prevents intrinsics like `memcpy` from being mis-optimized to
infinite recursive calls when LTO is used.

fixes #31544
closes #35540

---

r? @alexcrichton
cc @Amanieu
2016-08-16 10:13:18 -07:00
Corey Farwell
dc22186efb Add basic unit test for std::slice::Iter::as_slice. 2016-08-16 11:20:43 -04:00
Corey Farwell
3808dc3560 Implement AsRef<[T]> for std::slice::Iter.
`AsRef` is designed for conversions that are "cheap" (as per
the API docs). It is the case that retrieving the underlying
data of `std::slice::Iter` is cheap. In my opinion, there's no
ambiguity about what slice data will be returned, otherwise,
I would be more cautious about implementing `AsRef`.
2016-08-16 11:14:52 -04:00
bors
1de5b7e8c2 Auto merge of #35617 - jseyfried:fix_unused_cfg_attr_path, r=eddyb
Fix incorrect unused import warnings on `cfg_attr`ed `path` attributes

Fixes #35584.
r? @eddyb
2016-08-16 06:32:20 -07:00
Seo Sanghyeon
3aa63400a2 Use UI test to test spans, instead of forced line break 2016-08-16 20:46:50 +09:00
Matthew Piziak
c186da706d RangeFull for-loop iteration fails because of IntoIterator
Saying that "[for-loop iteration] fails because .. has no IntoIterator
impl" is more direct than saying "...no Iterator impl" because for loops
sugar into IntoIterator invocations. It just happens that the other
Range* operators implement Iterator and rely on the fact that
`IntoIterator` is implemented for `T: Iterator`.
2016-08-16 06:54:45 -04:00
Seo Sanghyeon
d52eb1ab0c RUST_NEW_ERROR_FORMAT is no more 2016-08-16 16:52:30 +09:00
bors
e25542cb02 Auto merge of #35162 - canndrew:bang_type_coerced, r=nikomatsakis
Implement the `!` type

This implements the never type (`!`) and hides it behind the feature gate `#[feature(never_type)]`. With the feature gate off, things should build as normal (although some error messages may be different). With the gate on, `!` is usable as a type and diverging type variables (ie. types that are unconstrained by anything in the code) will default to `!` instead of `()`.
2016-08-16 00:12:12 -07:00
Corey Farwell
bc52bdcedc Implement Debug for std::vec::IntoIter.
Display all the remaining items of the iterator, similar to the `Debug`
implementation for `core::slice::Iter`:

f0bab98695/src/libcore/slice.rs (L930-L937)

Using the `as_slice` method that was added in:

https://github.com/rust-lang/rust/pull/35447
2016-08-15 23:45:12 -04:00
Jorge Aparicio
e996405696 test that a no_builtins crate is passed to the linker 2016-08-15 18:24:14 -05:00
Matthew Piziak
377ae44cf2 explicitly show how iterating over .. fails
I've also removed the `main()` wrapper, which I believe is extraneous.
LMK if that's incorrect.
2016-08-15 18:46:19 -04:00
Matthew Piziak
2c9a1d9c4a remove .take(10) from Range example 2016-08-15 18:30:25 -04:00
Matthew Piziak
c9f2055110 accumulate into vector and assert, instead of printing
I'm only making this change in one place so that people can express
their preferences for this stylistic change. If/when this change is
approved I'll go ahead and translate the rest of the `std::ops`
examples.
2016-08-15 18:03:11 -04:00
Matthew Piziak
18edae4237 expound on limitations of Rust's trait-based operator overloading
Part of #29330
2016-08-15 15:34:02 -04:00
bors
197be89f36 Auto merge of #35680 - GuillaumeGomez:err_codes, r=jonathandturner
Err codes

r? @jonathandturner
2016-08-15 11:35:01 -07:00
Mikhail Modin
349f10a15d update E0375 to new format 2016-08-15 20:37:03 +03:00
bors
f65d96fe3f Auto merge of #35340 - michaelwoerister:incr-comp-cli-args, r=nikomatsakis
Take commandline arguments into account for incr. comp.

Implements the conservative strategy described in https://github.com/rust-lang/rust/issues/33727.

From now one, every time a new commandline option is added, one has to specify if it influences the incremental compilation cache. I've tried to implement this as automatic as possible: One just has to added either the `[TRACKED]` or the `[UNTRACKED]` marker next to the field. The `Options`, `CodegenOptions`, and `DebuggingOptions` definitions in `session::config` show plenty of examples.

The PR removes some cruft from `session::config::Options`, mostly unnecessary copies of flags also present in `DebuggingOptions` or `CodeGenOptions` in the same struct.

One notable removal is the `cfg` field that contained the values passed via `--cfg` commandline arguments. I chose to remove it because (1) its content is only a subset of what later is stored in `hir::Crate::config` and it's pretty likely that reading the cfgs from `Options` would not be what you wanted, and (2) we could not incorporate it into the dep-tracking hash of the `Options` struct because of how the test framework works, leaving us with a piece of untracked but vital data.

It is now recommended (just as before) to access the crate config via the `krate()` method in the HIR map.

Because the `cfg` field is not present in the `Options` struct any more, some methods in the `CompilerCalls` trait now take the crate config as an explicit parameter -- which might constitute a breaking change for plugin authors.
2016-08-15 08:35:18 -07:00
Steve Klabnik
85bbbad592 A disclaimer about keywords.
Some people cite this list as "zomg Rust has so many keywords," so make
it clear that these aren't all used by the language today.
2016-08-15 10:52:42 -04:00
Guillaume Gomez
92779194ed Add new error code tests 2016-08-15 16:47:45 +02:00
Guillaume Gomez
844c6e3d5c Add E0394 error explanation 2016-08-15 16:47:17 +02:00
Phil Ruffwind
9e3986188d Fix spacing in code of closures.md
The spacing seems inconsistent with existing style conventions.
2016-08-15 09:39:13 -04:00
bors
b72fa8ca95 Auto merge of #35567 - creativcoder:e0261, r=jonathandturner
Update E0261 and E0262 to new error format

Fixes #35516 and  #35517 . Part of #35233
r? @jonathandturner
2016-08-15 05:12:35 -07:00
silenuss
fa61f82bf2 Update compiler error 0030 to use new error format. 2016-08-15 00:21:13 -06:00
Andrew Cann
f59f1f0914 Fix bug for ! in old trans 2016-08-15 13:32:12 +08:00
bors
f0bab98695 Auto merge of #35638 - ahmedcharles:url, r=alexcrichton
Upgrade linkchecker to url 1.2.0.
2016-08-14 21:38:21 -07:00
Jorge Aparicio
35eba85c3d refactor: use CStore::is_no_builtins 2016-08-14 21:56:26 -05:00
bors
47e6da2a01 Auto merge of #35427 - cardoe:arm-musl-targets, r=alexcrichton
add GNU make files for arm-unknown-linux-musleabi

For Yocto (Embedded Linux meta distro) Rust is provided via the [meta-rust layer](https://github.com/meta-rust/meta-rust). In this project there have been patches to add `arm-unknown-linux-musleabi`. Rust recently acquired that support via #35060 but only for rustbuild. meta-rust is currently only able to build Rust support with the existing GNU Makefiles. This adds `arm-unknown-linux-musleabi` support to Rust for the GNU Makefiles until meta-rust is able to sort out why using rustbuild does not work for it.

/cc @srwalter @derekstraka @jmesmon @japaric
2016-08-14 18:36:33 -07:00
Panashe M. Fundira
a37e90a8c9
Make E0033 tests fit in 100 cols 2016-08-14 20:23:16 -04:00
bors
13ff307f07 Auto merge of #35666 - eddyb:rollup, r=eddyb
Rollup of 30 pull requests

- Successful merges: #34941, #35392, #35444, #35447, #35491, #35533, #35539, #35558, #35573, #35574, #35577, #35586, #35588, #35594, #35596, #35597, #35598, #35606, #35611, #35615, #35616, #35620, #35622, #35640, #35643, #35644, #35646, #35647, #35648, #35661
- Failed merges: #35395, #35415
2016-08-14 15:27:15 -07:00
Nazım Can Altınova
6d998d664b Update E0392 to new error format 2016-08-15 00:22:59 +03:00
Alexandre Oliveira
a026e2c727 Update error E0365 to new format 2016-08-14 16:33:25 -03:00
bors
1d5b758bab Auto merge of #35409 - eddyb:mir-storage-stmts, r=nikomatsakis
[MIR] Add Storage{Live,Dead} statements to emit llvm.lifetime.{start,end}.

Storage live ranges are tracked for all MIR variables and temporaries with a drop scope.
`StorageLive` is lowered to `llvm.lifetime.start` and `StorageDead` to `llvm.lifetime.end`.

There are some improvements possible here, such as:
* pack multiple storage liveness statements by using the index of first local + `u64` bitset
* enforce that locals are not directly accessed outside their storage live range
* shrink storage live ranges for never-borrowed locals to initialization -> last use
* emit storage liveness statements for *all* temporaries
 * however, the remaining ones are *always* SSA immediates, so they'd be noop in MIR trans
 * could have a flag on the temporary that its storage is irrelevant (a la C's old `register`)
   * would also deny borrows if necessary
    * this seems like an overcompliation and with packing & optimizations it may be pointless

Even in the current state, it helps stage2 `rustc` compile `boiler` without overflowing (see #35408).

A later addition fixes #26764 and closes #27372 by emitting `.section` directives for dylib metadata to avoid them being allocated into memory or read as `.note`. For this PR, those bugs were tripping valgrind.
2016-08-14 12:28:48 -07:00
Yossi Konstantinovsky
5286a5a0f8 Update E0322 to new format 2016-08-14 21:57:33 +03:00