Commit Graph

94487 Commits

Author SHA1 Message Date
bors
daf1ed0e98 Auto merge of #61373 - tmandry:emit-storagedead-along-unwind, r=eddyb
Emit StorageDead along unwind paths for generators

Completion of the work done in #60840. That PR made a change to implicitly consider a local `StorageDead` after Drop, but that was incorrect for DropAndReplace (see also #61060 which tried to fix this in a different way).

This finally enables the optimization implemented in #60187.

r? @eddyb
cc @Zoxc @cramertj @RalfJung
2019-06-06 06:36:12 +00:00
Chris Gregory
c1bc8f11cb
Remove dereference
Co-Authored-By: Steven Fackler <sfackler@gmail.com>
2019-06-05 21:23:45 -07:00
Chris Gregory
4a88614c4f Take self by value (Self is Copy here) 2019-06-05 21:11:09 -07:00
bors
740668dbd9 Auto merge of #57428 - alexreg:associated_type_bounds, r=nikomatsakis,Centril
Implementation of RFC 2289 (associated_type_bounds)

This PR implements the [`asociated_type_bounds` feature](https://github.com/rust-lang/rfcs/blob/master/text/2289-associated-type-bounds.md).

Associated type bounds are implemented in:
   - function/method arguments and return types
   - structs, enums, unions
   - associated items in traits
   - type aliases
   - type parameter defaults
   - trait objects
   - let bindings

CC @nikomatsakis @centril
2019-06-06 03:56:22 +00:00
Santiago Pastorino
0cfaa28bc5 Make LocalAnalizer visitor iterate instead of recurse 2019-06-06 05:17:26 +02:00
Santiago Pastorino
2bdaccbbcf Make UnsafetyChecker visitor iterate instead of recurse 2019-06-06 05:17:19 +02:00
Alexander Regueiro
ee890331f6 Reblessed tests with NLL compare mode on. 2019-06-06 03:29:02 +01:00
Chris Gregory
408895d5b3 Escape needs_drop in the needs_drop documentation 2019-06-05 18:22:31 -07:00
Chris Gregory
94ea5dc597 Escape HashMap with backticks in needs_drop docs 2019-06-05 18:21:17 -07:00
bors
1bec46c9a5 Auto merge of #59331 - varkor:TypeVariableOrigin-refactor, r=eddyb
Refactor `TypeVariableOrigin`

Removes some unused variants and extracts the common `Span` field.

As suggested in https://github.com/rust-lang/rust/pull/59008#discussion_r265031209.

r? @eddyb
2019-06-06 01:04:14 +00:00
Mark Rousskov
bea2e55efa Utilize cfg(bootstrap) over cfg(stage0)
Also removes stage1, stage2 cfgs being passed to rustc to ensure that
stage1 and stage2 are only differentiated as a group (i.e., only through
not bootstrap).
2019-06-05 17:57:58 -06:00
Tyler Mandry
7718b14301 Test StorageDead statements explicitly 2019-06-05 15:10:19 -07:00
Alexander Regueiro
e37a7a1f74 add an example to create_substs_for_ast_path 2019-06-05 21:18:13 +01:00
Niko Matsakis
a900427188 verified that skip-binder is ok 2019-06-05 21:18:13 +01:00
Niko Matsakis
e48dd1257c another comment 2019-06-05 21:18:13 +01:00
Niko Matsakis
18d5085bff more comments 2019-06-05 21:18:13 +01:00
Niko Matsakis
83078f0b37 comment instantiate_poly_trait_ref and its binder behavior 2019-06-05 21:18:13 +01:00
Niko Matsakis
f6ee542f16 make instantiate_poly_trait_ref_inner private to this module 2019-06-05 21:18:13 +01:00
Alexander Regueiro
049f4d8cf4 document the Bounds struct a bit 2019-06-05 21:09:32 +01:00
Niko Matsakis
963e22c38c added a few comments 2019-06-05 21:09:32 +01:00
Alexander Regueiro
2cdd7f8387 Removed unnecessary nested-lifetime-bounds test. 2019-06-05 21:09:27 +01:00
Alexander Regueiro
10b6daa6c8 Reblessed tests. 2019-06-05 21:09:27 +01:00
Alexander Regueiro
c105c28de0 Fixed rebase fallout. 2019-06-05 21:09:27 +01:00
Niko Matsakis
f472cd9c02 Addressed points raised in review. 2019-06-05 21:09:27 +01:00
Alexander Regueiro
5bf5994d92 Fixed up some comments. 2019-06-05 21:09:27 +01:00
Niko Matsakis
538ebd197c Added some comments, made add_bounds private. 2019-06-05 21:09:27 +01:00
Niko Matsakis
0f4a5ca33c Added some comments to lowering code. 2019-06-05 21:09:27 +01:00
Alexander Regueiro
a71d55701e Addressed points raised in review. 2019-06-05 21:09:27 +01:00
Alexander Regueiro
4310ba2c98 Added test suite. 2019-06-05 21:09:27 +01:00
Alexander Regueiro
cad1b1847e Added feature gate. 2019-06-05 21:09:27 +01:00
Alexander Regueiro
01f49f0bb2 Use both existential-type desugaring and where-clause (predicate) desugaring depending on context. 2019-06-05 21:09:26 +01:00
Alexander Regueiro
aaa53ec853 Implemented for traits (associated type definitions). 2019-06-05 21:09:26 +01:00
Alexander Regueiro
3816958f18 Implemented for function bounds, type bounds, and named existential types. 2019-06-05 21:09:26 +01:00
Alexander Regueiro
dce27cba78 Enabled Self in type aliases. 2019-06-05 21:09:26 +01:00
Alexander Regueiro
35585c499f Aggregation of drive-by cosmetic changes. 2019-06-05 21:09:26 +01:00
Philipp Hansch
df076b2d5e
librustc_errors: Rename AnnotateRs -> AnnotateSnippet
The proper name of the library is `annotate-snippet`, not `annotate-rs`,
this commit should get rid of any confusing `AnnotateRs` names.

1. Renames `annotate_rs_emitter.rs` to
   `annotate_snippet_emitter_writer.rs` so that the difference between the
   `Emitter` trait and the implementers is more clear.
2. Renames `AnnotateRsEmitterWriter` to `AnnotateSnippetEmitterWriter`
3. Renames `HumanReadableErrorType::AnnotateRs` to `HumanReadableErrorType::AnnotateSnippet`
2019-06-05 21:43:55 +02:00
Alex Crichton
f708228508 rustbuild: Include rustfmt in deduplicated dependencies
Currently `rustfmt` is excluded from the "don't build dependencies
twice" check but it's currently building dependencies twice! Namely big
dependencies like `rustc-ap-syntax` are built once for rustfmt and once
for the RLS. This commit includes `rustfmt` in these checks and then
fixes the resulting feature mismatches for winapi.
2019-06-05 12:40:02 -07:00
bors
7cdaffd796 Auto merge of #61548 - Centril:rollup-5t6cvbk, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #61503 (Fix cfg(test) build for x86_64-fortanix-unknown-sgx)
 - #61534 (Edit docs of ExitStatus)
 - #61536 (Don't allow using const fn arguments as "args_required_const")
 - #61538 (Don't use GNU noexec stack note)
 - #61546 (azure: Fix some minor issues which have broken our configuration )

Failed merges:

r? @ghost
2019-06-05 18:29:39 +00:00
varkor
66b840c240 Fix after rebase 2019-06-05 17:19:01 +01:00
varkor
8577bb49bf Refactor ConstVariableOrigin into ConstVariableOrigin and ConstVariableOriginKind 2019-06-05 16:45:16 +01:00
varkor
4dcc49c685 Refactor TypeVariableOrigin into TypeVariableOrigin and TypeVariableOriginKind 2019-06-05 16:45:16 +01:00
varkor
05f505107f Remove unused TypeVariableOrigin variants 2019-06-05 16:45:16 +01:00
Mazdak Farrokhzad
694b048637
Rollup merge of #61546 - alexcrichton:fix-azure, r=pietroalbini
azure: Fix some minor issues which have broken our configuration

* Ensure that when we enable IPv6 for Docker on Linux that the various directories before writing a config file
* Delete a previously installed rustup if any since it seems to interfere with Cargo's test suite.
2019-06-05 17:43:34 +02:00
Mazdak Farrokhzad
928f2eeb7b
Rollup merge of #61538 - coypoop:patch-1, r=alexcrichton
Don't use GNU noexec stack note

NetBSD ignores this note and marks the stack no-exec unconditionally
2019-06-05 17:43:33 +02:00
Mazdak Farrokhzad
850b50a44f
Rollup merge of #61536 - oli-obk:args_required_const_in_const_fn, r=eddyb
Don't allow using const fn arguments as "args_required_const"

r? @eddyb
2019-06-05 17:43:31 +02:00
Mazdak Farrokhzad
76f9f6b2ab
Rollup merge of #61534 - ReinierMaas:patch-1, r=Centril
Edit docs of ExitStatus

The documentation of [`ExitStatus`] are extended to be at the same depth as [`Output`].
2019-06-05 17:43:30 +02:00
Mazdak Farrokhzad
713ebb462c
Rollup merge of #61503 - jethrogb:jb/fix-sgx-test, r=alexcrichton
Fix cfg(test) build for x86_64-fortanix-unknown-sgx
2019-06-05 17:43:28 +02:00
bors
47f4975cd7 Auto merge of #61498 - TankhouseAle:const-fn-type-name, r=oli-obk
Add "type_name" support in emulate_intrinsic()

I did some dumb Git things and deleted my original fork repo semi-accidentally (but probably for the best as I'd messed up the history.)

This is the same issue as #61399, which was obviously auto-closed, to be clear.
2019-06-05 15:40:16 +00:00
Alex Crichton
fb3bd58e4f azure: Uninstall previous rustc from builders if any
Looks like Azure has updated images recently to install Rust by default,
but that can interfere with our own compiler (for example Cargo's test
suite we think) so be sure to uninstall it before proceeding.
2019-06-05 08:32:40 -07:00
Alex Crichton
0b88e5a87e azure: Make sure docker directory exists
Looks like the Azure image changed recently so let's account for that!
2019-06-05 07:34:48 -07:00