99290 Commits

Author SHA1 Message Date
Matthew Jasper
3c2fd1a72d Print syntax contexts and marks when printing hygiene information 2019-09-17 21:23:33 +01:00
bors
7efe1c6e67 Auto merge of - nikomatsakis:issue-64512-drop-order-tail-temp, r=davidtwco
adjust desugaring for async fn to correct drop order

Old desugaring, given a user function body `{ $stmts; $expr }`

```
{
    let $param_pattern0 = $raw_param0;
    ...
    let $param_patternN = $raw_paramN;
    $stmts;
    $expr
}
```

New desugaring:

```
{
    let $param_pattern0 = $raw_param0;
    ...
    let $param_patternN = $raw_paramN;
    drop-temps {
        $stmts;
        $expr
    }
}
```

The drop-temps is an internal bit of HIR that drops temporaries from the resulting expression, but it should be equivalent to `return { $stmts; $expr }`.

Fixes 
Fixes 
2019-09-17 18:23:30 +00:00
lqd
f9c73293e2 Bless json output of test ui/json-options.rs for Polonius 2019-09-17 19:35:16 +02:00
lqd
34d3167368 Bless json output of test ui/json-multiple.rs for Polonius 2019-09-17 19:34:12 +02:00
lqd
3ef980aeaa Update expectations of test ui/dropck/dropck_trait_cycle_checked.rs for Polonius
as its output was changed by 2ff337a8e2 (diff-bd3f80b956148a5d1567aa8698b8a507)
2019-09-17 19:32:36 +02:00
lqd
222e920151 Bless output of test borrowck/return-local-binding-from-desugaring.rs for Polonius 2019-09-17 19:30:34 +02:00
lqd
9f4351d406 Bless output of test borrowck/return-local-binding-from-desugaring.rs for Polonius 2019-09-17 19:28:49 +02:00
Andre Bogus
ab6e108644 improve Vec example soundness in mem::transmute docs 2019-09-17 18:31:54 +02:00
Ralf Jung
a4dc33baf6 build-manifest: add some comments 2019-09-17 17:26:55 +02:00
bors
9150f844e2 Auto merge of - alexcrichton:less-assertions, r=pietroalbini
azure: Disable more LLVM/debug assertions in

This commit disables LLVM/debug assertions in our 5 slowest builders:

* i686-gnu
* i686-gnu-nopt
* i686-msvc-1
* i686-msvc-2
* x86_64-msvc-cargo

This is reducing the amount of test coverage for LLVM/debug assertions,
but we're just unfortunately running out of time on CI too many times.
Some test builds have shown that i686-gnu drops nearly an hour of CI
time by disabling these two assertions. Perhaps when we eventually get
4-core machines we can reenable these, but for now turn them off and
hook them up to the tracking issue at  which will ideally be
repurposes to tracking all of these.
2019-09-17 14:43:44 +00:00
Oliver Scherer
0de9485038 Get rid of special const intrinsic query in favour of const_eval 2019-09-17 16:31:55 +02:00
Taiki Endo
a22e9ee8d0
Update src/libcore/pin.rs
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-09-17 20:02:48 +09:00
Taiki Endo
522f4e1f3e Add an example to Pin::as_mut 2019-09-17 19:41:12 +09:00
bors
f504e37dc6 Auto merge of - pietroalbini:revert-miri-manifest, r=pietroalbini
Revert 

 is making the release process panic, causing today's missing nightly (see https://github.com/rust-lang/rust/issues/64540). This reverts that PR, but I'm happy to review a fixed version of it.

cc @RalfJung
r? @ghost

Fixes https://github.com/rust-lang/rust/issues/64540
2019-09-17 10:37:01 +00:00
Ralf Jung
686170e87d update miri 2019-09-17 12:31:49 +02:00
Arno Haase
f4f136e67b newly phrased documentation for spin loop hints 2019-09-17 12:09:07 +02:00
Niko Matsakis
2d8b10f63c adjust larger comment to include the body 2019-09-17 05:10:22 -04:00
Niko Matsakis
716b2bcfb3 use drop-temps { .. } pseudo-notation
DropTemps(...) looks like a function, this looks like wacko special stuff
2019-09-17 05:10:22 -04:00
Niko Matsakis
0a11e80fa8 introduce lower_block_expr convenience function, and use it 2019-09-17 05:10:22 -04:00
Niko Matsakis
123f129f79 apply nits from centril
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-09-17 04:53:28 -04:00
Pietro Albini
a7a6dedfe6
Revert "Rollup merge of - RalfJung:miri-manifest, r=pietroalbini"
This reverts commit 7975973e2b806a7ee8e54b40f9e774528a777e31, reversing
changes made to f0320e54c7c2c923e2e05996ac1d74f781115bbc.
2019-09-17 09:58:55 +02:00
Ralf Jung
e8d858ef3c rename Allocation::retag -> with_tags_and_extra 2019-09-17 09:29:06 +02:00
Ralf Jung
daafeb35b7 document Miri error categories 2019-09-17 08:58:51 +02:00
Nicholas Nethercote
7f6e160875 Rename some index variables.
Now that all indices have type `usize`, it makes sense to be more
consistent about their naming. This commit removes all uses of `i` in
favour of `index`.
2019-09-17 15:32:29 +10:00
Nicholas Nethercote
cf3a562c98 Remove NodeIndex.
The size of the indices doesn't matter much here, and having a
`newtype_index!` index type without also using `IndexVec` requires lots
of conversions. So this commit removes `NodeIndex` in favour of uniform
use of `usize` as the index type. As well as making the code slightly
more concise, it also slightly speeds things up.
2019-09-17 15:32:29 +10:00
Nicholas Nethercote
476e75ded7 Move a Node's parent into the descendents list.
`Node` has an optional parent and a list of other descendents. Most of
the time the parent is treated the same as the other descendents --
error-handling is the exception -- and chaining them together for
iteration has a non-trivial cost.

This commit changes the representation. There is now a single list of
descendants, and a boolean flag that indicates if there is a parent (in
which case it is first descendent). This representation encodes the same
information, in a way that is less idiomatic but cheaper to iterate over
for the common case where the parent doesn't need special treatment.

As a result, some benchmark workloads are up to 2% faster.
2019-09-17 15:32:29 +10:00
Afnan Enayet
02c1b892c1
Fix failure note to_str implementation
* Serialize the level to something a little more useful for a failure note
  struct
* Update tests accordingly
2019-09-16 22:30:59 -07:00
bors
5670d048c0 Auto merge of - Centril:rollup-wiyxagi, r=Centril
Rollup of 6 pull requests

Successful merges:

 -  (Tweak unsatisfied HRTB errors)
 -  (Update bundled OpenSSL to 1.1.1d)
 -  (Various refactorings to clean up nll diagnostics)
 -  (Various `ObligationForest` improvements)
 -  (Elide lifetimes in `Pin<&(mut) Self>`)
 -  (Use shorthand syntax in the self parameter of methods of Pin)

Failed merges:

r? @ghost
2019-09-17 01:09:07 +00:00
Mazdak Farrokhzad
a1fd9bae2c
Rollup merge of - taiki-e:pin-self, r=Centril
Use shorthand syntax in the self parameter of methods of Pin
2019-09-17 03:08:41 +02:00
Mazdak Farrokhzad
52fa593441
Rollup merge of - taiki-e:docs-pin-lifetimes, r=Centril
Elide lifetimes in `Pin<&(mut) Self>`
2019-09-17 03:08:39 +02:00
Mazdak Farrokhzad
1e3b57ee77
Rollup merge of - nnethercote:ObligForest-fixups, r=nikomatsakis
Various `ObligationForest` improvements

These commits make the code both nicer and faster.

r? @nikomatsakis
2019-09-17 03:08:38 +02:00
Mazdak Farrokhzad
69e93e8179
Rollup merge of - mark-i-m:region-naming-ctx, r=estebank
Various refactorings to clean up nll diagnostics

- Create ErrorReportingCtx and ErrorConstraintInfo, vasting reducing the
  number of arguments passed around everywhere in the error reporting code
- Create RegionErrorNamingCtx, making a given lifetime have consistent
  numbering thoughout all error messages for that MIR def.
- Make the error reporting code return the DiagnosticBuilder rather than
  directly buffer the Diagnostic. This makes it easier to modify the
  diagnostic later, e.g. to add suggestions.

r? @estebank

Split out from https://github.com/rust-lang/rust/pull/58281
2019-09-17 03:08:36 +02:00
Mazdak Farrokhzad
aeb32f01b6
Rollup merge of - alexcrichton:update-openssl, r=Mark-Simulacrum
Update bundled OpenSSL to 1.1.1d

Brings in a few minor security fixes to the distributed Cargo/etc.
2019-09-17 03:08:35 +02:00
Mazdak Farrokhzad
3edc644751
Rollup merge of - estebank:hrtb-errors, r=oli-obk
Tweak unsatisfied HRTB errors

r? @oli-obk

Close .
2019-09-17 03:08:34 +02:00
Dylan MacKenzie
73c7a6813d Remove dataflow::state_for_location 2019-09-16 17:53:02 -07:00
Dylan MacKenzie
48c2a1ee3a Replace all uses of dataflow::state_for_location
Use the new dataflow cursor.
2019-09-16 17:52:15 -07:00
Dylan MacKenzie
606a31f46a Add a getter for the current state to DataflowResultsCursor 2019-09-16 17:11:18 -07:00
Taiki Endo
076e0ce259 Use shorthand syntax in the self parameter of methods of Pin 2019-09-17 08:54:30 +09:00
Taiki Endo
3a046ffa71 Elide lifetimes in Pin<&(mut) Self> 2019-09-17 08:39:34 +09:00
Esteban Küber
0a985f2c86 Tweak unsatisfied HRTB errors 2019-09-16 15:34:33 -07:00
bors
7ac21e7636 Auto merge of - Centril:rollup-k4cz2xn, r=Centril
Rollup of 4 pull requests

Successful merges:

 -  (`AdtDef` is an algebraic data type, not abstract data type)
 -  (update Miri)
 -  (Make some adjustments to the documentation for `std::convert::identity`)
 -  (Use while let slice_pattern instead of carrying an index around)

Failed merges:

r? @ghost
2019-09-16 21:22:54 +00:00
Mazdak Farrokhzad
1376ccd84d
Rollup merge of - spastorino:while-let-to-iterate-over-proj-slice, r=oli-obk
Use while let slice_pattern instead of carrying an index around

r? @oli-obk
2019-09-16 23:21:52 +02:00
Mazdak Farrokhzad
a5a7ed6348
Rollup merge of - varkor:convert-identity-doc-fixes, r=Centril
Make some adjustments to the documentation for `std::convert::identity`

Fixes some extra blank lines and makes some minor tweaks to the wording.
2019-09-16 23:21:50 +02:00
Mazdak Farrokhzad
a31d71f56b
Rollup merge of - RalfJung:miri, r=alexcrichton
update Miri

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

r? @alexcrichton for the Cargo.toml changes: with byteorder 1.3, the `i128` feature is a NOP, so we can remove it everywhere and then get rid of this crate in the workspace-hack.
2019-09-16 23:21:49 +02:00
Mazdak Farrokhzad
88e501e768
Rollup merge of - rust-lang:adt-docs-fix, r=varkor
`AdtDef` is an algebraic data type, not abstract data type

r? @varkor
2019-09-16 23:21:48 +02:00
Niko Matsakis
00d159095a adjust desugaring for async fn to correct drop order
Old desugaring, given a user function body { $stmts; $expr }

```
{
    let $param_pattern0 = $raw_param0;
    ...
    let $param_patternN = $raw_paramN;
    $stmts;
    $expr
}
```

New desugaring:

```
{
    let $param_pattern0 = $raw_param0;
    ...
    let $param_patternN = $raw_paramN;
    drop-temps {
        $stmts;
        $expr
    }
}
```

The drop-temps is an internal bit of HIR that drops temporaries from
the resulting expression, but it should be equivalent to `return {
$stmts; $expr }`.
2019-09-16 16:44:18 -04:00
Niko Matsakis
9ae1a664f7 add regression test for issue-64391 2019-09-16 16:44:18 -04:00
Ralf Jung
388cd5d88e avoid duplicate issues for Miri build failures 2019-09-16 22:25:34 +02:00
Niko Matsakis
ab1a3f09fd add test for drop order of temporary in tail return expression 2019-09-16 16:13:45 -04:00
Santiago Pastorino
d1f763f60d
Use while let slice_pattern instead of carrying an index around 2019-09-16 15:53:08 -03:00