Commit Graph

64781 Commits

Author SHA1 Message Date
Guillaume Gomez
171d285756 Fix signature by adding parens when needed 2017-05-30 23:04:03 +02:00
Stjepan Glavina
c25e271858 Add 'the' 2017-05-30 21:34:50 +02:00
Vadim Petrochenkov
26d5c0e20c Turn invalid_type_param_default into a lint again 2017-05-30 22:00:30 +03:00
Vadim Petrochenkov
d73a0fef38 Turn public reexporting of private extern crates into a lint again 2017-05-30 22:00:30 +03:00
Vadim Petrochenkov
caecb76f08 Turn sufficiently old compatibility lints into hard errors 2017-05-30 22:00:30 +03:00
Guillaume Gomez
a333be7cfe Add new error code 2017-05-30 19:19:34 +02:00
Scott McMurray
265dce66b6 RangeFrom should have an infinite size_hint
This makes the size_hint from things like `take` more precise.
2017-05-30 09:15:25 -07:00
Jan Niehusmann
4450807ead 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.
2017-05-30 17:50:44 +02:00
Alex Crichton
2dab1e2150 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
2017-05-30 08:11:42 -07:00
bors
f89d8d1844 Auto merge of #42311 - bjorn3:patch-1, r=frewsxcv
Syntax highlight all rust code in librustc/traits/README.md

Also replace `...` with `/*...*/`
2017-05-30 12:38:57 +00:00
bjorn3
681d97f19c Syntax highlight all rust code in librustc/traits/README.md
Also replace `...` with `/*...*/`
2017-05-30 14:37:19 +02:00
Tommy Ip
31bfdd7f17 Update fn_once-moved test 2017-05-30 11:21:24 +01:00
Tommy Ip
ee88a870b6 Explain why closure is moved in error message 2017-05-30 11:05:16 +01:00
bors
e1fe1a8933 Auto merge of #42283 - Mark-Simulacrum:issue-40341, r=pnkfelix
Add note regarding parent module containing use statement.

Fixes #40341.
2017-05-30 05:01:10 +00:00
Edward Yang
f3b29d3f01 Fix formatting issues in Distribution.xml 2017-05-29 21:55:35 -05:00
Edward Yang
7c362732dc Add RLS to .pkg installer 2017-05-29 21:50:23 -05:00
bors
77d096a2bb Auto merge of #42282 - Mark-Simulacrum:issue-40342, r=arielb1
Don't warn on lifetime generic no_mangle functions.

Fixes #40342.
2017-05-30 02:38:18 +00:00
Edward Yang
eeebfd667b Add RLS to .exe and .msi installers 2017-05-29 21:31:33 -05:00
bors
0c4fb24a07 Auto merge of #42180 - GuillaumeGomez:update-rustdoc-man, r=QuietMisdreavus
Update rustdoc man page

r? @rust-lang/docs
r? @rust-lang/dev-tools
2017-05-30 00:18:23 +00:00
bors
cb7c60f2a0 Auto merge of #42264 - GuillaumeGomez:new-error-codes, r=Susurrus
New error codes

Part of #42229.
2017-05-29 21:55:57 +00:00
bors
5de00925bd 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
2017-05-29 19:31:03 +00:00
bors
d78c2b483e 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
2017-05-29 17:10:08 +00:00
Michael Kohl
9873acc54b Remove --crate-type=metadata deprecation warning
Fixes #38640
2017-05-30 00:02:03 +07:00
bors
03bed65514 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.
2017-05-29 11:32:14 +00:00
Michael Woerister
c150301a5b Remove DepGraph::write() and its callers. 2017-05-29 13:16:28 +02:00
bors
be5f4fe6cc Auto merge of #42262 - Mark-Simulacrum:issue-40350, r=eddyb
Don't ICE with nested enums in missing docs lint.

Fixes #40350.
2017-05-29 09:04:08 +00:00
Guillaume Gomez
478544184e Update rustdoc man page 2017-05-29 09:43:16 +02:00
Ralf Jung
6620c4b078 rust-src: include everything needed to compile libstd with jemalloc 2017-05-28 21:55:54 -07:00
bors
911192764d 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
2017-05-29 03:37:28 +00:00
bors
920c4799be Auto merge of #42218 - venkatagiri:update_cross, r=alexchrichton
use shared scripts for init and sccache in cross image

cc #42201
cc @malbarbo
2017-05-28 22:15:10 +00:00
Clar Charr
54bbe23b2e Clarify docs on implementing Into. 2017-05-28 16:13:56 -04:00
Mark Simulacrum
c85a8fb709 Add note regarding parent module containing use statement. 2017-05-28 13:06:53 -06:00
Alex Crichton
3146d9f3a7 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
2017-05-28 10:27:42 -07:00
bors
d47cf08d57 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
2017-05-28 16:47:17 +00:00
bors
bcf95067e4 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
2017-05-28 14:26:52 +00:00
Mark Simulacrum
6b84f7dd5e Don't warn on lifetime generic no_mangle functions. 2017-05-28 08:21:57 -06:00
bors
924898f88a 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
2017-05-28 12:01:02 +00:00
bors
41e74a2282 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:
2017-05-28 09:40:47 +00:00
Ariel Ben-Yehuda
ee982d4355 fix translation of MSVC funclets that loop to their own start 2017-05-28 12:00:03 +03:00
Ariel Ben-Yehuda
6adfbaf2d3 increase macro recursion limit 2017-05-28 10:43:25 +03:00
Ariel Ben-Yehuda
162bc513fb use a pointer-based array drop loop for non-zero-sized types 2017-05-28 10:43:25 +03:00
Ariel Ben-Yehuda
6548aefdeb fix loops in unwind code in MSVC
I'm not sure how well this works, but it's worth a try.
2017-05-28 10:43:25 +03:00
Ariel Ben-Yehuda
55767702ec fix RUST_LOG ICE caused by printing a default impl's DefId 2017-05-28 10:43:25 +03:00
Ariel Ben-Yehuda
7b295eea42 add NullOp::SizeOf and BinOp::Offset 2017-05-28 10:43:24 +03:00
Ariel Ben-Yehuda
3bcd6fa571 use Eq instead of Lt in loop 2017-05-28 10:43:24 +03:00
Ariel Ben-Yehuda
68b7475dc0 move "ADT master drop flag" logic to open_drop_for_adt_contents
Fixes #41888.
2017-05-28 10:43:24 +03:00
Ariel Ben-Yehuda
c6d0b5bdd8 address review comments 2017-05-28 10:43:24 +03:00
Ariel Ben-Yehuda
24c1a07c72 refactor trans::mir::block to trans all calls through the same code 2017-05-28 10:43:24 +03:00
Ariel Ben-Yehuda
9da2aaccfe 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.
2017-05-28 10:43:24 +03:00
Mark Simulacrum
1128fabb33 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.
2017-05-27 20:54:05 -06:00