Commit Graph

99185 Commits

Author SHA1 Message Date
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
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
Mazdak Farrokhzad
2a6a342aaf
Rollup merge of #64444 - RalfJung:no-backtrace, r=alexcrichton
fix building libstd without backtrace feature

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

r? @alexcrichton
2019-09-16 17:09:37 +02:00
Mazdak Farrokhzad
63bc6aeb7d
Rollup merge of #64119 - pietroalbini:validate-toolstate-maintainers, r=kennytm
ci: ensure all tool maintainers are assignable on issues

GitHub only allows people explicitly listed as collaborators on the repository or who commented on the issue/PR to be assignees, failing to create the issue if non-assignable people are assigned.

This adds an extra check on CI to make sure all the people listed as tool maintainers can be assigned to toolstate issues. The check won't be executed on PR builds due to the lack of a valid token.

r? @kennytm
2019-09-16 17:09:35 +02:00
Mazdak Farrokhzad
be327a8f69
Rollup merge of #64028 - Centril:stabilize-alloc-new-2, r=alexcrichton
Stabilize `Vec::new` and `String::new` as `const fn`s

Closes https://github.com/rust-lang/rust/issues/64022.

r? @oli-obk
2019-09-16 17:09:34 +02:00
Mazdak Farrokhzad
f432d5030e
Rollup merge of #63955 - RalfJung:intern, r=oli-obk
Make sure interned constants are immutable

This makes sure that interning for constants (not statics) creates only immutable allocations.

Previously, the "main" allocation of `const FOO: Cell<i32> = Cell::new(0);` was marked as mutable, but I don't think we want that. It can be only copied, not written to.

Also, "leftover" allocations (behind raw pointers etc) were left mutable. I don't think we want to support that. I tried asserting that these are all already immutable (to double-check our static checks), but that failed in this one:
```rust
const NON_NULL_PTR2: NonNull<u8> = unsafe { mem::transmute(&0) };
```
Seems like maybe we want more precise mutability annotation inside Miri for locals (like `&0` here) so that this would actually become immutable to begin with?

I also factored `intern_shallow` out of the visitor so that we don't have to construct a visitor when we do not plan to visit anything. That confused me at first.
2019-09-16 17:09:33 +02:00
Mazdak Farrokhzad
9b3e11f635 Const-stabilize String::new. 2019-09-16 16:45:16 +02:00
Mazdak Farrokhzad
d5fe5831ec Const-stabilize Vec::new. 2019-09-16 16:45:16 +02:00
varkor
18b24b718d 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 15:43:46 +01:00
Ralf Jung
49854c4f71 avoid #[cfg] in favor of cfg! 2019-09-16 16:37:44 +02:00
Pietro Albini
ce451b9b26
ci: remove projektir from toolstate notifications
They don't contribute to rust-by-example anymore.
2019-09-16 16:31:52 +02:00
Pietro Albini
f2576c821d
ci: convert maintainer list in publish_toolstate to a set 2019-09-16 16:31:50 +02:00
Pietro Albini
f968c1a4f5
ci: address publish_toolstate review comments 2019-09-16 16:30:50 +02:00
Pietro Albini
eb97b1bfde
ci: rename Gankro to Gankra in toolstate 2019-09-16 16:30:48 +02:00
Pietro Albini
d3d7b58c37
ci: ensure all tool maintainers are assignable on issues
GitHub only allows people explicitly listed as collaborators on the
repository or who commented on the issue/PR to be assignees, failing to
create the issue if non-assignable people are assigned.

This adds an extra check on CI to make sure all the people listed as
tool maintainers can be assigned to toolstate issues. The check won't be
executed on PR builds due to the lack of a valid token.
2019-09-16 16:30:46 +02:00
Ivan Tham
62e86b42b5
Fix inconsistent link formatting 2019-09-16 20:02:36 +08:00
bors
16c4011673 Auto merge of #64381 - mati865:rand, r=alexcrichton
Upgrade parking_lot and tempfile rustc dependencies

This should be last piece to unbreak `rustc` in https://github.com/rust-lang/rust/issues/63848
2019-09-16 11:47:11 +00:00
bors
b6269f27d9 Auto merge of #64383 - pcpthm:btreeset-size-hint, r=dtolnay
Improve BTreeSet::Intersection::size_hint

A comment on `IntersectionInner` mentions `small_iter` should be smaller than `other_iter` but this condition is broken while iterating because those two iterators can be consumed at a different rate. I added a test to demonstrate this situation.
<del>I made `small_iter.len() < other_iter.len()` always true by swapping two iterators when that condition became false. This change affects the return value of `size_hint`. The previous result was also correct but this new version always returns smaller upper bound than the previous version.</del>
I changed `size_hint` to taking minimum of both lengths of iterators and renamed fields to `a` and `b` to match `Union` iterator.
2019-09-16 05:16:19 +00:00
Nicholas Nethercote
163892cf50 Use Symbol in two more functions. 2019-09-16 15:00:28 +10:00
pcpthm
4333b86972 Improve BTreeSet::Intersection::size_hint
The commented invariant that an iterator is smaller than other iterator
was violated after next is called and two iterators are consumed at
different rates.
2019-09-16 04:37:52 +00:00
Nicholas Nethercote
bb229865fa Don't print the "total" -Ztime-passes output if --prints=... is also given.
Fixes #64339.
2019-09-16 13:27:38 +10:00
Nicholas Nethercote
4ecd94e121 Move impl Node just after struct Node. 2019-09-16 12:47:46 +10:00
Nicholas Nethercote
201afa6455 Minor comment tweaks. 2019-09-16 12:47:04 +10:00
Nicholas Nethercote
f22bb2e722 Use retain for waiting_cache in apply_rewrites().
It's more concise, more idiomatic, and measurably faster.
2019-09-16 12:43:48 +10:00
Nicholas Nethercote
6e48053d5d Use iterators in error_at and process_cycle.
This makes the code a little faster, presumably because bounds checks
aren't needed on `nodes` accesses. It requires making `scratch` a
`RefCell`, which is not unreasonable.
2019-09-16 12:43:16 +10:00
Nicholas Nethercote
e2492b7163 Add comments about waiting_cache. 2019-09-16 12:41:36 +10:00
Nicholas Nethercote
6391ef4d6e Fix incorrect comment about contents of a Node. 2019-09-16 12:40:31 +10:00
Nicholas Nethercote
ac061dc5c8 Fix some out-of-date names of things in comments. 2019-09-16 12:39:21 +10:00
Nicholas Nethercote
3fda9578e0 Remove out-of-date comments.
These refer to code that no longer exists.
2019-09-16 12:38:24 +10:00
Nicholas Nethercote
1936e44c13 Factor out repeated self.nodes[i] expressions. 2019-09-16 11:57:10 +10:00
Nicholas Nethercote
43c0d2ce8e Redefine NodeIndex as a newtype_index!.
This commit removes the custom index implementation of `NodeIndex`,
which probably predates `newtype_index!`.

As well as eliminating code, it improves the debugging experience,
because the custom implementation had the property of being incremented
by 1 (so it could use `NonZeroU32`), which was incredibly confusing if
you didn't expect it.

For some reason, I also had to remove an `unsafe` block marker from
`from_u32_unchecked()` that the compiler said was now unnecessary.
2019-09-16 11:53:12 +10:00
Nicholas Nethercote
04b1111ae8 Name index variables consistently.
Those with type `usize` are now called `i`, those with type `NodeIndex`
are called `index`.
2019-09-16 11:52:47 +10:00
bors
3e3e06dfdd Auto merge of #64487 - Xanewok:update-rls, r=jonas-schievink
Update RLS

Fixes the toolstate.

Closes #64480

r? @jonas-schievink
2019-09-16 00:15:45 +00:00