Commit Graph

55961 Commits

Author SHA1 Message Date
Eduard-Mihai Burtescu
64c1aef5c8 Rollup merge of #35751 - nagisa:mir-scope-fix-again, r=eddyb
Fix the invalidation of the MIR early exit cache

~~The #34307 introduced a cache for early exits in order to help with O(n*m) explosion of cleanup blocks but the cache is invalidated incorrectly and I can’t seem to figure out why (caching is hard!)~~

~~Remove the cache for now to fix the immediate correctness issue and worry about the performance later.~~

Cache invalidation got fixed.

Fixes #35737

r? @nikomatsakis
2016-08-18 06:12:23 +03:00
Eduard-Mihai Burtescu
1e13de810f Rollup merge of #35750 - SimonSapin:help, r=alexcrichton
Add 'make help' for rustbuild

It is still advertised by the configure script.
2016-08-18 06:12:22 +03:00
Eduard-Mihai Burtescu
f1861b814a Rollup merge of #35749 - GuillaumeGomez:raw_field, r=jonathandturner
Fixes issue #11004

Fixes #11004.

r? @jonathandturner
2016-08-18 06:12:22 +03:00
Eduard-Mihai Burtescu
394c4497de Rollup merge of #35744 - DevShep:ds/update_E0009, r=jonathandturner
Update E0009 to new format

Part of #35233
Fixes #35193

r? @jonathandturner
2016-08-18 06:12:22 +03:00
Eduard-Mihai Burtescu
7a274441ae Rollup merge of #35742 - spladug:readme-cmake-version, r=nikomatsakis
Update minimum CMake version in README

The minimum got bumped in the LLVM upgrade of #34743.
2016-08-18 06:12:22 +03:00
Eduard-Mihai Burtescu
99e5efdbe6 Rollup merge of #35740 - eddyb:llvm-prl-fix, r=alexcrichton
Update LLVM to include 4 backported commits by @majnemer.

Partial fix for rust-lang/rust#35662, should help at least loops on small arrays.

Nominated for backporting into the new beta (not the one that's being released as stable this week).

r? @alexcrichton
2016-08-18 06:12:21 +03:00
Eduard-Mihai Burtescu
71759ec52c Rollup merge of #35739 - circuitfox:E0403-update-error-format, r=jonathandturner
E0403 update error format

Fixes #35696

Part of #35233

r? @jonathandturner

Also did the bonus for this one.
2016-08-18 06:12:21 +03:00
Eduard-Mihai Burtescu
5e9a5b3bd7 Rollup merge of #35734 - japaric:mips-uclibc, r=alexcrichton
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

---

r? @alexcrichton
cc @felixalias This is the target the rust-tessel project should be using.
Note that the libc crate doesn't support the uclibc library and will have to be updated. We are lucky that uclibc and glibc are somewhat similar and one can build std and even run the libc-test test suite with the current, unmodified libc. About that last part, I tried to run the libc-test and got a bunch of compile errors. I don't intend to fix them but I'll post some instruction about how to run libc-test in the rust-lang/libc issue tracker.
2016-08-18 06:12:21 +03:00
Eduard-Mihai Burtescu
612506bfff Rollup merge of #35346 - DarkEld3r:e0093-formatting, r=jonathandturner
Update compiler error 0093 to use new error format

Addresses #35230, Part of the #35233 meta bug

r? @jonathandturner
2016-08-18 06:12:21 +03:00
bors
aef6971ca9 Auto merge of #35736 - brson:relnotes, r=steveklabnik
1.11 changelog

[Rendered](9863afe029/RELEASES.md)

r? @steveklabnik

It's too late to get this into the actual release, but still needs to be backported to 1.12 beta.
2016-08-17 16:38:44 -07:00
Brian Anderson
9863afe029 1.11 changelog 2016-08-17 15:13:56 -07:00
Simonas Kazlauskas
2c3250adfa Nice graphs 2016-08-18 00:41:56 +03:00
Simonas Kazlauskas
2d366428cc Properly invalidate the early exit cache
Fixes #35737
2016-08-17 21:09:30 +03:00
Chris Stankus
6a1efbd08e Merge branch 'master' into E0403-update-error-format 2016-08-17 12:31:20 -05:00
Jacob
d01bfb122e Remove trailing white space 2016-08-17 10:21:15 -07:00
Guillaume Gomez
feeed0b51b Fixes issue #11004 2016-08-17 19:12:37 +02:00
bors
7ac11cad3f Auto merge of #35747 - jonathandturner:rollup, r=jonathandturner
Rollup of 23 pull requests

- Successful merges: #34370, #35415, #35595, #35610, #35613, #35614, #35621, #35660, #35663, #35670, #35671, #35672, #35681, #35686, #35690, #35695, #35707, #35708, #35713, #35722, #35725, #35726, #35731
- Failed merges: #35395
2016-08-17 09:49:34 -07:00
Simon Sapin
12a159abea Add 'make help' for rustbuild
It is still advertised by the configure script.
2016-08-17 16:23:11 +02:00
bors
76fa5875c6 Auto merge of #35733 - apasel422:issue-35721, r=alexcrichton
Make `vec::IntoIter` covariant again

Closes #35721

r? @alexcrichton
2016-08-17 06:25:56 -07:00
Jonathan Turner
c216617cf2 Rollup merge of #35731 - pythoneer:fix-35192, r=jonathandturner
Update E0005 to use a label

Fixes #35192 as Part of #35233

r? @jonathandturner
2016-08-17 06:25:28 -07:00
Jonathan Turner
fbc62afba6 Rollup merge of #35726 - mikhail-m1:master2, r=jonathandturner
update E0409 to new error format

fixes #35699 as part of #35233.

r? @jonathandturner
2016-08-17 06:25:28 -07:00
Jonathan Turner
e20a7e3418 Rollup merge of #35725 - brson:bump, r=alexcrichton
Bump version to 1.13
2016-08-17 06:25:27 -07:00
Jonathan Turner
5fc58dcaff Rollup merge of #35722 - knight42:update-error-msg, r=jonathandturner
Updated E0394 & E0422 to new format

Fixes #35692 and #35700, as part of #35233.

r? @jonathandturner
2016-08-17 06:25:27 -07:00
Jonathan Turner
75454f72a3 Rollup merge of #35713 - sanxiyn:ui-test, r=nikomatsakis
Use UI test to test spans, instead of forced line break

There must be lots more, but these are what I could easily find.
2016-08-17 06:25:27 -07:00
Jonathan Turner
6193b1f43e Rollup merge of #35708 - sanxiyn:new-error-format, r=nikomatsakis
RUST_NEW_ERROR_FORMAT is no more

So stop setting the environment variable.
2016-08-17 06:25:27 -07:00
Jonathan Turner
3dd060f065 Rollup merge of #35707 - frewsxcv:vec-into-iter-debug, r=alexcrichton
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-17 06:25:26 -07:00
Jonathan Turner
c1e9ea0b2d Rollup merge of #35695 - matthew-piziak:vec-assert-over-println, r=GuillaumeGomez
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-17 06:25:26 -07:00
Jonathan Turner
49a2873cfc Rollup merge of #35690 - matthew-piziak:op-overloading-limited, r=steveklabnik
expound on limitations of Rust's trait-based operator overloading

Part of #29330
2016-08-17 06:25:26 -07:00
Jonathan Turner
f0f12d9fb1 Rollup merge of #35686 - mikhail-m1:master, r=jonathandturner
update E0375 to new format

fixes #35635 as part of #35233.

r? @jonathandturner
2016-08-17 06:25:26 -07:00
Jonathan Turner
eb91d33a14 Rollup merge of #35681 - Rufflewind:patch-1, r=apasel422
Fix spacing in code of closures.md

The spacing seems inconsistent with existing style conventions.
2016-08-17 06:25:26 -07:00
Jonathan Turner
eac17f1ee8 Rollup merge of #35672 - yossi-k:issue/35323, r=GuillaumeGomez
Update E0322 to new format

Fixes #35323. Part of #35233.
r? @GuillaumeGomez
2016-08-17 06:25:25 -07:00
Jonathan Turner
8ff8f77b77 Rollup merge of #35671 - canaltinova:E0392, r=jonathandturner
Update E0392 to new error format

Fixes #35631. Part of #35233
r? @jonathandturner or @GuillaumeGomez
2016-08-17 06:25:25 -07:00
Jonathan Turner
02a8e2c285 Rollup merge of #35670 - RockyTV:e0365, r=jonathandturner
Update error E0365 to new format

Fixes #35633 as part of #35233.

r? @jonathandturner
2016-08-17 06:25:25 -07:00
Jonathan Turner
ea09b7d8c6 Rollup merge of #35663 - CryZe:no-stdlib, r=Manishearth
Improve `No stdlib` and related Documentation

This renames all lang item function names to the ones used in `libstd` and `libpanic_unwind`. It also explains the `eh_unwind_resume` lang item in the `libcore` documentation, where it was missing. A third function is also needed on certain compilation targets, so this was also added to the `No stdlib` documentation.
2016-08-17 06:25:25 -07:00
Jonathan Turner
a9e3cffde1 Rollup merge of #35660 - terrynsun:e0207, r=jonathandturner
Update E0207 label to report parameter type

Fixes #35642.

r? @jonathandturner (Is this okay? I tagged you since it's a simple error fix similar to the other update ones.)
2016-08-17 06:25:24 -07:00
Jonathan Turner
b444ac69c0 Rollup merge of #35621 - frewsxcv:cstring-from-vec-doc, r=peschkaj
Add doc example for `std::ffi::CString::from_vec_unchecked`.

None
2016-08-17 06:25:24 -07:00
Jonathan Turner
74549f8ef2 Rollup merge of #35614 - srinivasreddy:syntax_ext_rustfmt, r=nikomatsakis
run rustfmt on libsyntax_ext folder
2016-08-17 06:25:24 -07:00
Jonathan Turner
559bfd68e3 Rollup merge of #35613 - matthew-piziak:array-docs-trait-justification, r=steveklabnik
provide additional justification for array interface design

Explain why Rust does not implement traits for large arrays.

Explain why most methods are implemented on slices rather than arrays.

Note: I'm dipping my toes in the water with a tiny PR. Especially looking for feedback on wording and style. Points of concern: appropriate level of top-level explanation; foreshadowing (is it appropriate to imply that we expect Rust's type system to eventually support size-generic arrays?); using `Foo` and `Bar` as type variables instead of e.g. `T` and `S`.

@peschkaj
2016-08-17 06:25:24 -07:00
Jonathan Turner
997a248c01 Rollup merge of #35610 - JessRudder:33637-doc-update-for-str-representaton, r=steveklabnik
Add note to docs for &str that example is to demo internals only

r? @steveklabnik

This adds a note below the &str representation example explaining that the example provided should not be used under normal circumstances..

Would it make sense to point people in the direction of the method(s) they should use instead?  I left it out in the interest of not complicating the documentation, but, there's definitely an argument to be made for adding a bit of guidance in there.
2016-08-17 06:25:24 -07:00
Jonathan Turner
b8859f6956 Rollup merge of #35595 - urschrei:associated_types_docfix, r=steveklabnik
Clarify type declaration language in Associated Types docs

A small fix for the Associated Types docs

r? @steveklabnik
2016-08-17 06:25:23 -07:00
Jonathan Turner
d3f55e1e86 Rollup merge of #35415 - silenuss:e0030-formatting, r=jonathandturner
Update compiler error 0030 to use new error format.

Part of #35233,
Addresses #35204

r? @jonathandturner
2016-08-17 06:25:23 -07:00
Jonathan Turner
e83bff90ff Rollup merge of #34370 - steveklabnik:keyword-ref-mention, r=Manishearth
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-17 06:25:22 -07:00
bors
6c0d66af69 Auto merge of #35236 - nrc:rustdoc-redirects, r=@alexcrichton
rustdoc: redirect URLs

cc #35020 which does this properly

r? @alexcrichton
2016-08-17 03:20:13 -07:00
bors
d6d0590469 Auto merge of #35605 - eddyb:substs, r=nikomatsakis
Remove the ParamSpace separation from formal and actual generics in rustc.

This is the first step towards enabling the typesystem implemented by `rustc` to be extended
(with generic modules, HKT associated types, generics over constants, etc.).

The current implementation splits all formal (`ty::Generics`) and actual (`Substs`) lifetime and type parameters (and even `where` clauses) into 3 "parameter spaces":
* `TypeSpace` for `enum`, `struct`, `trait` and `impl`
* `SelfSpace` for `Self` in a `trait`
* `FnSpace` for functions and methods

For example, in `<X as Trait<A, B>>::method::<T, U>`, the `Substs` are `[[A, B], [X], [T, U]]`.
The representation uses a single `Vec` with 2 indices where it's split into the 3 "parameter spaces".
Such a simplistic approach doesn't scale beyond the Rust 1.0 typesystem, and its existence was mainly motivated by keeping code manipulating generic parameters correct, across all possible situations.

Summary of changes:
* `ty::Generics` are uniformly stored and can be queried with `tcx.lookup_generics(def_id)`
 * the `typeck::collect` changes for this resulted in a function to lazily compute the `ty::Generics` for a local node, given only its `DefId` - this can be further generalized to other kinds of type information
* `ty::Generics` and `ty::GenericPredicates` now contain only their own parameters (or `where` clauses, respectively), and refer to their "parent", forming a linked list
 * right now most items have one level of nesting, only associated items and variants having two
 * in the future, if `<X as mod1<A>::mod2<B>::mod3::Trait<C>>::Assoc<Y>` is supported, it would be represented by item with the path `mod1::mod2::mod3::Trait::Assoc`, and 4 levels of generics: `mod1` with `[A]`, `mod2` with `[B]`, `Trait` with `[X, C]` and `Assoc` with `[Y]`
* `Substs` gets two new APIs for working with arbitrary items:
 * `Substs::for_item(def_id, mk_region, mk_type)` will construct `Substs` expected by the definition `def_id`, calling `mk_region` for lifetime parameters and `mk_type` for type parameters, and it's guaranteed to *always* return `Substs` compatible with `def_id`
 * `substs.rebase_onto(from_base_def_id, to_base_substs)` can be used if `substs` is for an item nested within `from_base_def_id` (e.g. an associated item), to replace the "outer parameters" with `to_base_substs` - for example, you can translate a method's `Substs` between a `trait` and an `impl` (in both directions) if you have the `DefId` of one and `Substs` for the other
* trait objects, without a `Self` in their `Substs`, use *solely* `ExistentialTraitRef` now, letting `TraitRef` assume it *always* has a `Self` present
* both `TraitRef` and `ExistentialTraitRef` get methods which do operations on their `Substs` which are valid only for traits (or trait objects, respectively)
* `Substs` loses its "parameter spaces" distinction, with effectively no code creating `Substs` in an ad-hoc manner, or inspecting them, without knowing what shape they have already

Future plans:
* combine both lifetimes and types in a single `Vec<Kind<'tcx>>` where `Kind` would be a tagged pointer that can be `Ty<'tcx>`, `&'tcx ty::Region` or, in the future, potentially-polymorphic constants
 * this would require some performance investigation, if it implies a lot of dynamic checks
* introduce an abstraction for `(T, Substs)`, where the `Substs` are even more hidden away from code
manipulating it; a precedent for this is `Instance` in trans, which has `T = DefId`; @nikomatsakis also referred to this, as "lazy substitution", when `T = Ty`
* rewrite type pretty-printing to fully take advantage of this to inject actual in the exact places of formal generic parameters in any paths
* extend the set of type-level information (e.g. beyond `ty::Generics`) that can be lazily queried during `typeck` and introduce a way to do those queries from code that can't refer to `typeck` directly
 * this is almost unrelated but is necessary for DAG-shaped recursion between constant evaluation and type-level information, i.e. for implementing generics over constants

r? @nikomatsakis
cc @rust-lang/compiler

cc @nrc Could get any perf numbers ahead of merging this?
2016-08-16 22:52:55 -07:00
Jacob
7675e4b514 Update E0009 to new format 2016-08-16 22:21:31 -07:00
Neil Williams
4254b31078 Update minimum CMake version in README
The minimum got bumped in the LLVM upgrade of #34743.
2016-08-16 21:30:17 -07:00
Nick Cameron
879637f7b0 Review changes 2016-08-17 16:12:37 +12:00
Eduard Burtescu
9453d9b8ad rustc: remove ParamSpace from Substs. 2016-08-17 06:32:00 +03:00
Eduard Burtescu
6f5e455c2d rustc: split GenericPredicates of a method from its parent predicates. 2016-08-17 05:50:57 +03:00
Eduard Burtescu
3e74e5bffe rustc: split Generics of a method from its parent Generics. 2016-08-17 05:50:57 +03:00