Commit Graph

70596 Commits

Author SHA1 Message Date
Guillaume Gomez
0017d504a5
Fixes doc important trait display on mobile 2017-12-08 16:36:08 +01:00
bors
833785b090 Auto merge of #46538 - frewsxcv:rollup, r=frewsxcv
Rollup of 7 pull requests

- Successful merges: #46136, #46378, #46431, #46483, #46495, #46502, #46512
- Failed merges:
2017-12-06 14:53:37 +00:00
Corey Farwell
bb239e294e Rollup merge of #46512 - Havvy:doc-compile_fail, r=kennytm
Give compile_error macro examples

I cannot get Rust to build at all with it complaining about GCC not being a valid C compiler or something, so letting TravisCI be my tester...

Fixes #46171
2017-12-06 09:35:41 -05:00
Corey Farwell
872c0259b6 Rollup merge of #46502 - GuillaumeGomez:improve-search-style, r=QuietMisdreavus
Improve search style

Fixes #46494.

r? @QuietMisdreavus
2017-12-06 09:35:40 -05:00
Corey Farwell
17dd988e72 Rollup merge of #46495 - timotree3:patch-1, r=nikomatsakis
Update old link

The CONTRIBUTING.md page currently links to an old wiki page in rust-lang/rust-wiki-backup. There is a more up-to-date page in-tree so I changed the link to point there so new contributors can find it more easily.
2017-12-06 09:35:39 -05:00
Corey Farwell
4a0647d1f9 Rollup merge of #46483 - frewsxcv:frewsxcv-ptr-swap, r=BurntSushi
Document behavior of `ptr::swap` with overlapping regions of memory.

Fixes https://github.com/rust-lang/rust/issues/44479.
2017-12-06 09:35:38 -05:00
Corey Farwell
e5fd52bed2 Rollup merge of #46431 - steveklabnik:gh42725, r=QuietMisdreavus
Mention the name of ? in Result's docs

Fixes #42725

or at least, this is the best we can really do. #35946 is tracking
better errors already, so that should cover the other part of it.
2017-12-06 09:35:37 -05:00
Corey Farwell
f5e4aa2a80 Rollup merge of #46378 - udoprog:benches-rand, r=kennytm
Fix use of rand in liballoc benches
2017-12-06 09:35:36 -05:00
Corey Farwell
b5f11da0ac Rollup merge of #46136 - tbu-:pr_werror, r=nikomatsakis
Clarify what `-D warnings` or `-F warnings` does

They set all lints currently on the warning level to `deny` or `forbid`,
respectively.
2017-12-06 09:35:35 -05:00
bors
632ad19135 Auto merge of #46192 - arielb1:locally-coherent, r=nikomatsakis
coherence: fix is_knowable logic

A trait-ref that passes the orphan-check rules can still be implemented in a crate downstream from our crate (for example, `LocalType for LocalTrait<_>` might be matched by a `LocalType for LocalTrait<TypeFromDownstreamCrate>`), and this should be known by the `is_knowable`  logic.

Trait selection had a hackfix for this, but it's an hacky fix that does not handle all cases. This patch removes it.

fixes #43355.

r? @nikomatsakis

Needs a crater run
2017-12-06 10:36:09 +00:00
bors
a62910baca Auto merge of #46521 - SimonSapin:uninhabited-variants, r=eddyb
rustc_trans: don't write discriminants for uninhabited variants

Fixes #46519.

Patch as suggested by eddyb: https://github.com/rust-lang/rust/issues/46519#issuecomment-349443519
2017-12-06 08:01:14 +00:00
bors
6a5895c433 Auto merge of #46530 - nrc:rls-update, r=alexcrichton
Update rls and rustfmt and set them testing

r? @alexcrichton
2017-12-06 05:29:39 +00:00
Nick Cameron
36c380292c Update Cargo 2017-12-06 18:21:14 +13:00
Nick Cameron
75029259b3 Update rls and rustfmt 2017-12-06 18:18:44 +13:00
bors
d10b04d3df Auto merge of #45898 - JRegimbal:master, r=QuietMisdreavus
Change "Types/modules" title of search tab to be more accurate

From issue #45787. Used "In name" as per suggestion from @Seeker14491.
2017-12-06 03:02:17 +00:00
Simon Sapin
d4fabb987b rustc_trans: don't write discriminants for uninhabited variants
Fixes #46519.

Patch as suggested by eddyb:
https://github.com/rust-lang/rust/issues/46519#issuecomment-349443519
2017-12-05 23:50:41 +01:00
Ariel Ben-Yehuda
425c2c3606 convert errors to warnings 2017-12-06 00:43:47 +02:00
JRegimbal
41df62ce29 Changed tab names to those agreed upon.
Tabs are "In Names", "In Parameters", and "In Return Types".
2017-12-05 17:39:50 -05:00
Havvy
aaaea2c562 compile_error example blurbs 2017-12-05 14:01:09 -08:00
bors
cfba0d446e Auto merge of #46514 - zackmdavis:sticking_it_to_the_man, r=alexcrichton
template month/year, version into man pages while building dist tarball

![the_man](https://user-images.githubusercontent.com/1076988/33596149-963956f4-d94f-11e7-926f-e683217765e5.png)

This is meant to resolve #25689.

r? @alexcrichton
2017-12-05 20:08:10 +00:00
bors
abe85ab0b2 Auto merge of #46498 - malbarbo:dist-armv5te, r=alexcrichton
Add armv5te-unknown-linux-gnueabi to cross builder

This is the only linux target missing in the dist builders.
2017-12-05 17:28:31 +00:00
steveklabnik
893474ea6d Mention the name of ? in Result's docs
Fixes #42725

or at least, this is the best we can really do. #35946 is tracking
better errors already, so that should cover the other part of it.
2017-12-05 10:07:51 -05:00
Ariel Ben-Yehuda
1769c63dc1 add a comment and assertion explaining everything 2017-12-05 15:42:34 +02:00
Ariel Ben-Yehuda
9d38541d3f improve error reporting 2017-12-05 15:42:34 +02:00
Ariel Ben-Yehuda
2614cc51dd convert the new conflicts to a soft error 2017-12-05 15:42:33 +02:00
Ariel Ben-Yehuda
1271ea4f95 refactor a bit 2017-12-05 15:41:40 +02:00
Ariel Ben-Yehuda
38747dd3a7 improve treatment of local types in "remote coherence" mode 2017-12-05 15:41:40 +02:00
bors
bf2be6175e Auto merge of #46492 - eddyb:move-ops, r=arielb1
rustc_mir: don't move temporaries that are still used later.

This should unbreak using the MIR borrow-checker on `libcore` (assuming #46268 is merged).
2017-12-05 13:35:59 +00:00
Eduard-Mihai Burtescu
2a629f931d rustc_mir: don't move temporaries that are still used later. 2017-12-05 12:59:07 +02:00
Havvy
3f0b766c35 No unused macro warning in compile_error example. 2017-12-05 01:47:47 -08:00
Marco A L Barbosa
bea65d4041 Add armv5te-unknown-linux-gnueabi to cross builder 2017-12-05 07:46:24 -02:00
bors
a2899408dd Auto merge of #46503 - Aaron1011:librustdoc_log, r=Mark-Simulacrum
Remove librustdoc dependency on log

This change should have been included in PR #46386.

Since librustdoc doesn't explicitly depend on internal crates
(such as librustc_driver) through its Cargo.toml, it ends up using the
sysroot to resolve them. By removing the dependency on 'log',
we ensure that the syroot is used to resolve `log` as well. This ensures
that only one version of log is in use, so that `env_logger::init()`
enables all uses of `log!` macros.
2017-12-05 09:00:35 +00:00
Zack M. Davis
207fc0bb45 template month/year, version into man pages while building dist tarball
This is meant to resolve #25689.
2017-12-04 23:47:59 -08:00
bors
8921535289 Auto merge of #46499 - malbarbo:rename-cross, r=alexcrichton
Rename cross(2) builder to dist-various-{1,2}

Follows the convention of the other builders.
2017-12-05 06:28:29 +00:00
Havvy
44c343be45 Give compile_error macro examples 2017-12-04 21:55:24 -08:00
Corey Farwell
f3662275e4 Document behavior of ptr::swap with overlapping regions of memory.
Fixes https://github.com/rust-lang/rust/issues/44479.
2017-12-04 22:49:48 -05:00
bors
98a96b0b66 Auto merge of #46403 - oli-obk:generic_missing_impl, r=nikomatsakis
Report a targeted note for generic parameters that are missing a trait bound
2017-12-05 02:57:57 +00:00
bors
a4fa23a5bb Auto merge of #46305 - irinagpopa:backstory, r=alexcrichton,eddyb
Move rustc_back modules where they belong.
2017-12-05 00:21:59 +00:00
Aaron Hill
f6d3900642
Remove librustdoc dependency on log
This change should have been included in PR #46386.

Since librustdoc doesn't explicitly depend on internal crates
(such as librustc_driver) through its Cargo.toml, it ends up using the
sysroot to resolve them. By removing the dependency on 'log',
we ensure that the syroot is used to resolve `log` as well. This ensures
that only one version of log is in use, so that `env_logger::init()`
enables all uses of `log!` macros.
2017-12-04 17:16:19 -05:00
bors
cd8a352995 Auto merge of #46427 - michaelwoerister:transitive-svh, r=nikomatsakis
incr.comp.: Incorporate the stable commandline arg hash and SVHs of upstream crates into the SVH.

So far the SVH detected changes in the HIR, which is already very sensitive, but in order for `eval_always` queries to also be sensitive to changes in upstream crates, the SVH also needs to capture changes there.

This PR fixes [rust-icci/crossbeam](https://travis-ci.org/rust-icci/crossbeam/builds/308936448), but I have not yet been able to come up with a minimal regression test.

r? @nikomatsakis
2017-12-04 21:46:15 +00:00
Guillaume Gomez
611d0e6cce Improve search style 2017-12-04 22:11:21 +01:00
bors
8503b3ff82 Auto merge of #46319 - nikomatsakis:nll-master-to-rust-master-2, r=pnkfelix
NLL: improve inference with flow results, represent regions with bitsets, and more

This PR begins with a number of edits to the NLL code and then includes a large number of smaller refactorings (these refactorings ought not to change behavior). There are a lot of commits here, but each is individually simple. The goal is to land everything up to but not including the changes to how we handle closures, which are conceptually more complex.

The NLL specific changes are as follows (in order of appearance):

**Modify the region inferencer's approach to free regions.** Previously, for each free region (lifetime parameter) `'a`, it would compute the set of other free regions that `'a` outlives (e.g., if we have `where 'a: 'b`, then this set would be `{'a, 'b}`). Then it would mark those free regions as "constants" and report an error if inference tried to extend `'a` to include any other region (e.g., `'c`) that is not in that outlives set. In this way, the value of `'a` would never grow beyond the maximum that could type check. The new approach is to allow `'a` to grow larger. Then, after the fact, we check over the value of `'a` and see what other free regions it is required to outlive, and we check that those outlives relationships are justified by the where clauses in scope etc.

**Modify constraint generation to consider maybe-init.** When we have a "drop-live" variable `x` (i.e., a variable that will be dropped but will not be otherwise used), we now consider whether `x` is "maybe initialized" at that point. If not, then we know the drop is a no-op, and we can allow its regions to be dead. Due to limitations in the fragment code, this currently only works at the level of entire variables.

**Change representation of regions to use a `BitMatrix`.** We used to use a `BTreeSet`, which was rather silly. We now use a MxN matrix of bits, where `M` is the number of variables and `N` is the number of possible elements in each set (size of the CFG + number of free regions).

The remaining commits (starting from
extract the `implied_bounds` code into a helper function ") are all "no-op" refactorings, I believe.

~~One concern I have is with the commit "with -Zverbose, print all details of closure substs"; this commit seems to include some "internal" stuff in the mir-dump files, such as internal interner numbers, that I fear may vary by platform. Annoying. I guess we will see.~~ (I removed this commit.)

As for reviewer, @arielb1 has been reviewing the PRs, and they are certainly welcome to review this one too. But I figured it'd maybe be good to have more people taking a look and being familiar with this code, so I'll "nominate" @pnkfelix .

r? @pnkfelix
2017-12-04 19:07:52 +00:00
Marco A L Barbosa
79b47a1f26 Rename cross(2) builder to dist-various-{1,2}
Follows the convention of the other builders.
2017-12-04 16:38:19 -02:00
Timo
38ef72306f
Update old link
This page currently links to an old wiki page in rust-lang/rust-wiki-backup. There is a more up-to-date page in-tree so I changed the link to point there so new contributors can find it more easily.
2017-12-04 11:35:08 -05:00
Niko Matsakis
a6adc74e87 adopt longer and shorter rather than fr and outlived_fr 2017-12-04 11:30:39 -05:00
Niko Matsakis
ab2bc9f073 outlives/env: fix comment, say must and not should 2017-12-04 11:30:38 -05:00
bors
226656ff72 Auto merge of #46463 - nak3:fix-invalid-docs-path, r=kennytm
Fix invalid docs path for compiler plugins

The path to the docs `src/doc/guide-plugin.md` moved to
`src/doc/unstable-book/src/language-features/plugin.md`.

This patch updates it in the comment of WARNING message of the test
code.
2017-12-04 16:29:28 +00:00
Irina-Gabriela Popa
2c175df013 rustc_back: replace tempdir with crates.io version. 2017-12-04 18:25:31 +02:00
Irina-Gabriela Popa
dda924ab6a rustc_back: move dynamic_lib to rustc_metadata. 2017-12-04 18:25:29 +02:00
Irina-Gabriela Popa
d6f70359dc rustc_back: remove slice module in favor of std::slice::from_ref. 2017-12-04 18:25:06 +02:00