Commit Graph

90419 Commits

Author SHA1 Message Date
bors
1005f3bac7 Auto merge of #56113 - spastorino:erroneous-loop-diagnostic-in-nll, r=pnkfelix
Erroneous loop diagnostic in nll

Closes #53773

r? @nikomatsakis
2019-02-22 06:52:39 +00:00
bors
c6fd02772b Auto merge of #58574 - RalfJung:pin, r=Mark-Simulacrum
improve Pin documentation

Incorporates a bunch of the documentation-related comments that came up when discussing `Pin` stabilization.

Cc @alexcrichton @withoutboats @cramertj @jonhoo

Fixes https://github.com/rust-lang/rust/issues/58130
2019-02-22 04:11:23 +00:00
bors
d1f8970bd1 Auto merge of #58616 - vertexclique:destabilize-fixed-width-atomic-integers, r=dtolnay
Destabilize fixed-width const defined atomic integers

With this PR version 1.34.0 onwards const declarations of atomic integers will be unstable.

* Closes https://github.com/rust-lang/rust/issues/58089
* Reverts partially: https://github.com/rust-lang/rust/pull/57425
2019-02-22 01:29:34 +00:00
Ingvar Stepanyan
9f58c5fa7c Optimise vec![false; N] to zero-alloc
Nowadays booleans have a well-defined representation, so there is no reason not to optimise their allocation.
2019-02-21 23:02:34 +00:00
Ralf Jung
497439c199 take a bit more space for new_unchecked examples 2019-02-21 23:13:49 +01:00
bors
8a1d0defdf Auto merge of #58592 - nikomatsakis:universe-leak-check, r=aturon
Re-implement leak check in terms of universes

This PR temporarily restores the leak-check, but implemented in terms of universes. This is not because the leak check behavior was necessarily **correct**, but because (a) we may want to have a transition period and because (b) we want to have more breathing room to work through the full implications of handling higher-ranked types correctly. Note that this PR builds atop https://github.com/rust-lang/rust/pull/58056.

Fixes #58451
Fixes #46989
Fixes #57639

r? @aturon
cc @arielb1, @lqd

~~Temporary note: I've not finished running `./x.py test` locally -- I'm confident a lot of error messages in tests will need updating. I sort of expect them to revert to the older, (imo) less good error messages, which is mildly unfortunate. There might be a way to preserve the new error messages, not sure.~~
2019-02-21 21:35:21 +00:00
Philipp Hansch
36f665239d
Fix more nursery links in CONTRIBUTING.md 2019-02-21 20:58:56 +01:00
Matthew Jasper
5ffc919726 Move the exit block of the match to the end 2019-02-21 19:03:34 +00:00
Matthew Jasper
90f40cd0fb Fix error index example 2019-02-21 19:03:34 +00:00
Matthew Jasper
fcfeb06817 Fix codegen test 2019-02-21 19:03:34 +00:00
Matthew Jasper
9c601611a0 Simplify the cleanup_post_borrowck passes 2019-02-21 19:03:34 +00:00
Matthew Jasper
bf446c80c2 Add address stability test for matches 2019-02-21 19:03:34 +00:00
Matthew Jasper
87ec3b24f6 Activate two phase borrows on all uses
Two phase borrows are only used for adjustments now, so there's no need
to not activate them for shared borrows.
2019-02-21 19:03:34 +00:00
Matthew Jasper
2c840ae18d Use normal mutable borrows in MIR match lowering 2019-02-21 19:03:34 +00:00
Matthew Jasper
5407fbdef8 Match discriminant -> scrutinee 2019-02-21 19:03:34 +00:00
Matthew Jasper
d51b5cdd82 Clean up MIR match lowering
* Adjust fake borrows to only be live over guards.
* Remove unused `slice_len_checked` field.
* Split the methods on builder into those for matches and those for all
  kinds of pattern bindings.
2019-02-21 19:03:34 +00:00
Matthew Jasper
c15437c0c6 Improve error message and add tests for borrowck match handling 2019-02-21 19:03:33 +00:00
Philipp Hansch
4867a8c4fa
Update miri links
Miri has been moved to `rust-lang` a couple of days ago.
2019-02-21 19:26:45 +01:00
Niko Matsakis
33d3598e3b partially revert 904a0bde93
This preserves the error you currently get on stable for the
old-lub-glb-object.rs test.
2019-02-21 12:50:13 -05:00
bors
633d75ac17 Auto merge of #58584 - ehuss:update-cargo, r=alexcrichton
Update cargo

9 commits in 865cb70106a6b1171a500ff68f93ab52eea56e72..b33ce7fc9092962b0657b4c25354984b5e5c47e4
2019-02-10 15:49:37 +0000 to 2019-02-19 18:42:50 +0000
- Don't retry invalid credentials from git credential helpers (rust-lang/cargo#6681)
- Fix some typos in resolver tests (rust-lang/cargo#6682)
- Add an unstable option to build proc macros for both the host and the target (rust-lang/cargo#6547)
- Test cases proving RUSTC_WRAPPER can be a relative path (rust-lang/cargo#6638)
- Add support for Azure DevOps (rust-lang/cargo#6264)
- Update docs for removed `patch` restriction. (rust-lang/cargo#6663)
- Fix incorrect help message (rust-lang/cargo#6555)
- Stabilize Alternative Registries (rust-lang/cargo#6654)
- Having a [patch] section when publishing is not an error (rust-lang/cargo#6535)
2019-02-21 17:18:53 +00:00
Niko Matsakis
21e9478366 update test files to reflect new output
One surprise: old-lub-glb-object.rs, may indicate a bug
2019-02-21 11:32:17 -05:00
Niko Matsakis
561ce442de restore the actual leak-check 2019-02-21 11:32:17 -05:00
Niko Matsakis
0c94ea0bf1 introduce a dummy leak check and invoke it in all the right places
This set of diffs was produced by combing through
b68fad670b and seeing where the
`leak_check` used to be invoked and how.
2019-02-21 11:32:17 -05:00
Niko Matsakis
2cbe07b5b3 reintroduce commit_if_ok calls to subtype_predicate 2019-02-21 11:32:17 -05:00
Niko Matsakis
6cb4ffbe14 reintroduce commit_if_ok call into higher_ranked_sub 2019-02-21 11:32:17 -05:00
Niko Matsakis
3cd286bac2 s/skol_/placeholder_/ 2019-02-21 11:32:17 -05:00
Stein Somers
09a24545a8 introduce benchmarks of BTreeSet.intersection 2019-02-21 17:26:10 +01:00
Ralf Jung
811af4289c fix link 2019-02-21 17:18:18 +01:00
Ralf Jung
b01f81be74 remark about the one place where place computation calls size_and_align_of 2019-02-21 16:14:31 +01:00
Ralf Jung
32a9614a4e this is for you, tidy 2019-02-21 16:05:49 +01:00
bors
fd42f24b01 Auto merge of #58597 - pietroalbini:appveyor-gce, r=alexcrichton
ci: switch appveyor to gce builders to try debugging the 259 failure

r? @alexcrichton
2019-02-21 14:34:49 +00:00
Ralf Jung
6b88007473 explain unsafe 2019-02-21 15:33:55 +01:00
Ralf Jung
bcc55e5e79 we only list some examples of basic types 2019-02-21 15:31:09 +01:00
Ralf Jung
2db0e0d65c tweaks and fix weird space 2019-02-21 15:30:31 +01:00
Mazdak Farrokhzad
e61a8a94f7
Apply suggestions from code review
Co-Authored-By: RalfJung <post@ralfj.de>
2019-02-21 15:28:46 +01:00
Gabriela Alexandra Moldovan
e5d1fa58f2 codegen and write_metadata can mutate ModuleLLvm. 2019-02-21 13:38:44 +00:00
Aaron Power
0ab2aedb7f
Update RELEASES.md 2019-02-21 14:10:24 +01:00
Mahmut Bulut
99d67ca3b8
Destabilize fixed-width const defined atomic integers
* With this PR 1.34.0 onwards const declarations of atomic integers will be
  unstable.
2019-02-21 13:57:51 +01:00
Ralf Jung
0f6d36375f explain why we use static alignment in ref-to-place conversion 2019-02-21 13:15:59 +01:00
bors
0e25a6829c Auto merge of #58535 - RalfJung:miri, r=oli-obk
update miri

r? @oli-obk

Fixes https://github.com/rust-lang/rust/issues/58558
2019-02-21 11:44:16 +00:00
Aaron Power
8060eb473d
Update RELEASES.md 2019-02-21 10:27:22 +01:00
Ralf Jung
59bdb31c89 final pin projections tweaking 2019-02-21 10:21:59 +01:00
Ralf Jung
c9ade6a577 more pin projections tweaking 2019-02-21 09:57:29 +01:00
Stjepan Glavina
c6d24cd504 Enable feature duration_constants in examples 2019-02-21 09:13:50 +01:00
Alex Gurganus
6a5abea709 Remove braces from most E0505 examples
The solution which uses braces to release the borrow
before it is moved is only required to satisfy the 2015
edition borrow checker.

All other examples give the expected results for both
2015 and 2018 editions.
2019-02-20 16:12:28 -06:00
Trevor Spiteri
42d749c9ec
Update RELEASES.md
Co-Authored-By: Aaronepower <Aaronepower@users.noreply.github.com>
2019-02-20 23:10:54 +01:00
Gabriela Alexandra Moldovan
36f18f2d3a Allow Self::Module to be mutated.
`codegen_allocator` and `write_metadata` mutate the underlying LLVM module. As
such, it makes sense for these two functions to receive a mutable reference to
the module (as opposed to an immutable one).
2019-02-20 21:35:34 +00:00
bors
1349c84a4f Auto merge of #58056 - nikomatsakis:issue-57843-universe-leak, r=pnkfelix
make generalization code create new variables in correct universe

In our type inference system, when we "generalize" a type T to become
a suitable value for a type variable V, we sometimes wind up creating
new inference variables. So, for example, if we are making V be some
subtype of `&'X u32`, then we might instantiate V with `&'Y u32`.
This generalized type is then related `&'Y u32 <: &'X u32`, resulting
in a region constriant `'Y: 'X`. Previously, however, we were making
these fresh variables like `'Y` in the "current universe", but they
should be created in the universe of V. Moreover, we sometimes cheat
in an invariant context and avoid creating fresh variables if we know
the result must be equal -- we can only do that when the universes
work out.

Fixes #57843

r? @pnkfelix
2019-02-20 21:12:18 +00:00
Stjepan Glavina
102436d16a Put Future trait into spotlight 2019-02-20 22:06:30 +01:00
Stjepan Glavina
f223c03372 Add examples for duration constants 2019-02-20 21:58:20 +01:00