]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoMigrate even more feature gate tests to ui
est31 [Wed, 6 Dec 2017 09:18:03 +0000 (10:18 +0100)]
Migrate even more feature gate tests to ui

We also rename some of the files to conform to the
feature-gate-<feat_name>.rs pattern that is most common.

6 years agoMigrate a few feature gate tests to ui
est31 [Wed, 6 Dec 2017 08:27:47 +0000 (09:27 +0100)]
Migrate a few feature gate tests to ui

Renames only in this commit, and obviously
.stderr file additions.

6 years agoTidy: allow feature-gate tests to be ui tests
est31 [Wed, 6 Dec 2017 08:03:07 +0000 (09:03 +0100)]
Tidy: allow feature-gate tests to be ui tests

ui tests are the future, especially since the
recent improvement where we have gained
checking and requiring of //~ERROR comments.

The tidy feature-gate test check is intended
to be 50% an actual insurance that there is
a check, and 50% to be a teacher that such
checks are required.

With this commit applied, newbies might
interpret stuff wrongly and create tests
that don't fail but succeed instead.

This is not what feature gate tests are
for though. Therefore, in a later step,
when only ui tests are allowed to be feature
gate tests, we will add checking to ensure
that a file marked as gate test is actually
required to be a compilation failure.

Right now implementing such a check is a
bit annoying as one needs to only do it
when the compile-fail test is in the
ui test suite :/.

6 years agoAuto merge of #46533 - nikomatsakis:ui-stamp-files, r=alexcrichton
bors [Thu, 7 Dec 2017 04:46:16 +0000 (04:46 +0000)]
Auto merge of #46533 - nikomatsakis:ui-stamp-files, r=alexcrichton

compiletest: account for `ui` reference files when deciding to skip

The stamp files for compiletest were ignoring `.stderr` and `.stdout` files. This was driving me crazy.

r? @alexcrichton

6 years agoAuto merge of #46528 - CensoredUsername:stabilize_abi_sysv64, r=arielb1
bors [Thu, 7 Dec 2017 02:13:13 +0000 (02:13 +0000)]
Auto merge of #46528 - CensoredUsername:stabilize_abi_sysv64, r=arielb1

Stabilize abi_sysv64

Closes #36167, stabilizing the use of the "sysv64" ABI on x64 platforms where it is not the default ABI.

FCP on this is complete in the tracking issue.

6 years agoAuto merge of #46524 - eddyb:static-static, r=arielb1
bors [Wed, 6 Dec 2017 23:42:17 +0000 (23:42 +0000)]
Auto merge of #46524 - eddyb:static-static, r=arielb1

rustc_mir: promote references of statics from other statics.

Fixes #46522 by also allowing `STATIC_REF` in MIR const-qualification, not just AST rvalue promotion.

6 years agorustc_mir: promote references of statics from other statics.
Eduard-Mihai Burtescu [Tue, 5 Dec 2017 23:28:27 +0000 (01:28 +0200)]
rustc_mir: promote references of statics from other statics.

6 years agoAuto merge of #45953 - estebank:tab-4, r=nikomatsakis
bors [Wed, 6 Dec 2017 21:05:53 +0000 (21:05 +0000)]
Auto merge of #45953 - estebank:tab-4, r=nikomatsakis

Display `\t` in diagnostics code as four spaces

Follow up to #44386 using the unicode variable width machinery from #45711 to replace tabs in the source code when displaying a diagnostic error with four spaces (instead of only one), while properly accounting for this when calculating underlines.

Partly addresses #44618.

6 years agoAuto merge of #46268 - arielb1:union-borrow, r=nikomatsakis
bors [Wed, 6 Dec 2017 18:30:15 +0000 (18:30 +0000)]
Auto merge of #46268 - arielb1:union-borrow, r=nikomatsakis

MIR borrowck: implement union-and-array-compatible semantics

Fixes #44831.
Fixes #44834.
Fixes #45537.
Fixes #45696 (by implementing DerefPure semantics, which is what we want going forward).

r? @nikomatsakis

6 years agoAuto merge of #46538 - frewsxcv:rollup, r=frewsxcv
bors [Wed, 6 Dec 2017 14:53:37 +0000 (14:53 +0000)]
Auto merge of #46538 - frewsxcv:rollup, r=frewsxcv

Rollup of 7 pull requests

- Successful merges: #46136, #46378, #46431, #46483, #46495, #46502, #46512
- Failed merges:

6 years agopacify the mercilous tidy
Niko Matsakis [Wed, 6 Dec 2017 14:42:09 +0000 (09:42 -0500)]
pacify the mercilous tidy

6 years agoRollup merge of #46512 - Havvy:doc-compile_fail, r=kennytm
Corey Farwell [Wed, 6 Dec 2017 14:35:41 +0000 (09:35 -0500)]
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

6 years agoRollup merge of #46502 - GuillaumeGomez:improve-search-style, r=QuietMisdreavus
Corey Farwell [Wed, 6 Dec 2017 14:35:40 +0000 (09:35 -0500)]
Rollup merge of #46502 - GuillaumeGomez:improve-search-style, r=QuietMisdreavus

Improve search style

Fixes #46494.

r? @QuietMisdreavus

6 years agoRollup merge of #46495 - timotree3:patch-1, r=nikomatsakis
Corey Farwell [Wed, 6 Dec 2017 14:35:39 +0000 (09:35 -0500)]
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.

6 years agoRollup merge of #46483 - frewsxcv:frewsxcv-ptr-swap, r=BurntSushi
Corey Farwell [Wed, 6 Dec 2017 14:35:38 +0000 (09:35 -0500)]
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.

6 years agoRollup merge of #46431 - steveklabnik:gh42725, r=QuietMisdreavus
Corey Farwell [Wed, 6 Dec 2017 14:35:37 +0000 (09:35 -0500)]
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.

6 years agoRollup merge of #46378 - udoprog:benches-rand, r=kennytm
Corey Farwell [Wed, 6 Dec 2017 14:35:36 +0000 (09:35 -0500)]
Rollup merge of #46378 - udoprog:benches-rand, r=kennytm

Fix use of rand in liballoc benches

6 years agoRollup merge of #46136 - tbu-:pr_werror, r=nikomatsakis
Corey Farwell [Wed, 6 Dec 2017 14:35:35 +0000 (09:35 -0500)]
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.

6 years agocompiletest: account for `ui` reference files when deciding to skip
Niko Matsakis [Wed, 6 Dec 2017 11:21:23 +0000 (06:21 -0500)]
compiletest: account for `ui` reference files when deciding to skip

6 years agoruntest: rustfmt
Niko Matsakis [Wed, 6 Dec 2017 11:06:04 +0000 (06:06 -0500)]
runtest: rustfmt

6 years agoAuto merge of #46192 - arielb1:locally-coherent, r=nikomatsakis
bors [Wed, 6 Dec 2017 10:36:09 +0000 (10:36 +0000)]
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

6 years agoAuto merge of #46521 - SimonSapin:uninhabited-variants, r=eddyb
bors [Wed, 6 Dec 2017 08:01:14 +0000 (08:01 +0000)]
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

6 years agoAuto merge of #46530 - nrc:rls-update, r=alexcrichton
bors [Wed, 6 Dec 2017 05:29:39 +0000 (05:29 +0000)]
Auto merge of #46530 - nrc:rls-update, r=alexcrichton

Update rls and rustfmt and set them testing

r? @alexcrichton

6 years agoUpdate Cargo
Nick Cameron [Wed, 6 Dec 2017 05:20:05 +0000 (18:20 +1300)]
Update Cargo

6 years agoUpdate rls and rustfmt
Nick Cameron [Wed, 6 Dec 2017 05:18:44 +0000 (18:18 +1300)]
Update rls and rustfmt

6 years agoAuto merge of #45898 - JRegimbal:master, r=QuietMisdreavus
bors [Wed, 6 Dec 2017 03:02:17 +0000 (03:02 +0000)]
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.

6 years agoStabilize abi_sysv64
CensoredUsername [Wed, 6 Dec 2017 00:19:35 +0000 (01:19 +0100)]
Stabilize abi_sysv64

6 years agowork around weird match arm lifetimes
Ariel Ben-Yehuda [Wed, 6 Dec 2017 00:10:24 +0000 (02:10 +0200)]
work around weird match arm lifetimes

6 years agomore comments
Ariel Ben-Yehuda [Tue, 5 Dec 2017 22:51:47 +0000 (00:51 +0200)]
more comments

6 years agorustc_trans: don't write discriminants for uninhabited variants
Simon Sapin [Tue, 5 Dec 2017 21:37:51 +0000 (22:37 +0100)]
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

6 years agoconvert errors to warnings
Ariel Ben-Yehuda [Tue, 5 Dec 2017 13:43:37 +0000 (15:43 +0200)]
convert errors to warnings

6 years agoChanged tab names to those agreed upon.
JRegimbal [Tue, 5 Dec 2017 22:39:50 +0000 (17:39 -0500)]
Changed tab names to those agreed upon.

Tabs are "In Names", "In Parameters", and "In Return Types".

6 years agoadjust libcore
Ariel Ben-Yehuda [Tue, 5 Dec 2017 12:09:16 +0000 (14:09 +0200)]
adjust libcore

6 years agofix borrows across loops, libcore *almost* compiles
Ariel Ben-Yehuda [Mon, 4 Dec 2017 11:21:28 +0000 (13:21 +0200)]
fix borrows across loops, libcore *almost* compiles

6 years agofix handling of immutable variables
Ariel Ben-Yehuda [Mon, 4 Dec 2017 11:01:50 +0000 (13:01 +0200)]
fix handling of immutable variables

6 years agohandle gen/kill sets together
Ariel Ben-Yehuda [Sun, 3 Dec 2017 23:00:46 +0000 (01:00 +0200)]
handle gen/kill sets together

6 years agofix handling of CallScopeData
Ariel Ben-Yehuda [Sun, 3 Dec 2017 22:56:06 +0000 (00:56 +0200)]
fix handling of CallScopeData

This fixes the tests for issue #29793

6 years agoimprove conflict error reporting
Ariel Ben-Yehuda [Sun, 3 Dec 2017 15:55:41 +0000 (17:55 +0200)]
improve conflict error reporting

6 years agofix handling of consts in borrow-checking
Ariel Ben-Yehuda [Sun, 3 Dec 2017 14:08:28 +0000 (16:08 +0200)]
fix handling of consts in borrow-checking

I'm not sure how correct it this, but it gets whatever needs to compile
to compile.

6 years agoMIR borrowck: avoid formatting state when it is not needed
Ariel Ben-Yehuda [Sun, 3 Dec 2017 13:15:29 +0000 (15:15 +0200)]
MIR borrowck: avoid formatting state when it is not needed

This improves performance on large functions.

6 years agoMIR borrowck: implement union-and-array-compatible semantics
Ariel Ben-Yehuda [Tue, 5 Dec 2017 13:08:10 +0000 (15:08 +0200)]
MIR borrowck: implement union-and-array-compatible semantics

Fixes #44831.
Fixes #44834.
Fixes #45537.
Fixes #45696 (by implementing DerefPure semantics, which is what we want
going forward).

6 years agocompile_error example blurbs
Havvy [Tue, 5 Dec 2017 22:01:09 +0000 (14:01 -0800)]
compile_error example blurbs

6 years agoAuto merge of #46514 - zackmdavis:sticking_it_to_the_man, r=alexcrichton
bors [Tue, 5 Dec 2017 20:08:10 +0000 (20:08 +0000)]
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

6 years agoAuto merge of #46498 - malbarbo:dist-armv5te, r=alexcrichton
bors [Tue, 5 Dec 2017 17:28:31 +0000 (17:28 +0000)]
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.

6 years agoMention the name of ? in Result's docs
steveklabnik [Fri, 1 Dec 2017 18:00:45 +0000 (13:00 -0500)]
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.

6 years agoadd a comment and assertion explaining everything
Ariel Ben-Yehuda [Wed, 29 Nov 2017 18:50:26 +0000 (20:50 +0200)]
add a comment and assertion explaining everything

6 years agoimprove error reporting
Ariel Ben-Yehuda [Wed, 29 Nov 2017 18:47:34 +0000 (20:47 +0200)]
improve error reporting

6 years agoconvert the new conflicts to a soft error
Ariel Ben-Yehuda [Thu, 23 Nov 2017 17:05:23 +0000 (19:05 +0200)]
convert the new conflicts to a soft error

6 years agorefactor a bit
Ariel Ben-Yehuda [Wed, 22 Nov 2017 21:01:51 +0000 (23:01 +0200)]
refactor a bit

6 years agoimprove treatment of local types in "remote coherence" mode
Ariel Ben-Yehuda [Wed, 22 Nov 2017 20:39:40 +0000 (22:39 +0200)]
improve treatment of local types in "remote coherence" mode

6 years agoAuto merge of #46492 - eddyb:move-ops, r=arielb1
bors [Tue, 5 Dec 2017 13:35:59 +0000 (13:35 +0000)]
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).

6 years agorustc_mir: don't move temporaries that are still used later.
Eduard-Mihai Burtescu [Mon, 4 Dec 2017 15:46:23 +0000 (17:46 +0200)]
rustc_mir: don't move temporaries that are still used later.

6 years agoNo unused macro warning in compile_error example.
Havvy [Tue, 5 Dec 2017 09:47:47 +0000 (01:47 -0800)]
No unused macro warning in compile_error example.

6 years agoAdd armv5te-unknown-linux-gnueabi to cross builder
Marco A L Barbosa [Mon, 4 Dec 2017 18:18:30 +0000 (16:18 -0200)]
Add armv5te-unknown-linux-gnueabi to cross builder

6 years agoAuto merge of #46503 - Aaron1011:librustdoc_log, r=Mark-Simulacrum
bors [Tue, 5 Dec 2017 09:00:35 +0000 (09:00 +0000)]
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.

6 years agotemplate month/year, version into man pages while building dist tarball
Zack M. Davis [Tue, 5 Dec 2017 05:36:57 +0000 (21:36 -0800)]
template month/year, version into man pages while building dist tarball

This is meant to resolve #25689.

6 years agoAuto merge of #46499 - malbarbo:rename-cross, r=alexcrichton
bors [Tue, 5 Dec 2017 06:28:29 +0000 (06:28 +0000)]
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.

6 years agoGive compile_error macro examples
Havvy [Tue, 5 Dec 2017 05:55:24 +0000 (21:55 -0800)]
Give compile_error macro examples

6 years agoDocument behavior of `ptr::swap` with overlapping regions of memory.
Corey Farwell [Sun, 3 Dec 2017 23:02:17 +0000 (18:02 -0500)]
Document behavior of `ptr::swap` with overlapping regions of memory.

Fixes https://github.com/rust-lang/rust/issues/44479.

6 years agoAuto merge of #46403 - oli-obk:generic_missing_impl, r=nikomatsakis
bors [Tue, 5 Dec 2017 02:57:57 +0000 (02:57 +0000)]
Auto merge of #46403 - oli-obk:generic_missing_impl, r=nikomatsakis

Report a targeted note for generic parameters that are missing a trait bound

6 years agoAuto merge of #46305 - irinagpopa:backstory, r=alexcrichton,eddyb
bors [Tue, 5 Dec 2017 00:21:59 +0000 (00:21 +0000)]
Auto merge of #46305 - irinagpopa:backstory, r=alexcrichton,eddyb

Move rustc_back modules where they belong.

6 years agoRemove librustdoc dependency on log
Aaron Hill [Mon, 4 Dec 2017 22:16:19 +0000 (17:16 -0500)]
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.

6 years agoAuto merge of #46427 - michaelwoerister:transitive-svh, r=nikomatsakis
bors [Mon, 4 Dec 2017 21:46:15 +0000 (21:46 +0000)]
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

6 years agoImprove search style
Guillaume Gomez [Mon, 4 Dec 2017 21:11:21 +0000 (22:11 +0100)]
Improve search style

6 years agoAuto merge of #46319 - nikomatsakis:nll-master-to-rust-master-2, r=pnkfelix
bors [Mon, 4 Dec 2017 19:07:52 +0000 (19:07 +0000)]
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

6 years agoRename cross(2) builder to dist-various-{1,2}
Marco A L Barbosa [Mon, 4 Dec 2017 18:38:19 +0000 (16:38 -0200)]
Rename cross(2) builder to dist-various-{1,2}

Follows the convention of the other builders.

6 years agoUpdate old link
Timo [Mon, 4 Dec 2017 16:35:08 +0000 (11:35 -0500)]
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.

6 years agoadopt `longer` and `shorter` rather than `fr` and `outlived_fr`
Niko Matsakis [Mon, 4 Dec 2017 15:49:40 +0000 (10:49 -0500)]
adopt `longer` and `shorter` rather than `fr` and `outlived_fr`

6 years agooutlives/env: fix comment, say must and not should
Niko Matsakis [Mon, 4 Dec 2017 15:54:38 +0000 (10:54 -0500)]
outlives/env: fix comment, say must and not should

6 years agoAuto merge of #46463 - nak3:fix-invalid-docs-path, r=kennytm
bors [Mon, 4 Dec 2017 16:29:28 +0000 (16:29 +0000)]
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.

6 years agorustc_back: replace tempdir with crates.io version.
Irina-Gabriela Popa [Mon, 27 Nov 2017 15:21:13 +0000 (17:21 +0200)]
rustc_back: replace tempdir with crates.io version.

6 years agorustc_back: move dynamic_lib to rustc_metadata.
Irina-Gabriela Popa [Thu, 23 Nov 2017 16:07:18 +0000 (18:07 +0200)]
rustc_back: move dynamic_lib to rustc_metadata.

6 years agorustc_back: remove slice module in favor of std::slice::from_ref.
Irina-Gabriela Popa [Thu, 23 Nov 2017 14:41:51 +0000 (16:41 +0200)]
rustc_back: remove slice module in favor of std::slice::from_ref.

6 years agotranstive_relation: fix typo in comment for `parents`
Niko Matsakis [Mon, 4 Dec 2017 15:46:35 +0000 (10:46 -0500)]
transtive_relation: fix typo in comment for `parents`

6 years agooutlives/env: Fix comment that lost surrounding context.
Niko Matsakis [Mon, 4 Dec 2017 15:42:46 +0000 (10:42 -0500)]
outlives/env: Fix comment that lost surrounding context.

6 years agoregion_infer: Fix typo in comment
Niko Matsakis [Mon, 4 Dec 2017 15:36:54 +0000 (10:36 -0500)]
region_infer: Fix typo in comment

6 years agofree_region_map: Fix typo in comment: r_a <= r_b
Niko Matsakis [Mon, 4 Dec 2017 15:36:22 +0000 (10:36 -0500)]
free_region_map: Fix typo in comment: r_a <= r_b

6 years agotype_check.rs: rustfmt
Niko Matsakis [Sat, 2 Dec 2017 02:24:08 +0000 (21:24 -0500)]
type_check.rs: rustfmt

6 years agoremove unused span from `eq_types` (and rustfmt slightly)
Niko Matsakis [Wed, 22 Nov 2017 22:30:34 +0000 (17:30 -0500)]
remove unused span from `eq_types` (and rustfmt slightly)

6 years agodocument `closure_base_def_id`
Niko Matsakis [Wed, 22 Nov 2017 21:53:17 +0000 (16:53 -0500)]
document `closure_base_def_id`

6 years agofix debruijn account in `for_each_free_region`
Niko Matsakis [Wed, 22 Nov 2017 21:52:29 +0000 (16:52 -0500)]
fix debruijn account in `for_each_free_region`

6 years agorename "free region" to "universally quantified region"
Niko Matsakis [Tue, 21 Nov 2017 18:12:24 +0000 (13:12 -0500)]
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).

6 years agointroduce `closure_env_ty` helper to compute ty of closure env arg
Niko Matsakis [Tue, 21 Nov 2017 16:18:40 +0000 (11:18 -0500)]
introduce `closure_env_ty` helper to compute ty of closure env arg

Previously the code was somewhat duplicated.

6 years agomove `liberate_late_bound_regions` to a method on the tcx
Niko Matsakis [Tue, 21 Nov 2017 16:17:48 +0000 (11:17 -0500)]
move `liberate_late_bound_regions` to a method on the tcx

No reason for it to live on `Inherited`.

6 years agoMIR dump: restructure pretty to be more extensible by other code
Niko Matsakis [Mon, 20 Nov 2017 21:45:12 +0000 (16:45 -0500)]
MIR dump: restructure pretty to be more extensible by other code

6 years agoconstraint_generation: create liveness constraints more thoroughly
Niko Matsakis [Mon, 20 Nov 2017 21:43:09 +0000 (16:43 -0500)]
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.

6 years agoextend TransitiveRelation with `parents` function
Niko Matsakis [Mon, 20 Nov 2017 21:41:48 +0000 (16:41 -0500)]
extend TransitiveRelation with `parents` function

6 years agopromote region_infer into its own module
Niko Matsakis [Mon, 20 Nov 2017 21:37:33 +0000 (16:37 -0500)]
promote region_infer into its own module

6 years agorename `greater_than` to `reachable_from`
Niko Matsakis [Mon, 20 Nov 2017 10:15:06 +0000 (05:15 -0500)]
rename `greater_than` to `reachable_from`

6 years agobreak type-checking of aggregate-kind out into helper function
Niko Matsakis [Fri, 17 Nov 2017 18:28:01 +0000 (13:28 -0500)]
break type-checking of aggregate-kind out into helper function

6 years agorename `implied_bounds` module to `bounds`
Niko Matsakis [Sun, 12 Nov 2017 10:26:26 +0000 (05:26 -0500)]
rename `implied_bounds` module to `bounds`

6 years agoextract the code to create `OutlivesBounds` into its own module
Niko Matsakis [Sun, 12 Nov 2017 10:25:13 +0000 (05:25 -0500)]
extract the code to create `OutlivesBounds` into its own module

Now it can be reused by the NLL code.

6 years agomake `no_late_bound_regions` a method on `Binder<T>`
Niko Matsakis [Sun, 12 Nov 2017 10:04:26 +0000 (05:04 -0500)]
make `no_late_bound_regions` a method on `Binder<T>`

6 years agomake `resolve_regions_and_report_errors` take an `OutlivesEnv`
Niko Matsakis [Fri, 1 Dec 2017 10:07:52 +0000 (05:07 -0500)]
make `resolve_regions_and_report_errors` take an `OutlivesEnv`

This revealed some shortcomings, one of which is fixed. Fixes #45937.

6 years agomove `free_regions_map` into `infer::outlives`
Niko Matsakis [Fri, 10 Nov 2017 19:59:17 +0000 (14:59 -0500)]
move `free_regions_map` into `infer::outlives`

6 years agoextract the `implied_bounds` code into a helper function
Niko Matsakis [Fri, 10 Nov 2017 18:53:36 +0000 (13:53 -0500)]
extract the `implied_bounds` code into a helper function

6 years agoregion_infer: BitMatrix representation of region values
Zack M. Davis [Tue, 21 Nov 2017 00:23:26 +0000 (16:23 -0800)]
region_infer: BitMatrix representation of region values

This should be more efficient than allocating two BTreeSets for every
region variable?—as it is written in #45670.

6 years agoinform constraint generation using maybe-init
Paul Daniel Faria [Fri, 17 Nov 2017 09:34:02 +0000 (04:34 -0500)]
inform constraint generation using maybe-init

In particular, if we see a variable is DROP-LIVE, but it is not
MAYBE-INIT, then we can ignore the drop. This leavess attempt to use
more complex refinements of the idea (e.g., for subpaths or subfields)
to future work.

6 years agoborrow_check.rs: rustfmt
Niko Matsakis [Fri, 17 Nov 2017 09:47:02 +0000 (04:47 -0500)]
borrow_check.rs: rustfmt

6 years agoFix invalid docs path for compiler plugins
Kenjiro Nakayama [Sun, 3 Dec 2017 08:51:11 +0000 (17:51 +0900)]
Fix invalid docs path for compiler plugins