Commit graph

99276 commits

Author SHA1 Message Date
bors
f504e37dc6 Auto merge of #64543 - pietroalbini:revert-miri-manifest, r=pietroalbini
Revert #64451

#64451 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 #64451 - RalfJung:miri-manifest, r=pietroalbini"
This reverts commit 7975973e2b, reversing
changes made to f0320e54c7.
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 #64535 - Centril:rollup-wiyxagi, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #64085 (Tweak unsatisfied HRTB errors)
 - #64380 (Update bundled OpenSSL to 1.1.1d)
 - #64416 (Various refactorings to clean up nll diagnostics)
 - #64500 (Various `ObligationForest` improvements)
 - #64530 (Elide lifetimes in `Pin<&(mut) Self>`)
 - #64531 (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 #64531 - 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 #64530 - 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 #64500 - 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 #64416 - 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 #64380 - 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 #64085 - estebank:hrtb-errors, r=oli-obk
Tweak unsatisfied HRTB errors

r? @oli-obk

Close #35180.
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 #64526 - Centril:rollup-k4cz2xn, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #64357 (`AdtDef` is an algebraic data type, not abstract data type)
 - #64485 (update Miri)
 - #64509 (Make some adjustments to the documentation for `std::convert::identity`)
 - #64518 (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 #64518 - 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 #64509 - 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 #64485 - 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 #64357 - 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
Alex Crichton
821d293283 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 #59637 which will ideally be
repurposes to tracking all of these.
2019-09-16 11:43:23 -07:00
Ralf Jung
b7ebbc291a update miri for latest breakage 2019-09-16 18:28:05 +02:00
Ralf Jung
f90a81c238 with byteorder 1.3, the i128 feature is a NOP 2019-09-16 18:28:05 +02:00
Ralf Jung
4b175339b8 update miri 2019-09-16 18:27:28 +02:00
Charles Gleason
194d357e03 Document From trait for LhsExpr 2019-09-16 11:46:44 -04:00
Mazdak Farrokhzad
2fd4e584a8 AdtDef is an algebraic data type, not abstract data type. 2019-09-16 17:39:28 +02:00
bors
a44881d892 Auto merge of #64510 - Centril:rollup-m03zsq8, r=Centril
Rollup of 10 pull requests

Successful merges:

 - #63955 (Make sure interned constants are immutable)
 - #64028 (Stabilize `Vec::new` and `String::new` as `const fn`s)
 - #64119 (ci: ensure all tool maintainers are assignable on issues)
 - #64444 (fix building libstd without backtrace feature)
 - #64446 (Fix build script sanitizer check.)
 - #64451 (when Miri tests are not passing, do not add Miri component)
 - #64467 (Hide diagnostics emitted during --cfg parsing)
 - #64497 (Don't print the "total" `-Ztime-passes` output if `--prints=...` is also given)
 - #64499 (Use `Symbol` in two more functions.)
 - #64504 (use println!() instead of println!(""))

Failed merges:

r? @ghost
2019-09-16 15:35:48 +00:00
Mazdak Farrokhzad
f4ff4189ae
Rollup merge of #64504 - guanqun:use-println-without-empty-str, r=jonas-schievink
use println!() instead of println!("")

The empty string is unnecessary.
2019-09-16 17:09:46 +02:00
Mazdak Farrokhzad
d8ecf45da8
Rollup merge of #64499 - nnethercote:use-Symbol-in-two-more-functions, r=petrochenkov
Use `Symbol` in two more functions.

r? @petrochenkov
2019-09-16 17:09:44 +02:00
Mazdak Farrokhzad
acbbcda399
Rollup merge of #64497 - nnethercote:fix-64339, r=petrochenkov
Don't print the "total" `-Ztime-passes` output if `--prints=...` is also given

Fixes #64339.
2019-09-16 17:09:43 +02:00
Mazdak Farrokhzad
75db5711a4
Rollup merge of #64467 - Mark-Simulacrum:hide-cfg-failures, r=estebank
Hide diagnostics emitted during --cfg parsing

The early error is more than sufficient for fixing the problem.

Fixes https://github.com/rust-lang/rust/issues/31496.
2019-09-16 17:09:41 +02:00
Mazdak Farrokhzad
7975973e2b
Rollup merge of #64451 - RalfJung:miri-manifest, r=pietroalbini
when Miri tests are not passing, do not add Miri component

This makes build-manifest query the toolstate repo at https://github.com/rust-lang-nursery/rust-toolstate to figure out if the tests of the Miri component are passing. If they are not, we remove the component from the manifest, to avoid shipping a broken Miri.

I tested this locally by running build-manifest and making sure that it correctly detects the toolstate of 02785dabad as broken.

r? @pietroalbini
Cc @kennytm @alexcrichton

Fixes https://github.com/rust-lang/rust/issues/60301
2019-09-16 17:09:40 +02:00
Mazdak Farrokhzad
f0320e54c7
Rollup merge of #64446 - ehuss:fix-sanitizer-build, r=alexcrichton
Fix build script sanitizer check.

#64166 changed the way the sanitizer build scripts work. However, they were changed so that they switch between new-style to old-style cargo fingerprints. This trips up on https://github.com/rust-lang/cargo/issues/6779.

It also causes rustbuild to panic.  If you build stage1 std (with sanitizers off), and then enable sanitizers, it panics.  (This is because the build scripts don't declare that they need to re-run.)

This PR will trip https://github.com/rust-lang/cargo/issues/6779 again, unfortunately. I've been having way too many unexplained rebuilds in rust-lang/rust recently, but at least I'll know why this time.

This doesn't fix all problems with the build scripts, but arguably they should be fixed in cargo. For example, the build scripts change which rerun-if statements they declare between runs which triggers https://github.com/rust-lang/cargo/issues/7362.

The test for this is:
1. Turn off sanitizers (which is the default)
2. `./x.py build --stage=1 src/libstd`
3. `./x.py build --stage=1 src/libstd` again should be a null build.
4. Enable sanitizers.
5. `./x.py build --stage=1 src/libstd` should rebuild with sanitizers enabled.
6. `./x.py build --stage=1 src/libstd` again should be a null build. This actually rebuilds due to https://github.com/rust-lang/cargo/issues/7362 because the rerun-if directives changed between step 3 and 5. A 3rd attempt should be a null build.
2019-09-16 17:09:38 +02:00