Commit Graph

99517 Commits

Author SHA1 Message Date
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
Mazdak Farrokhzad
05cc3c0a83 or-patterns: liveness: is_argument -> is_param.
Pacify `tidy`. It's also more correct in this context.
2019-09-16 16:35:36 +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
Ralf Jung
b21622cd6c add test 2019-09-16 16:28:23 +02:00
Mazdak Farrokhzad
56b055a6ab or-patterns: HAIR: Arm.patterns: Vec<Pattern<'_>> -> .pattern: Pattern<'_>. 2019-09-16 15:46:35 +02:00
Ralf Jung
61a28d5c88 do the variant idx computations on the host (non-overflowing) 2019-09-16 15:04:33 +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
Ralf Jung
75fe84f4fc factor getting the discriminant layout to a new method 2019-09-16 13:15:56 +02:00
Ralf Jung
b73f1a51dc better and more consistent variable names 2019-09-16 13:08:21 +02:00
Ralf Jung
8c0f601105 fix Miri discriminant load/store when overflows are involved 2019-09-16 12:33:47 +02: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
Tomas Tauber
68c3739f12
updated the panic message wording 2019-09-16 12:13:02 +08: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
Mazdak Farrokhzad
549756bef8 or-patterns: check_match: nix top_pats_hack passed to check_patterns. 2019-09-16 03:13:02 +02:00
Mazdak Farrokhzad
6bd8c6d4f4 or-patterns: check_match: remove top_pats_hack for check_for_bindings_named_same_as_variants. 2019-09-16 03:13:02 +02:00
Mazdak Farrokhzad
9b406f1069 or-patterns: regionck/link_match: remove top_pats_hack. 2019-09-16 03:13:02 +02:00
Mazdak Farrokhzad
38a5ae9cc1 or-patterns: regionck/visit_arm: remove top_pats_hack. 2019-09-16 03:13:02 +02:00
Mazdak Farrokhzad
0dfd706257 or-patterns: rvalue_promotion: remove top_pats_hack. 2019-09-16 03:13:02 +02:00
Mazdak Farrokhzad
07deb93bb2 or-patterns: middle/dead: make a hack less hacky. 2019-09-16 03:13:02 +02:00
Mazdak Farrokhzad
d7139f3e6d or-patterns: euv/walk_arm: remove top_pats_hack. 2019-09-16 03:13:02 +02:00
Mazdak Farrokhzad
fb2cfec433 or-patterns: euv/arm_move_mode: remove top_pats_hack. 2019-09-16 03:13:02 +02:00
Mazdak Farrokhzad
57eeb61cc8 or-patterns: remove Arm::contains_explicit_ref_binding. 2019-09-16 03:13:02 +02:00
Mazdak Farrokhzad
9ca42a5600 or-patterns: liveness: generalize + remove top_pats_hack. 2019-09-16 03:12:00 +02:00
Mazdak Farrokhzad
cc5fe6d520 or-patterns: liveness/visit_arm: remove top_pats_hack. 2019-09-16 03:11:08 +02: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
Mark Rousskov
a678e31911 Hide diagnostics emitted during --cfg parsing
The early error is more than sufficient for fixing the problem.
2019-09-15 17:39:38 -04:00
bors
06c94ee79b Auto merge of #64491 - Centril:rollup-21wkl69, r=Centril
Rollup of 3 pull requests

Successful merges:

 - #63872 (Document platform-specific behavior of the iterator returned by std::fs::read_dir)
 - #64250 (save-analysis: Nest typeck tables when processing functions/methods)
 - #64472 (Don't mark expression with attributes as not needing parentheses)

Failed merges:

r? @ghost
2019-09-15 20:06:49 +00:00
Mazdak Farrokhzad
0592d13757
Rollup merge of #64472 - Mark-Simulacrum:unused-parens-attr, r=varkor
Don't mark expression with attributes as not needing parentheses

This is not perfectly correct as `#[attr] (5)` will still not lint, but it does seem good enough, in particular as the parentheses in that case are not unambiguously incorrect; I might personally prefer to see them for clarity.

Fixes https://github.com/rust-lang/rust/issues/43279.
2019-09-15 19:36:01 +02:00
Mazdak Farrokhzad
2e11e81f1e
Rollup merge of #64250 - Xanewok:save-analysis-assoc-nested, r=varkor
save-analysis: Nest typeck tables when processing functions/methods

Fixes an issue where we did not nest tables correctly when resolving
associated types in formal argument/return type positions.

This was the minimized reproduction case that I tested the fix on:
```rust
pub trait Trait {
    type Assoc;
}

pub struct A;

pub fn func() {
    fn _inner1<U: Trait>(_: U::Assoc) {}
    fn _inner2<U: Trait>() -> U::Assoc { unimplemented!() }

    impl A {
        fn _inner1<U: Trait>(self, _: U::Assoc) {}
        fn _inner2<U: Trait>(self) -> U::Assoc { unimplemented!() }
    }
}
```
using `debug_assertions`-enabled rustc and by additionally passing `-Zsave-analysis`.

Unfortunately the original assertion fired is a *debug* one and from what I can tell we don't run the tests with these on, so I'm not adding a test here. If I missed it and there is a way to run tests with these on, I'd love to add a test case for this.

Closes #63663
Closes #50328
Closes #43982
2019-09-15 19:35:59 +02:00
Mazdak Farrokhzad
0a2e07ec1d
Rollup merge of #63872 - marmistrz:readdir, r=jonas-schievink
Document platform-specific behavior of the iterator returned by std::fs::read_dir
2019-09-15 19:35:58 +02:00
Mazdak Farrokhzad
9d1c3c96e7 simplify hir::Pat::walk_. 2019-09-15 18:50:44 +02:00