]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoUpgrade ProjectionTy's Name to a DefId
Tobias Schottdorf [Wed, 31 May 2017 16:35:13 +0000 (12:35 -0400)]
Upgrade ProjectionTy's Name to a DefId

Part of #42171, in preparation for downgrading the contained `TraitRef` to
only its `substs`.

7 years agoincr.comp.: Use DefPathHash-based DepNodes in the serialized DepGraph and remove...
Michael Woerister [Wed, 31 May 2017 14:42:52 +0000 (16:42 +0200)]
incr.comp.: Use DefPathHash-based DepNodes in the serialized DepGraph and remove obsolete DefIdDirectory.

7 years agoEmit proper expectation for the "default" keyword.
Masaki Hara [Wed, 31 May 2017 14:22:33 +0000 (23:22 +0900)]
Emit proper expectation for the "default" keyword.

7 years agoDon't print the whole crate disambiguator value in debug output
Michael Woerister [Wed, 31 May 2017 13:55:35 +0000 (15:55 +0200)]
Don't print the whole crate disambiguator value in debug output

7 years agoBuild DefPathHash->DefId table when incr.comp. is enabled
Michael Woerister [Wed, 31 May 2017 12:53:39 +0000 (14:53 +0200)]
Build DefPathHash->DefId table when incr.comp. is enabled

7 years agoMake a newtype for DefPathHash so they are not confused with content hashes
Michael Woerister [Wed, 31 May 2017 11:54:38 +0000 (13:54 +0200)]
Make a newtype for DefPathHash so they are not confused with content hashes

7 years agoParse macros named "default" correctly.
Masaki Hara [Wed, 31 May 2017 10:24:01 +0000 (19:24 +0900)]
Parse macros named "default" correctly.

7 years agofix links to "module-level documentation"
Raphaël Huchet [Wed, 31 May 2017 09:38:19 +0000 (11:38 +0200)]
fix links to "module-level documentation"

7 years agoAdd some try_trait ramblings to the unstable book
Scott McMurray [Wed, 31 May 2017 09:16:01 +0000 (02:16 -0700)]
Add some try_trait ramblings to the unstable book

7 years agoUpdate closure errors to use `span_note`
Tommy Ip [Tue, 30 May 2017 23:07:09 +0000 (00:07 +0100)]
Update closure errors to use `span_note`

7 years agoAuto merge of #42318 - GuillaumeGomez:rustdoc-fix-signature, r=QuietMisdreavus
bors [Wed, 31 May 2017 08:48:16 +0000 (08:48 +0000)]
Auto merge of #42318 - GuillaumeGomez:rustdoc-fix-signature, r=QuietMisdreavus

Fix signature by adding parens when needed

Fixes #42299.

7 years agoGive the `try_trait` feature its own tracking issue
Scott McMurray [Wed, 31 May 2017 08:30:13 +0000 (01:30 -0700)]
Give the `try_trait` feature its own tracking issue

7 years agoassociated_consts: check trait obligations and regionck for associated consts
Sean McArthur [Wed, 31 May 2017 05:21:00 +0000 (22:21 -0700)]
associated_consts: check trait obligations and regionck for associated consts

Closes #41323

7 years agoFix signature by adding parens when needed
Guillaume Gomez [Tue, 30 May 2017 21:01:38 +0000 (23:01 +0200)]
Fix signature by adding parens when needed

7 years agoAdd 'the'
Stjepan Glavina [Tue, 30 May 2017 19:34:50 +0000 (21:34 +0200)]
Add 'the'

7 years agoTurn `invalid_type_param_default` into a lint again
Vadim Petrochenkov [Fri, 26 May 2017 22:52:25 +0000 (01:52 +0300)]
Turn `invalid_type_param_default` into a lint again

7 years agoTurn public reexporting of private extern crates into a lint again
Vadim Petrochenkov [Sun, 21 May 2017 12:50:38 +0000 (15:50 +0300)]
Turn public reexporting of private extern crates into a lint again

7 years agoTurn sufficiently old compatibility lints into hard errors
Vadim Petrochenkov [Sun, 21 May 2017 11:11:08 +0000 (14:11 +0300)]
Turn sufficiently old compatibility lints into hard errors

7 years agoAdd new error code
Guillaume Gomez [Mon, 29 May 2017 16:46:29 +0000 (18:46 +0200)]
Add new error code

7 years agoRangeFrom should have an infinite size_hint
Scott McMurray [Tue, 30 May 2017 16:15:25 +0000 (09:15 -0700)]
RangeFrom should have an infinite size_hint

This makes the size_hint from things like `take` more precise.

7 years agoARMv5 needs +strict-align
Jan Niehusmann [Tue, 30 May 2017 15:50:44 +0000 (17:50 +0200)]
ARMv5 needs +strict-align

Without that flag, LLVM generates unaligned memory access instructions, which are not allowed on ARMv5.

For example, the 'hello world' example from `cargo --new` failed with:
```
$ ./hello
Hello, world!
thread 'main' panicked at 'assertion failed: end <= len', src/libcollections/vec.rs:1113
note: Run with `RUST_BACKTRACE=1` for a backtrace.
```

I traced this error back to the following assembler code in `BufWriter::flush_buf`:
```
    6f44:       e28d0018        add     r0, sp, #24
[...]
    6f54:       e280b005        add     fp, r0, #5
[...]
    7018:       e5cd001c        strb    r0, [sp, #28]
    701c:       e1a0082a        lsr     r0, sl, #16
    7020:       03a01001        moveq   r1, #1
    7024:       e5cb0002        strb    r0, [fp, #2]
    7028:       e1cba0b0        strh    sl, [fp]
```

Note that `fp` points to `sp + 29`, so the three `str*`-instructions should fill up a 32bit - value at `sp + 28`, which is later used as the value `n` in `Ok(n) => written += n`. This doesn't work on ARMv5 as the `strh` can't write to the unaligned contents of `fp`, so the upper bits of `n` won't get cleared, leading to the assertion failure in Vec::drain.

With `+strict-align`, the code works as expected.

7 years agorustbuild: Fix copying duplicate crates into the sysroot
Alex Crichton [Sat, 27 May 2017 17:19:43 +0000 (10:19 -0700)]
rustbuild: Fix copying duplicate crates into the sysroot

After compiling a project (e.g. libstd, libtest, or librustc) rustbuild needs to
copy over all artifacts into the sysroot of the compiler it's assembling.
Unfortunately rustbuild doesn't know precisely what files to copy! Today it has
a heuristic where it just looks at the most recent version of all files that
look like rlibs/dylibs and copies those over. This unfortunately leads to bugs
with different versions of the same craet as seen in #42261.

This commit updates rustbuild's strategy of copying artifacts to work off the
list of artifacts produced by `cargo build --message-format=json`. The build
system will now parse json messages coming out of Cargo to watch for files being
generated, and then it'll only copy over those precise files.

Note that there's still a bit of weird logic where Cargo prints that it's
creating `libstd.rlib` where we actually want `libstd-xxxxx.rlib`, so we still
do a bit of "most recent file" probing for those. This commit should take care
of the crates.io dependency issues, however, as they're all copied over
precisely.

Closes #42261

7 years agoAuto merge of #42311 - bjorn3:patch-1, r=frewsxcv
bors [Tue, 30 May 2017 12:38:57 +0000 (12:38 +0000)]
Auto merge of #42311 - bjorn3:patch-1, r=frewsxcv

Syntax highlight all rust code in librustc/traits/README.md

Also replace `...` with `/*...*/`

7 years agoSyntax highlight all rust code in librustc/traits/README.md
bjorn3 [Tue, 30 May 2017 12:37:19 +0000 (14:37 +0200)]
Syntax highlight all rust code in librustc/traits/README.md

Also replace `...` with `/*...*/`

7 years agoUpdate fn_once-moved test
Tommy Ip [Tue, 30 May 2017 09:47:51 +0000 (10:47 +0100)]
Update fn_once-moved test

7 years agoExplain why closure is moved in error message
Tommy Ip [Sun, 28 May 2017 21:08:51 +0000 (22:08 +0100)]
Explain why closure is moved in error message

7 years agoAuto merge of #42283 - Mark-Simulacrum:issue-40341, r=pnkfelix
bors [Tue, 30 May 2017 05:01:10 +0000 (05:01 +0000)]
Auto merge of #42283 - Mark-Simulacrum:issue-40341, r=pnkfelix

Add note regarding parent module containing use statement.

Fixes #40341.

7 years agoFix formatting issues in Distribution.xml
Edward Yang [Tue, 30 May 2017 02:55:35 +0000 (21:55 -0500)]
Fix formatting issues in Distribution.xml

7 years agoAdd RLS to .pkg installer
Edward Yang [Tue, 30 May 2017 02:44:09 +0000 (21:44 -0500)]
Add RLS to .pkg installer

7 years agoAuto merge of #42282 - Mark-Simulacrum:issue-40342, r=arielb1
bors [Tue, 30 May 2017 02:38:18 +0000 (02:38 +0000)]
Auto merge of #42282 - Mark-Simulacrum:issue-40342, r=arielb1

Don't warn on lifetime generic no_mangle functions.

Fixes #40342.

7 years agoAdd RLS to .exe and .msi installers
Edward Yang [Tue, 30 May 2017 02:31:33 +0000 (21:31 -0500)]
Add RLS to .exe and .msi installers

7 years agoAuto merge of #42180 - GuillaumeGomez:update-rustdoc-man, r=QuietMisdreavus
bors [Tue, 30 May 2017 00:18:23 +0000 (00:18 +0000)]
Auto merge of #42180 - GuillaumeGomez:update-rustdoc-man, r=QuietMisdreavus

Update rustdoc man page

r? @rust-lang/docs
r? @rust-lang/dev-tools

7 years agoAuto merge of #42264 - GuillaumeGomez:new-error-codes, r=Susurrus
bors [Mon, 29 May 2017 21:55:57 +0000 (21:55 +0000)]
Auto merge of #42264 - GuillaumeGomez:new-error-codes, r=Susurrus

New error codes

Part of #42229.

7 years agoAuto merge of #42214 - RalfJung:rust-src, r=alexcrichton
bors [Mon, 29 May 2017 19:31:03 +0000 (19:31 +0000)]
Auto merge of #42214 - RalfJung:rust-src, r=alexcrichton

rust-src: include everything needed to compile libstd with jemalloc

I am not very happy about all this `Path::new`, but did not find a nice way to avoid it. Also, this shouldn't be very performance-critical.

With this patch, rust-src-1.19.0-dev.tar.gz grows from 1.4 to 3.1 MiB (new uncompressed size: 15.5 MiB). Not great, but shipping incomplete sources is also not great, and this is still much smaller than pre-#41546. Excluding the entire `src/jemalloc/test` does not work, unfortunately; there is a file in there that is needed to build libstd. (And anyway there's just 190 KiB uncompressed left in that folder.)

In principle, we could try excluding the Rust test suite directories (that would be `libcore/tests` and `libcollection/tests`). I don't know enough about how this component is used to judge whether that would cause any problems. Anyway this is just 600 KiB uncompressed.

Fixes #41952

7 years agoAuto merge of #42192 - michaelwoerister:no_deptracking_map_in_queries, r=nikomatsakis
bors [Mon, 29 May 2017 17:10:08 +0000 (17:10 +0000)]
Auto merge of #42192 - michaelwoerister:no_deptracking_map_in_queries, r=nikomatsakis

incr.comp.: Remove DepGraph::write() and its callers

After months of yak shaving, we are finally there `:)`

The existence of `DepGraph::write()` was one of the two main ways for introducing cycles into the dep-graph -- something we need to avoid in the future. The other way, re-opening nodes to add more edges, is next on the list.

r? @nikomatsakis

7 years agoRemove --crate-type=metadata deprecation warning
Michael Kohl [Sun, 28 May 2017 06:49:14 +0000 (13:49 +0700)]
Remove --crate-type=metadata deprecation warning

Fixes #38640

7 years agoAuto merge of #41856 - qnighy:prohibit-parenthesized-params-in-more-types, r=arielb1
bors [Mon, 29 May 2017 11:32:14 +0000 (11:32 +0000)]
Auto merge of #41856 - qnighy:prohibit-parenthesized-params-in-more-types, r=arielb1

Prohibit parenthesized params in more types.

Prohibit parenthesized parameters in primitive types, type parameters, `Self`, etc.

Fixes #32995.

7 years agoRemove DepGraph::write() and its callers.
Michael Woerister [Tue, 16 May 2017 16:48:42 +0000 (18:48 +0200)]
Remove DepGraph::write() and its callers.

7 years agoAuto merge of #42262 - Mark-Simulacrum:issue-40350, r=eddyb
bors [Mon, 29 May 2017 09:04:08 +0000 (09:04 +0000)]
Auto merge of #42262 - Mark-Simulacrum:issue-40350, r=eddyb

Don't ICE with nested enums in missing docs lint.

Fixes #40350.

7 years agoUpdate rustdoc man page
Guillaume Gomez [Tue, 23 May 2017 19:22:51 +0000 (21:22 +0200)]
Update rustdoc man page

7 years agorust-src: include everything needed to compile libstd with jemalloc
Ralf Jung [Thu, 25 May 2017 01:31:05 +0000 (18:31 -0700)]
rust-src: include everything needed to compile libstd with jemalloc

7 years agoAuto merge of #42246 - alexcrichton:update-cargo, r=nikomatsakis
bors [Mon, 29 May 2017 03:37:28 +0000 (03:37 +0000)]
Auto merge of #42246 - alexcrichton:update-cargo, r=nikomatsakis

Updated locked version of libgit2

This should include a fix for rust-lang/cargo#4091 with an updated version of
libgit2.

Closes rust-lang/cargo#4091

7 years agoAuto merge of #42218 - venkatagiri:update_cross, r=alexchrichton
bors [Sun, 28 May 2017 22:15:10 +0000 (22:15 +0000)]
Auto merge of #42218 - venkatagiri:update_cross, r=alexchrichton

use shared scripts for init and sccache in cross image

cc #42201
cc @malbarbo

7 years agoClarify docs on implementing Into.
Clar Charr [Sat, 20 May 2017 19:24:43 +0000 (15:24 -0400)]
Clarify docs on implementing Into.

7 years agoAdd note regarding parent module containing use statement.
Mark Simulacrum [Sun, 28 May 2017 14:28:21 +0000 (08:28 -0600)]
Add note regarding parent module containing use statement.

7 years agoUpdated locked version of libgit2
Alex Crichton [Fri, 26 May 2017 14:46:41 +0000 (07:46 -0700)]
Updated locked version of libgit2

This should include a fix for rust-lang/cargo#4091 with an updated version of
libgit2.

Closes rust-lang/cargo#4091

7 years agoAuto merge of #42175 - michaelwoerister:filemap-hashing-fix-1, r=nikomatsakis
bors [Sun, 28 May 2017 16:47:17 +0000 (16:47 +0000)]
Auto merge of #42175 - michaelwoerister:filemap-hashing-fix-1, r=nikomatsakis

incr.comp.: Track expanded spans instead of FileMaps.

This PR removes explicit tracking of FileMaps in response to #42101. The reasoning behind being able to just *not* track access to FileMaps is similar to why we don't track access to the `DefId->DefPath` map:
1. One can only get ahold of a `Span` value by accessing the HIR (for local things) or a `metadata::schema::Entry` (for things from external crates).
2. For both of these things we compute a hash that incorporates the *expanded spans*, that is, what we hash is in the (FileMap independent) format `filename:line:col`.
3. Consequently, everything that emits a span should already be tracked via its dependency to something that has the span included in its hash and changes would be detected via that hash.

One caveat here is that we have to be conservative when exporting things in metadata. A crate can be built without debuginfo and would thus by default not incorporate most spans into the metadata hashes. However, a downstream crate can make an inline copy of things in the upstream crate and span changes in the upstream crate would then go undetected, even if the downstream uses them (e.g. by emitting debuginfo for an inlined function). For this reason, we always incorporate spans into metadata hashes for now (there might be more efficient ways to handle this safely when red-green tracking is implemented).

r? @nikomatsakis

7 years agoAuto merge of #42167 - scottmcm:iter-stepby-sizehint, r=alexcrichton
bors [Sun, 28 May 2017 14:26:52 +0000 (14:26 +0000)]
Auto merge of #42167 - scottmcm:iter-stepby-sizehint, r=alexcrichton

Override size_hint and propagate ExactSizeIterator for iter::StepBy

Generally useful, but also a prerequisite for moving a bunch of unit tests off `Range*::step_by`.

A small non-breaking subset of https://github.com/rust-lang/rust/pull/42110 (which I closed).

Includes two small documentation changes @ivandardi requested on that PR.

r? @alexcrichton

7 years agoDon't warn on lifetime generic no_mangle functions.
Mark Simulacrum [Sun, 28 May 2017 14:12:19 +0000 (08:12 -0600)]
Don't warn on lifetime generic no_mangle functions.

7 years agoAuto merge of #41917 - arielb1:mir-array, r=nagisa
bors [Sun, 28 May 2017 12:01:02 +0000 (12:01 +0000)]
Auto merge of #41917 - arielb1:mir-array, r=nagisa

Translate array drop glue using MIR

I was a bit lazy here and used a usize-based index instead of a pointer iteration. Do you think this is important @eddyb?

r? @eddyb

7 years agoAuto merge of #42276 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Sun, 28 May 2017 09:40:47 +0000 (09:40 +0000)]
Auto merge of #42276 - Mark-Simulacrum:rollup, r=Mark-Simulacrum

Rollup of 6 pull requests

- Successful merges: #42207, #42217, #42249, #42251, #42260, #42266
- Failed merges:

7 years agofix translation of MSVC funclets that loop to their own start
Ariel Ben-Yehuda [Tue, 23 May 2017 20:47:15 +0000 (23:47 +0300)]
fix translation of MSVC funclets that loop to their own start

7 years agoincrease macro recursion limit
Ariel Ben-Yehuda [Tue, 23 May 2017 19:01:51 +0000 (22:01 +0300)]
increase macro recursion limit

7 years agouse a pointer-based array drop loop for non-zero-sized types
Ariel Ben-Yehuda [Thu, 18 May 2017 20:59:39 +0000 (23:59 +0300)]
use a pointer-based array drop loop for non-zero-sized types

7 years agofix loops in unwind code in MSVC
Ariel Ben-Yehuda [Thu, 18 May 2017 20:58:39 +0000 (23:58 +0300)]
fix loops in unwind code in MSVC

I'm not sure how well this works, but it's worth a try.

7 years agofix RUST_LOG ICE caused by printing a default impl's DefId
Ariel Ben-Yehuda [Thu, 18 May 2017 17:56:25 +0000 (20:56 +0300)]
fix RUST_LOG ICE caused by printing a default impl's DefId

7 years agoadd NullOp::SizeOf and BinOp::Offset
Ariel Ben-Yehuda [Thu, 18 May 2017 15:43:52 +0000 (18:43 +0300)]
add NullOp::SizeOf and BinOp::Offset

7 years agouse Eq instead of Lt in loop
Ariel Ben-Yehuda [Mon, 15 May 2017 14:13:12 +0000 (17:13 +0300)]
use Eq instead of Lt in loop

7 years agomove "ADT master drop flag" logic to `open_drop_for_adt_contents`
Ariel Ben-Yehuda [Mon, 15 May 2017 12:22:59 +0000 (15:22 +0300)]
move "ADT master drop flag" logic to `open_drop_for_adt_contents`

Fixes #41888.

7 years agoaddress review comments
Ariel Ben-Yehuda [Fri, 12 May 2017 12:00:36 +0000 (15:00 +0300)]
address review comments

7 years agorefactor trans::mir::block to trans all calls through the same code
Ariel Ben-Yehuda [Wed, 10 May 2017 23:01:25 +0000 (02:01 +0300)]
refactor trans::mir::block to trans all calls through the same code

7 years agotranslate array drop glue using MIR
Ariel Ben-Yehuda [Wed, 10 May 2017 22:02:52 +0000 (01:02 +0300)]
translate array drop glue using MIR

This fixes leakage on panic with arrays & slices. I am using a C-style
for-loop instead of a pointer-based loop because that would be ugly-er
to implement.

7 years agoRollup merge of #42266 - rkruppe:clean-trans-api, r=arielb1
Mark Simulacrum [Sun, 28 May 2017 02:54:05 +0000 (20:54 -0600)]
Rollup merge of #42266 - rkruppe:clean-trans-api, r=arielb1

Remove unused APIs from rustc_trans

There were public re-exports of some rustc modules dating back to 2011 or so. While I was at it, some functions and modules were public but never used outside the crate. I made them private or `pub(crate)` as appropriate and in one case removed an unused function.

7 years agoRollup merge of #42260 - stjepang:document-cmp-traits-agreement, r=alexcrichton
Mark Simulacrum [Sun, 28 May 2017 02:54:04 +0000 (20:54 -0600)]
Rollup merge of #42260 - stjepang:document-cmp-traits-agreement, r=alexcrichton

Docs: impls of PartialEq/PartialOrd/Ord must agree

Fixes #41270.

This PR brings two improvements to the docs:

1. Docs for `PartialEq`, `PartialOrd`, and `Ord` clarify that their implementations must agree.
2. Fixes a subtle bug in the Dijkstra example for `BinaryHeap`, where the impls are inconsistent.
Thanks @Rufflewind for spotting the bug!

r? @alexcrichton
cc @frankmcsherry

7 years agoRollup merge of #42251 - nikomatsakis:issue-42210-regr-unsized-tail, r=eddyb
Mark Simulacrum [Sun, 28 May 2017 02:54:03 +0000 (20:54 -0600)]
Rollup merge of #42251 - nikomatsakis:issue-42210-regr-unsized-tail, r=eddyb

extend `struct_tail` to operate over tuples

Not 100% sure why this got exposed when it wasn't before, but this struct definitely seems wrong.

Fixes #42110

r? @eddyb

7 years agoRollup merge of #42249 - Mark-Simulacrum:issue-40244, r=eddyb
Mark Simulacrum [Sun, 28 May 2017 02:54:02 +0000 (20:54 -0600)]
Rollup merge of #42249 - Mark-Simulacrum:issue-40244, r=eddyb

Allow variadic functions with cdecl calling convention.

Fixes #40244.

7 years agoRollup merge of #42217 - venkatagiri:issue_39974, r=Mark-Simulacrum
Mark Simulacrum [Sun, 28 May 2017 02:54:01 +0000 (20:54 -0600)]
Rollup merge of #42217 - venkatagiri:issue_39974, r=Mark-Simulacrum

regression test for #39974

closes #39974

r? @Mark-Simulacrum

7 years agoRollup merge of #42207 - Nashenas88:remove_fragment_info, r=eddyb
Mark Simulacrum [Sun, 28 May 2017 02:54:00 +0000 (20:54 -0600)]
Rollup merge of #42207 - Nashenas88:remove_fragment_info, r=eddyb

Remove all instances of fragment_infos and fragment sets

Remove unused fragment structs. This was suggested by @eddyb in IRC: [botbot link](https://botbot.me/mozilla/rustc/2017-05-23/?msg=86016574&page=2).

7 years agoAuto merge of #42162 - est31:closure-to-fn-coercion, r=aturon
bors [Sat, 27 May 2017 23:02:44 +0000 (23:02 +0000)]
Auto merge of #42162 - est31:closure-to-fn-coercion, r=aturon

Stabilize non capturing closure to fn coercion

Stabilisation PR for non capturing closure to fn coercion.

closes #39817

7 years agoAuto merge of #42137 - nical:doc-clone, r=BurntSushi
bors [Sat, 27 May 2017 20:35:25 +0000 (20:35 +0000)]
Auto merge of #42137 - nical:doc-clone, r=BurntSushi

Update to Rc and Arc documentation to favor the Rc::clone(&ptr) syntax.

This is a followup of the discussion in https://github.com/rust-lang/rfcs/pull/1954.

The solution chosen by the core team to address the problem tackled by the [the RFC](https://github.com/rust-lang/rfcs/pull/1954) was to make the function call syntax Rc::clone(&foo) the idiomatic way to clone a reference counted pointer (over the method call syntax foo.clone()).
This change updates the documentation of Rc, Arc and their respective Weak pointers to reflect this decision and bring more exposure to the existence of the function call syntax.

7 years agoAdd invalid unary operator usage error code
Guillaume Gomez [Sat, 27 May 2017 19:34:59 +0000 (21:34 +0200)]
Add invalid unary operator usage error code

7 years agoRemove trans-internal re-exports of rustc modules
Robin Kruppe [Sat, 27 May 2017 18:48:09 +0000 (20:48 +0200)]
Remove trans-internal re-exports of rustc modules

The previous commit removed them from the public API, this rewrites the use statements to get rid of the non-standard re-exports.

7 years agoReduce API surface of rustc_trans
Robin Kruppe [Sat, 27 May 2017 18:13:32 +0000 (20:13 +0200)]
Reduce API surface of rustc_trans

Mark various items and fields as private or pub(crate), and remove a function that turns out to be unused.
These are not used anywhere in-tree, but I guess it's a [breaking-change] for plugins.

7 years agoFix ICE on inner enum in missing docs lint.
Mark Simulacrum [Sat, 27 May 2017 16:06:15 +0000 (10:06 -0600)]
Fix ICE on inner enum in missing docs lint.

This also simplifies the lint by not storing variant depth or the struct
def stack, because we no longer need them.

7 years agoAdd new error codes and update tests
Guillaume Gomez [Sat, 27 May 2017 17:58:52 +0000 (19:58 +0200)]
Add new error codes and update tests

7 years agoAuto merge of #42103 - jorendorff:master, r=estebank
bors [Sat, 27 May 2017 17:38:11 +0000 (17:38 +0000)]
Auto merge of #42103 - jorendorff:master, r=estebank

trace_macro: Show both the macro call and its expansion. #42072.

See #42072 for the initial motivation behind this.

The change is not the minimal fix, but I want this behavior almost every time I use `trace_macros`.

7 years agoDocs: impls of PartialEq/PartialOrd/Ord must agree
Stjepan Glavina [Sat, 27 May 2017 15:00:11 +0000 (17:00 +0200)]
Docs: impls of PartialEq/PartialOrd/Ord must agree

7 years agoAdd new error codes
Guillaume Gomez [Sat, 27 May 2017 14:31:43 +0000 (16:31 +0200)]
Add new error codes

7 years agoAllow variadic functions with cdecl calling convention.
Mark Simulacrum [Fri, 26 May 2017 16:54:56 +0000 (10:54 -0600)]
Allow variadic functions with cdecl calling convention.

7 years agoAuto merge of #42109 - Keruspe:master, r=alexcrichton
bors [Sat, 27 May 2017 11:23:45 +0000 (11:23 +0000)]
Auto merge of #42109 - Keruspe:master, r=alexcrichton

rustbuild: don't create a source tarball when installing

This splits Install out of Dist as it is not a full dist anymore, and creates the source tarball only for the Dist command.
This will allow splitting install in a few rules if we want as it's done for other phases.

7 years agoAuto merge of #42068 - petrochenkov:ustab, r=nikomatsakis
bors [Sat, 27 May 2017 05:28:24 +0000 (05:28 +0000)]
Auto merge of #42068 - petrochenkov:ustab, r=nikomatsakis

Stabilize unions with `Copy` fields and no destructor

What else is needed:
- [x] Documentation (https://github.com/rust-lang-nursery/reference/pull/57).
- [x] Making assignments to `Copy` union fields safe (https://github.com/rust-lang/rust/pull/42083).
- [ ] Backport? (The "stabilization decision" is from [Apr 13](https://github.com/rust-lang/rust/issues/32836#issuecomment-294018091), it's just this PR is late.)

cc https://github.com/rust-lang/rust/issues/32836
r? @nikomatsakis

7 years agoClarify the docs for align_of and its variants
Stjepan Glavina [Fri, 26 May 2017 22:25:21 +0000 (00:25 +0200)]
Clarify the docs for align_of and its variants

7 years agoStabilize unions with `Copy` fields and no destructor
Vadim Petrochenkov [Wed, 17 May 2017 21:22:52 +0000 (00:22 +0300)]
Stabilize unions with `Copy` fields and no destructor

7 years agoextend `struct_tail` to operate over closures
Niko Matsakis [Fri, 26 May 2017 20:36:40 +0000 (16:36 -0400)]
extend `struct_tail` to operate over closures

7 years agoAuto merge of #42081 - ishitatsuyuki:submodule-better, r=aidanhs
bors [Fri, 26 May 2017 18:11:54 +0000 (18:11 +0000)]
Auto merge of #42081 - ishitatsuyuki:submodule-better, r=aidanhs

Use the improved submodule handling

r? @alexcrichton

That was a crap...
```
Updating submodules
Traceback (most recent call last):
  File "./x.py", line 20, in <module>
    bootstrap.main()
  File "/home/ishitatsuyuki/Documents/rust/src/bootstrap/bootstrap.py", line 684, in main
    bootstrap()
  File "/home/ishitatsuyuki/Documents/rust/src/bootstrap/bootstrap.py", line 662, in bootstrap
    rb.update_submodules()
  File "/home/ishitatsuyuki/Documents/rust/src/bootstrap/bootstrap.py", line 566, in update_submodules
    path = line[1:].split(' ')[1]
TypeError: a bytes-like object is required, not 'str'
```

Maybe we need to confirm the compatibility of git options, such as `git config` or `git -C` (I believe they existed long before, though). This is tested locally.

7 years agoci: move musl install into their own scripts
Venkata Giri Reddy [Thu, 25 May 2017 17:01:55 +0000 (13:01 -0400)]
ci: move musl install into their own scripts

7 years agoAuto merge of #42245 - frewsxcv:rollup, r=frewsxcv
bors [Fri, 26 May 2017 15:31:49 +0000 (15:31 +0000)]
Auto merge of #42245 - frewsxcv:rollup, r=frewsxcv

Rollup of 7 pull requests

- Successful merges: #42169, #42215, #42216, #42224, #42230, #42236, #42241
- Failed merges:

7 years agoRollup merge of #42241 - king6cong:master, r=steveklabnik
Corey Farwell [Fri, 26 May 2017 14:20:30 +0000 (10:20 -0400)]
Rollup merge of #42241 - king6cong:master, r=steveklabnik

doc rewording

7 years agoRollup merge of #42236 - citizen428:docs/unchecked-indexing-slicing, r=GuillaumeGomez
Corey Farwell [Fri, 26 May 2017 14:20:29 +0000 (10:20 -0400)]
Rollup merge of #42236 - citizen428:docs/unchecked-indexing-slicing, r=GuillaumeGomez

Update documentation for indexing/slicing methods

See #39911

r? @steveklabnik

7 years agoRollup merge of #42230 - venkatagiri:ice_regression_tests, r=Mark-Simulacrum
Corey Farwell [Fri, 26 May 2017 14:20:28 +0000 (10:20 -0400)]
Rollup merge of #42230 - venkatagiri:ice_regression_tests, r=Mark-Simulacrum

regression tests for ICEs

closes #36379
closes #37550
closes #37665
closes #38160
closes #38954
closes #39362

r? @Mark-Simulacrum

7 years agoRollup merge of #42224 - brson:lockfile, r=nikomatsakis
Corey Farwell [Fri, 26 May 2017 14:20:27 +0000 (10:20 -0400)]
Rollup merge of #42224 - brson:lockfile, r=nikomatsakis

Remove stray lockfile

7 years agoRollup merge of #42216 - charliesome:associate-type-typo, r=petrochenkov
Corey Farwell [Fri, 26 May 2017 14:20:26 +0000 (10:20 -0400)]
Rollup merge of #42216 - charliesome:associate-type-typo, r=petrochenkov

Fix 'associate type' typo

I came across an error message mentioning an 'associate type'.

Since this is the only instance of this term in rustc (it's 'associated type' everywhere else), I think this might be a typo.

7 years agoRollup merge of #42215 - callahad:remove-superfluous-semis, r=Mark-Simulacrum
Corey Farwell [Fri, 26 May 2017 14:20:25 +0000 (10:20 -0400)]
Rollup merge of #42215 - callahad:remove-superfluous-semis, r=Mark-Simulacrum

Remove superfluous `;;` sequences

Ran across a doubled `;;` in the docstring for `str::split`. Grep found a few more. :)

7 years agoRollup merge of #42169 - scottmcm:new-step-trait-issue, r=alexcrichton
Corey Farwell [Fri, 26 May 2017 14:20:25 +0000 (10:20 -0400)]
Rollup merge of #42169 - scottmcm:new-step-trait-issue, r=alexcrichton

Give step_trait a distinct tracking issue from step_by

iterator_step_by has decoupled their futures, so the tracking issue should split.

Old issue: https://github.com/rust-lang/rust/issues/27741
New issue: https://github.com/rust-lang/rust/issues/42168

r? @alexcrichton (another follow-up to closed PR https://github.com/rust-lang/rust/pull/42110#issuecomment-303176049)

7 years agoAdd warning cycle #42238.
Masaki Hara [Fri, 26 May 2017 13:20:53 +0000 (22:20 +0900)]
Add warning cycle #42238.

7 years agoAuto merge of #42014 - tbu-:pr_scan_not_fused, r=alexcrichton
bors [Fri, 26 May 2017 12:54:11 +0000 (12:54 +0000)]
Auto merge of #42014 - tbu-:pr_scan_not_fused, r=alexcrichton

Remove `FusedIterator` implementation of `iter::Scan`

Fixes #41964.

This is a breaking change.

7 years agodoc rewording
king6cong [Fri, 26 May 2017 11:21:29 +0000 (19:21 +0800)]
doc rewording

7 years agoAuto merge of #42083 - petrochenkov:safeassign, r=nikomatsakis
bors [Fri, 26 May 2017 10:17:51 +0000 (10:17 +0000)]
Auto merge of #42083 - petrochenkov:safeassign, r=nikomatsakis

Make assignments to `Copy` union fields safe

This is an accompanying PR to PR https://github.com/rust-lang/rust/pull/42068 stabilizing FFI unions.

This was first proposed in https://github.com/rust-lang/rust/issues/32836#issuecomment-281296416, see subsequent comments as well.
Assignments to `Copy` union fields do not read any data from the union and are [equivalent](https://github.com/rust-lang/rust/issues/32836#issuecomment-281660298) to whole union assignments, which are safe, so they should be safe as well. This removes a significant number of "false positive" unsafe blocks, in code dealing with FFI unions in particular.

It desirable to make this change now, together with stabilization of FFI unions, because now it affecfts only unstable code, but later it will cause warnings/errors caused by `unused_unsafe` lint in stable code.

cc #32836
r? @nikomatsakis

7 years agoUpdate documentation for indexing/slicing methods
Michael Kohl [Fri, 26 May 2017 02:47:29 +0000 (09:47 +0700)]
Update documentation for indexing/slicing methods

See #39911

7 years agoAuto merge of #42058 - froydnj:thiscall-support, r=nikomatsakis
bors [Fri, 26 May 2017 07:36:25 +0000 (07:36 +0000)]
Auto merge of #42058 - froydnj:thiscall-support, r=nikomatsakis

add thiscall calling convention support

This support is needed for bindgen to work well on 32-bit Windows, and also enables people to begin experimenting with C++ FFI support on that platform.

Fixes #42044.