Commit Graph

72423 Commits

Author SHA1 Message Date
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
Niko Matsakis
271616088f transtive_relation: fix typo in comment for parents 2017-12-04 10:46:35 -05:00
Niko Matsakis
7409ffd17e outlives/env: Fix comment that lost surrounding context. 2017-12-04 10:42:46 -05:00
Niko Matsakis
a3935961f0 region_infer: Fix typo in comment 2017-12-04 10:36:54 -05:00
Niko Matsakis
14480b401a free_region_map: Fix typo in comment: r_a <= r_b 2017-12-04 10:36:38 -05:00
Niko Matsakis
c1708abb07 type_check.rs: rustfmt 2017-12-04 09:14:39 -05:00
Niko Matsakis
506e80c899 remove unused span from eq_types (and rustfmt slightly) 2017-12-04 09:14:39 -05:00
Niko Matsakis
18cc0f9f37 document closure_base_def_id 2017-12-04 09:14:38 -05:00
Niko Matsakis
2e63bb3419 fix debruijn account in for_each_free_region 2017-12-04 09:14:38 -05:00
Niko Matsakis
243bf3f718 rename "free region" to "universally quantified region"
This has been bugging me. All the regions appear free in the source;
the real difference is that some of them are universally quantified
(those in the function signature) and some are existentially
quantified (those for which we are inferring values).
2017-12-04 09:14:38 -05:00
Niko Matsakis
fa813f74a2 introduce closure_env_ty helper to compute ty of closure env arg
Previously the code was somewhat duplicated.
2017-12-04 09:14:38 -05:00
Niko Matsakis
7f247add41 move liberate_late_bound_regions to a method on the tcx
No reason for it to live on `Inherited`.
2017-12-04 09:14:37 -05:00
Niko Matsakis
e9067bd5cc MIR dump: restructure pretty to be more extensible by other code 2017-12-04 09:14:37 -05:00
Niko Matsakis
49d2274cfe constraint_generation: create liveness constraints more thoroughly
We now visit just the stuff in the CFG, and we add liveness
constraints for all the random types, regions etc that appear within
rvalues and statements.
2017-12-04 09:14:35 -05:00
Niko Matsakis
4de7336862 extend TransitiveRelation with parents function 2017-12-04 08:51:14 -05:00
Niko Matsakis
663e7a4f08 promote region_infer into its own module 2017-12-04 08:51:13 -05:00
Niko Matsakis
fb4b06ab3b rename greater_than to reachable_from 2017-12-04 08:51:13 -05:00
Niko Matsakis
45f6027196 break type-checking of aggregate-kind out into helper function 2017-12-04 08:51:13 -05:00
Niko Matsakis
31d61f1f86 rename implied_bounds module to bounds 2017-12-04 08:51:13 -05:00
Niko Matsakis
c45307fae1 extract the code to create OutlivesBounds into its own module
Now it can be reused by the NLL code.
2017-12-04 08:51:13 -05:00