]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoAuto merge of #64972 - Centril:rollup-gcawast, r=Centril
bors [Tue, 1 Oct 2019 22:04:23 +0000 (22:04 +0000)]
Auto merge of #64972 - Centril:rollup-gcawast, r=Centril

Rollup of 7 pull requests

Successful merges:

 - #63416 (apfloat: improve doc comments)
 - #64820 (BTreeSet intersection, is_subset & difference optimizations)
 - #64910 (syntax: cleanup param, method, and misc parsing)
 - #64912 (Remove unneeded `fn main` blocks from docs)
 - #64933 (Fixes #64919. Suggest fix based on operator precendence.)
 - #64943 (Add lower bound doctests for `saturating_{add,sub}` signed ints)
 - #64950 (Simplify interners)

Failed merges:

r? @ghost

4 years agoRollup merge of #64950 - nnethercote:simplify-interners, r=varkor,spastorino
Mazdak Farrokhzad [Tue, 1 Oct 2019 21:56:27 +0000 (23:56 +0200)]
Rollup merge of #64950 - nnethercote:simplify-interners, r=varkor,spastorino

Simplify interners

Some code readability improvements.

4 years agoRollup merge of #64943 - lzutao:doc-saturating, r=shepmaster
Mazdak Farrokhzad [Tue, 1 Oct 2019 21:56:26 +0000 (23:56 +0200)]
Rollup merge of #64943 - lzutao:doc-saturating, r=shepmaster

Add lower bound doctests for `saturating_{add,sub}` signed ints

Closes #64940

4 years agoRollup merge of #64933 - sam09:master, r=estebank
Mazdak Farrokhzad [Tue, 1 Oct 2019 21:56:24 +0000 (23:56 +0200)]
Rollup merge of #64933 - sam09:master, r=estebank

Fixes #64919. Suggest fix based on operator precendence.

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

4 years agoRollup merge of #64912 - lzutao:unneeded-main-doc, r=jonas-schievink
Mazdak Farrokhzad [Tue, 1 Oct 2019 21:56:23 +0000 (23:56 +0200)]
Rollup merge of #64912 - lzutao:unneeded-main-doc, r=jonas-schievink

Remove unneeded `fn main` blocks from docs

## [No whitespace diff](https://github.com/rust-lang/rust/pull/64912/files?w=1)

4 years agoRollup merge of #64910 - Centril:params-cleanup, r=petrochenkov
Mazdak Farrokhzad [Tue, 1 Oct 2019 21:56:21 +0000 (23:56 +0200)]
Rollup merge of #64910 - Centril:params-cleanup, r=petrochenkov

syntax: cleanup param, method, and misc parsing

Do some misc cleanup of the parser:
- Method and parameter parsing is refactored.
- A parser for `const | mut` is introduced that https://github.com/rust-lang/rust/pull/64588 can reuse.
- Some other misc parsing.

Next up in a different PR:
- ~Implementing https://github.com/rust-lang/rust/issues/64252.~ -- maybe some other time...
- Heavily restructuring up `item.rs` which is a mess (hopefully, no promises ^^).

r? @petrochenkov

4 years agoRollup merge of #64820 - ssomers:master, r=bluss
Mazdak Farrokhzad [Tue, 1 Oct 2019 21:56:20 +0000 (23:56 +0200)]
Rollup merge of #64820 - ssomers:master, r=bluss

BTreeSet intersection, is_subset & difference optimizations

...based on the range of values contained; in particular, a massive improvement when these ranges are disjoint (or merely touching), like in the neg-vs-pos benchmarks already in liballoc. Inspired by #64383 but none of the ideas there worked out.

I introduced another variant in IntersectionInner and in DifferenceInner, because I couldn't find a way to initialize these iterators as empty if there's no empty set around.

Also, reduced the size of "large" sets in test cases - if Miri can't handle it, it was needlessly slowing down everyone.

4 years agoRollup merge of #63416 - RalfJung:apfloat, r=eddyb
Mazdak Farrokhzad [Tue, 1 Oct 2019 21:56:16 +0000 (23:56 +0200)]
Rollup merge of #63416 - RalfJung:apfloat, r=eddyb

apfloat: improve doc comments

r? @eddyb @nagisa

4 years agoBTreeSet intersection, difference & is_subnet optimizations
Stein Somers [Sun, 22 Sep 2019 15:45:47 +0000 (17:45 +0200)]
BTreeSet intersection, difference & is_subnet optimizations

4 years agoRemove unneeded `fn main` blocks from docs
Lzu Tao [Tue, 1 Oct 2019 11:55:46 +0000 (11:55 +0000)]
Remove unneeded `fn main` blocks from docs

4 years agoChange to use exprPrecedence instead of exprKind.
Sam Radhakrishnan [Tue, 1 Oct 2019 09:00:22 +0000 (05:00 -0400)]
Change to use exprPrecedence instead of exprKind.

4 years agoAuto merge of #64946 - Centril:rollup-66mj5o0, r=Centril
bors [Tue, 1 Oct 2019 07:56:52 +0000 (07:56 +0000)]
Auto merge of #64946 - Centril:rollup-66mj5o0, r=Centril

Rollup of 10 pull requests

Successful merges:

 - #63674 (syntax: Support modern attribute syntax in the `meta` matcher)
 - #63931 (Stabilize macros in some more positions)
 - #64887 (syntax: recover trailing `|` in or-patterns)
 - #64895 (async/await: improve not-send errors)
 - #64896 (Remove legacy grammar)
 - #64907 (A small amount of tidying-up factored out from PR #64648)
 - #64928 (Add tests for some issues)
 - #64930 (Silence unreachable code lint from await desugaring)
 - #64935 (Improve code clarity)
 - #64937 (Deduplicate closure type errors)

Failed merges:

r? @ghost

4 years agoRollup merge of #64937 - estebank:dedup-closure-err, r=Centril
Mazdak Farrokhzad [Tue, 1 Oct 2019 07:55:39 +0000 (09:55 +0200)]
Rollup merge of #64937 - estebank:dedup-closure-err, r=Centril

Deduplicate closure type errors

Closure typing obligations flow in both direcitons to properly infer
types. Because of this, we will get 2 type errors whenever there's
an unfulfilled obligation. To avoid this, we deduplicate them in the
`InferCtxt`.

4 years agoRollup merge of #64935 - AnthonyMikh:librustc_errors/emmiter__code-clarity, r=estebank
Mazdak Farrokhzad [Tue, 1 Oct 2019 07:55:38 +0000 (09:55 +0200)]
Rollup merge of #64935 - AnthonyMikh:librustc_errors/emmiter__code-clarity, r=estebank

Improve code clarity

No commit except 55b54285c811b6ab12bb0ba001126fd5b7d3bd09 address performance, just making the existing code more clear.

r? @estebank

4 years agoRollup merge of #64930 - davidtwco:issue-61798-diverging-await, r=petrochenkov
Mazdak Farrokhzad [Tue, 1 Oct 2019 07:55:37 +0000 (09:55 +0200)]
Rollup merge of #64930 - davidtwco:issue-61798-diverging-await, r=petrochenkov

Silence unreachable code lint from await desugaring

Fixes #61798.

This PR silences the unreachable code lint when it originates from within an await desugaring.

4 years agoRollup merge of #64928 - JohnTitor:add-some-tests, r=Centril
Mazdak Farrokhzad [Tue, 1 Oct 2019 07:55:35 +0000 (09:55 +0200)]
Rollup merge of #64928 - JohnTitor:add-some-tests, r=Centril

Add tests for some issues

Closes #50571
Closes #58022
Closes #58344

4 years agoRollup merge of #64907 - alexreg:tidy-up, r=Mark-Simulacrum
Mazdak Farrokhzad [Tue, 1 Oct 2019 07:55:34 +0000 (09:55 +0200)]
Rollup merge of #64907 - alexreg:tidy-up, r=Mark-Simulacrum

A small amount of tidying-up factored out from PR #64648

As requested by @Mark-Simulacrum, I put this in a separate commit to make it easier to review. (As far as I can tell, no violations of the policy here, and they are simply in a separate PR because they're not directly related to the import of that PR.)

r? @Mark-Simulacrum

4 years agoRollup merge of #64896 - XAMPPRocky:remove-grammar, r=Centril
Mazdak Farrokhzad [Tue, 1 Oct 2019 07:55:33 +0000 (09:55 +0200)]
Rollup merge of #64896 - XAMPPRocky:remove-grammar, r=Centril

Remove legacy grammar

Revival of #50835 & #55545

On the #wg-grammar discord there was agreement that enough progress has been made to be able to remove the legacy grammar.

r? @Centril @qmx

cc @rust-lang/wg-grammar

4 years agoRollup merge of #64895 - davidtwco:issue-64130-async-error-definition, r=nikomatsakis
Mazdak Farrokhzad [Tue, 1 Oct 2019 07:55:31 +0000 (09:55 +0200)]
Rollup merge of #64895 - davidtwco:issue-64130-async-error-definition, r=nikomatsakis

async/await: improve not-send errors

cc #64130.

```
note: future does not implement `std::marker::Send` because this value is used across an await
  --> $DIR/issue-64130-non-send-future-diags.rs:15:5
   |
LL |     let g = x.lock().unwrap();
   |         - has type `std::sync::MutexGuard<'_, u32>`
LL |     baz().await;
   |     ^^^^^^^^^^^ await occurs here, with `g` maybe used later
LL | }
   | - `g` is later dropped here
```

r? @nikomatsakis

4 years agoRollup merge of #64887 - Centril:recover-trailing-vert, r=estebank
Mazdak Farrokhzad [Tue, 1 Oct 2019 07:55:29 +0000 (09:55 +0200)]
Rollup merge of #64887 - Centril:recover-trailing-vert, r=estebank

syntax: recover trailing `|` in or-patterns

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

For example (this also shows that we are sensitive to the typo `||`):

```
error: a trailing `|` is not allowed in an or-pattern
  --> $DIR/remove-leading-vert.rs:33:11
   |
LL |         A || => {}
   |         - ^^ help: remove the `||`
   |         |
   |         while parsing this or-pattern starting here
   |
   = note: alternatives in or-patterns are separated with `|`, not `||`
```

r? @estebank

4 years agoRollup merge of #63931 - petrochenkov:stabmac, r=Centril
Mazdak Farrokhzad [Tue, 1 Oct 2019 07:55:28 +0000 (09:55 +0200)]
Rollup merge of #63931 - petrochenkov:stabmac, r=Centril

Stabilize macros in some more positions

- Fn-like macros and attribute macros in `extern` blocks
- Fn-like procedural macros in type positions
- ~Attribute macros on inline modules~ (moved to https://github.com/rust-lang/rust/pull/64273)

Stabilization report: https://github.com/rust-lang/rust/pull/63931#issuecomment-526362396.

Closes https://github.com/rust-lang/rust/issues/49476
cc https://github.com/rust-lang/rust/issues/54727

4 years agoRollup merge of #63674 - petrochenkov:meta2, r=Centril
Mazdak Farrokhzad [Tue, 1 Oct 2019 07:55:26 +0000 (09:55 +0200)]
Rollup merge of #63674 - petrochenkov:meta2, r=Centril

syntax: Support modern attribute syntax in the `meta` matcher

Where "modern" means https://github.com/rust-lang/rust/pull/57367:
```
PATH
PATH `(` TOKEN_STREAM `)`
PATH `[` TOKEN_STREAM `]`
PATH `{` TOKEN_STREAM `}`
```

Unfortunately, `meta` wasn't future-proofed using the `FOLLOW` token set like other matchers (https://github.com/rust-lang/rust/issues/34011), so code like `$meta:meta {` or `$meta:meta [` may break, and we need a crater run to find out how often this happens in practice.

Closes https://github.com/rust-lang/rust/issues/49629 (by fully supporting `meta` rather than removing it.)

4 years agoRemove the `$lt_tcx` parameter from `direct_interners!`.
Nicholas Nethercote [Tue, 1 Oct 2019 06:07:57 +0000 (16:07 +1000)]
Remove the `$lt_tcx` parameter from `direct_interners!`.

It's not necessary.

4 years agoInline and remove `intern_method!`.
Nicholas Nethercote [Tue, 1 Oct 2019 06:03:25 +0000 (16:03 +1000)]
Inline and remove `intern_method!`.

It's only used in two places, and the code is shorter and more readable
with it gone.

4 years agoRemove special treatment for `_intern_canonical_var_infos`.
Nicholas Nethercote [Tue, 1 Oct 2019 05:49:37 +0000 (15:49 +1000)]
Remove special treatment for `_intern_canonical_var_infos`.

This is a leftover from when there were global and thread-local arenas.

4 years agoReorder the slice interners.
Nicholas Nethercote [Tue, 1 Oct 2019 05:48:25 +0000 (15:48 +1000)]
Reorder the slice interners.

So the order matches the order in `CtxtInterners`.

4 years agoAdd lower bound doctests for `saturating_{add,sub}` signed ints
Lzu Tao [Tue, 1 Oct 2019 05:46:50 +0000 (05:46 +0000)]
Add lower bound doctests for `saturating_{add,sub}` signed ints

4 years agosyntax: reformat passing of `FnHeader` to `parse_item_fn`.
Mazdak Farrokhzad [Tue, 1 Oct 2019 04:10:06 +0000 (06:10 +0200)]
syntax: reformat passing of `FnHeader` to `parse_item_fn`.

4 years agosyntax: de-closure-ify `check_or_expected`.
Mazdak Farrokhzad [Tue, 1 Oct 2019 03:55:28 +0000 (05:55 +0200)]
syntax: de-closure-ify `check_or_expected`.

4 years agosyntax: merge things back into `parse_visibility`.
Mazdak Farrokhzad [Tue, 1 Oct 2019 03:53:23 +0000 (05:53 +0200)]
syntax: merge things back into `parse_visibility`.

4 years agosyntax: put helpers of `parse_self_param` in the method.
Mazdak Farrokhzad [Tue, 1 Oct 2019 03:45:41 +0000 (05:45 +0200)]
syntax: put helpers of `parse_self_param` in the method.

4 years agosyntax: document some methods.
Mazdak Farrokhzad [Tue, 1 Oct 2019 03:13:42 +0000 (05:13 +0200)]
syntax: document some methods.

4 years agoAuto merge of #64932 - tmandry:rollup-7t8x1nz, r=tmandry
bors [Tue, 1 Oct 2019 02:31:48 +0000 (02:31 +0000)]
Auto merge of #64932 - tmandry:rollup-7t8x1nz, r=tmandry

Rollup of 9 pull requests

Successful merges:

 - #64377 (Add long error explanation for E0493)
 - #64786 (Use https for curl when building for linux)
 - #64828 (Graphviz debug output for generic dataflow analysis)
 - #64838 (Add long error explanation for E0550)
 - #64891 (Fix `vec![x; n]` with null raw fat pointer zeroing the pointer metadata)
 - #64893 (Zero-initialize `vec![None; n]` for `Option<&T>`, `Option<&mut T>` and `Option<Box<T>>`)
 - #64911 (Fixed a misleading documentation issue #64844)
 - #64921 (Add test for issue-64662)
 - #64923 (Add missing links for mem::needs_drop)

Failed merges:

 - #64918 (Add long error explanation for E0551)

r? @ghost

4 years agoDeduplicate closure type errors
Esteban Küber [Tue, 1 Oct 2019 00:48:22 +0000 (17:48 -0700)]
Deduplicate closure type errors

Closure typing obligations flow in both direcitons to properly infer
types. Because of this, we will get 2 type errors whenever there's
an unfulfilled obligation. To avoid this, we deduplicate them in the
`InferCtxt`.

4 years agoFix borrowck errors
AnthonyMikh [Tue, 1 Oct 2019 00:22:07 +0000 (03:22 +0300)]
Fix borrowck errors

Reborrowing doesn't work for loops

4 years agoHint type for `.sum()`
AnthonyMikh [Tue, 1 Oct 2019 00:04:01 +0000 (03:04 +0300)]
Hint type for `.sum()`

4 years agoAscript type explicitly
AnthonyMikh [Mon, 30 Sep 2019 23:53:44 +0000 (02:53 +0300)]
Ascript type explicitly

4 years agoFix errors
AnthonyMikh [Mon, 30 Sep 2019 23:38:35 +0000 (02:38 +0300)]
Fix errors

4 years ago(fmt) remove trailing whitespaces
AnthonyMikh [Mon, 30 Sep 2019 23:30:52 +0000 (02:30 +0300)]
(fmt) remove trailing whitespaces

4 years agoasync/await: improve obligation errors
David Wood [Wed, 25 Sep 2019 12:58:41 +0000 (13:58 +0100)]
async/await: improve obligation errors

This commit improves obligation errors for async/await:

```
note: future does not implement `std::marker::Send` because this value is used across an
      await
  --> $DIR/issue-64130-non-send-future-diags.rs:15:5
   |
LL |     let g = x.lock().unwrap();
   |         - has type `std::sync::MutexGuard<'_, u32>`
LL |     baz().await;
   |     ^^^^^^^^^^^ await occurs here, with `g` maybe used later
LL | }
   | - `g` is later dropped here
```

Signed-off-by: David Wood <david@davidtw.co>
4 years agoFixes #64919. Suggest fix based on operator precendence.
Sam Radhakrishnan [Mon, 30 Sep 2019 21:45:31 +0000 (17:45 -0400)]
Fixes #64919. Suggest fix based on operator precendence.

4 years agoUse pattern matching instead of indexing tuples
AnthonyMikh [Mon, 30 Sep 2019 22:12:36 +0000 (01:12 +0300)]
Use pattern matching instead of indexing tuples

4 years agoAddress review comments
Vadim Petrochenkov [Mon, 30 Sep 2019 21:58:30 +0000 (00:58 +0300)]
Address review comments

4 years agoSimplify a conditional in `collect_annotations`
AnthonyMikh [Mon, 30 Sep 2019 22:08:51 +0000 (01:08 +0300)]
Simplify a conditional in `collect_annotations`

Also avoid excessive cloning

4 years agoRollup merge of #64923 - lzutao:improve-doc-needs_drop, r=jonas-schievink
Tyler Mandry [Mon, 30 Sep 2019 21:38:32 +0000 (14:38 -0700)]
Rollup merge of #64923 - lzutao:improve-doc-needs_drop, r=jonas-schievink

Add missing links for mem::needs_drop

r? @jonas-schievink

4 years agoRollup merge of #64921 - JohnTitor:add-test-enum, r=varkor
Tyler Mandry [Mon, 30 Sep 2019 21:38:31 +0000 (14:38 -0700)]
Rollup merge of #64921 - JohnTitor:add-test-enum, r=varkor

Add test for issue-64662

Closes #64662
r? @varkor

4 years agoRollup merge of #64911 - hman523:64844, r=Dylan-DPC
Tyler Mandry [Mon, 30 Sep 2019 21:38:28 +0000 (14:38 -0700)]
Rollup merge of #64911 - hman523:64844, r=Dylan-DPC

Fixed a misleading documentation issue #64844

Made the suggested change from @steveklabnik on issue #64844

4 years agoRollup merge of #64893 - SimonSapin:vec-of-option-box, r=sfackler
Tyler Mandry [Mon, 30 Sep 2019 21:38:27 +0000 (14:38 -0700)]
Rollup merge of #64893 - SimonSapin:vec-of-option-box, r=sfackler

Zero-initialize `vec![None; n]` for `Option<&T>`, `Option<&mut T>` and `Option<Box<T>>`

4 years agoRollup merge of #64891 - SimonSapin:vec-of-fat-raw-ptr, r=sfackler
Tyler Mandry [Mon, 30 Sep 2019 21:38:25 +0000 (14:38 -0700)]
Rollup merge of #64891 - SimonSapin:vec-of-fat-raw-ptr, r=sfackler

Fix `vec![x; n]` with null raw fat pointer zeroing the pointer metadata

https://github.com/rust-lang/rust/pull/49496 introduced specialization based on:

```rust
unsafe impl<T: ?Sized> IsZero for *mut T {
    fn is_zero(&self) -> bool {
        (*self).is_null()
    }
}
```

… to call `RawVec::with_capacity_zeroed` for creating `Vec<*mut T>`, which is incorrect for fat pointers since `<*mut T>::is_null` only looks at the data component. That is, a fat pointer can be “null” without being made entirely of zero bits.

This commit fixes it by removing the `?Sized` bound on this impl (and the corresponding `*const T` one). This regresses `vec![x; n]` with `x` a null raw slice of length zero, but that seems exceptionally uncommon. (Vtable pointers are never null, so raw trait objects would not take the fast path anyway.)

An alternative to keep the `?Sized` bound (or even generalize to `impl<U: Copy> IsZero for U`) would be to cast to `&[u8]` of length `size_of::<U>()`, but the optimizer seems not to be able to propagate alignment information and sticks with comparing one byte at a time:

https://rust.godbolt.org/z/xQFkwL

----

Without the library change, the new test fails as follows:

```rust
---- vec::vec_macro_repeating_null_raw_fat_pointer stdout ----
[src/liballoc/tests/vec.rs:1301] ptr_metadata(raw_dyn) = 0x00005596ef95f9a8
[src/liballoc/tests/vec.rs:1306] ptr_metadata(vec[0]) = 0x0000000000000000
thread 'vec::vec_macro_repeating_null_raw_fat_pointer' panicked at 'assertion failed: vec[0] == null_raw_dyn', src/liballoc/tests/vec.rs:1307:5
```

4 years agoRollup merge of #64838 - GuillaumeGomez:long-err-explanation-e0550, r=oli-obk
Tyler Mandry [Mon, 30 Sep 2019 21:38:24 +0000 (14:38 -0700)]
Rollup merge of #64838 - GuillaumeGomez:long-err-explanation-e0550, r=oli-obk

Add long error explanation for E0550

Part of #61137

4 years agoRollup merge of #64828 - ecstatic-morse:generic-dataflow-graphviz, r=oli-obk
Tyler Mandry [Mon, 30 Sep 2019 21:38:22 +0000 (14:38 -0700)]
Rollup merge of #64828 - ecstatic-morse:generic-dataflow-graphviz, r=oli-obk

Graphviz debug output for generic dataflow analysis

A follow up to #64566.

This outputs graphviz diagrams in the generic dataflow engine when `#[rustc_mir(borrowck_graphviz_postflow="suffix.dot")]` is set on an item. This code is based on [`dataflow/graphviz.rs`](https://github.com/rust-lang/rust/blob/master/src/librustc_mir/dataflow/graphviz.rs), but displays different information since there are no "gen"/"kill" sets and transfer functions cannot be coalesced in the generic analysis. As a result, we show the dataflow state at the start and end of each block, as well as the changes resulting from each statement. I also render the state bitset in full  (`{_1,_2}`) instead of hex-encoded as the current renderer does (`06`).

4 years agoRollup merge of #64786 - tmandry:patch-1, r=alexcrichton
Tyler Mandry [Mon, 30 Sep 2019 21:38:21 +0000 (14:38 -0700)]
Rollup merge of #64786 - tmandry:patch-1, r=alexcrichton

Use https for curl when building for linux

I noticed that the dist-x86_64-linux builder uses http to fetch curl and doesn't do any signature verification. It should probably use https.

r? @alexcrichton @Mark-Simulacrum

4 years agoRollup merge of #64377 - GuillaumeGomez:E0493, r=estebank
Tyler Mandry [Mon, 30 Sep 2019 21:38:19 +0000 (14:38 -0700)]
Rollup merge of #64377 - GuillaumeGomez:E0493, r=estebank

Add long error explanation for E0493

Part of #61137.

4 years agoRemove redundant `.iter_mut()`
AnthonyMikh [Mon, 30 Sep 2019 21:10:23 +0000 (00:10 +0300)]
Remove redundant `.iter_mut()`

4 years agoSimplify `EmitterWriter::emit_suggestion_default`
AnthonyMikh [Mon, 30 Sep 2019 21:01:22 +0000 (00:01 +0300)]
Simplify `EmitterWriter::emit_suggestion_default`

Make function return early if source map is not present

4 years agoUpdate doc comment for `style_or_override`
AnthonyMikh [Mon, 30 Sep 2019 20:50:58 +0000 (23:50 +0300)]
Update doc comment for `style_or_override`

4 years agoSimplify `EmitterWriter::get_max_line_num`
AnthonyMikh [Mon, 30 Sep 2019 20:47:51 +0000 (23:47 +0300)]
Simplify `EmitterWriter::get_max_line_num`

4 years agoSimplify `EmitterWriter::get_multispan_max_line_num`
AnthonyMikh [Mon, 30 Sep 2019 20:43:24 +0000 (23:43 +0300)]
Simplify `EmitterWriter::get_multispan_max_line_num`

4 years agoSimplify code for special case of annotation
AnthonyMikh [Mon, 30 Sep 2019 20:33:17 +0000 (23:33 +0300)]
Simplify code for special case of annotation

4 years agotypeck: silence unreachable code from await
David Wood [Mon, 30 Sep 2019 20:27:18 +0000 (21:27 +0100)]
typeck: silence unreachable code from await

This commit silences the unreachable code lint when it originates from
within a await desugaring.

Signed-off-by: David Wood <david@davidtw.co>
4 years agosyntax: Support modern attribute syntax in the `meta` matcher
Vadim Petrochenkov [Sat, 17 Aug 2019 22:10:56 +0000 (01:10 +0300)]
syntax: Support modern attribute syntax in the `meta` matcher

4 years agoAdd test for #58344
Yuki Okushi [Mon, 30 Sep 2019 19:55:46 +0000 (04:55 +0900)]
Add test for #58344

4 years agoAdd test for #58022
Yuki Okushi [Mon, 30 Sep 2019 19:55:29 +0000 (04:55 +0900)]
Add test for #58022

4 years agoAdd test for #50571
Yuki Okushi [Mon, 30 Sep 2019 19:55:12 +0000 (04:55 +0900)]
Add test for #50571

4 years agosyntax: Split `ast::Attribute` into container and inner parts
Vadim Petrochenkov [Sat, 17 Aug 2019 20:55:41 +0000 (23:55 +0300)]
syntax: Split `ast::Attribute` into container and inner parts

4 years agoStabilize proc macros in type positions
Vadim Petrochenkov [Tue, 27 Aug 2019 00:48:48 +0000 (03:48 +0300)]
Stabilize proc macros in type positions

4 years agoStabilize macros in `extern` blocks
Vadim Petrochenkov [Mon, 26 Aug 2019 23:07:26 +0000 (02:07 +0300)]
Stabilize macros in `extern` blocks

Add some tests for macros in extern blocks, remove duplicate tests

4 years agoStop printing `Qualif` results in debug logs
Dylan MacKenzie [Mon, 30 Sep 2019 04:45:10 +0000 (21:45 -0700)]
Stop printing `Qualif` results in debug logs

Now we can use the dataflow graphviz debugging.

4 years agoUse separate files for debugging `Qualif` dataflow results
Dylan MacKenzie [Mon, 30 Sep 2019 04:43:09 +0000 (21:43 -0700)]
Use separate files for debugging `Qualif` dataflow results

4 years agoUpdate consumers of `generic::Engine` API
Dylan MacKenzie [Mon, 30 Sep 2019 04:33:51 +0000 (21:33 -0700)]
Update consumers of `generic::Engine` API

4 years agoAdd graphviz debug output for generic dataflow
Dylan MacKenzie [Thu, 26 Sep 2019 23:26:11 +0000 (16:26 -0700)]
Add graphviz debug output for generic dataflow

4 years agoAllow `ResultsCursor` to borrow the underlying `Results`
Dylan MacKenzie [Thu, 26 Sep 2019 23:25:27 +0000 (16:25 -0700)]
Allow `ResultsCursor` to borrow the underlying `Results`

4 years agoFix typo in docs
Dylan MacKenzie [Thu, 26 Sep 2019 23:24:02 +0000 (16:24 -0700)]
Fix typo in docs

4 years agoAdd missing links for mem::needs_drop
Lzu Tao [Mon, 30 Sep 2019 16:12:01 +0000 (16:12 +0000)]
Add missing links for mem::needs_drop

4 years agoAdd test for issue-64662
Yuki Okushi [Mon, 30 Sep 2019 15:38:08 +0000 (00:38 +0900)]
Add test for issue-64662

4 years agoupdate ui tests
Guillaume Gomez [Fri, 27 Sep 2019 12:08:47 +0000 (14:08 +0200)]
update ui tests

4 years agoAdd long error explanation for E0550
Guillaume Gomez [Fri, 27 Sep 2019 11:36:50 +0000 (13:36 +0200)]
Add long error explanation for E0550

4 years agoAuto merge of #64778 - csmoe:index, r=eddyb
bors [Mon, 30 Sep 2019 13:33:15 +0000 (13:33 +0000)]
Auto merge of #64778 - csmoe:index, r=eddyb

Introduce librustc_index crate

Closes #50592

4 years agoupdate tests
Guillaume Gomez [Thu, 12 Sep 2019 13:52:51 +0000 (15:52 +0200)]
update tests

4 years agoAdd long error explanation for E0493
Guillaume Gomez [Wed, 11 Sep 2019 11:51:03 +0000 (13:51 +0200)]
Add long error explanation for E0493

4 years agoAuto merge of #64600 - scottmcm:no-slice-tryfold-unroll, r=bluss
bors [Mon, 30 Sep 2019 09:52:29 +0000 (09:52 +0000)]
Auto merge of #64600 - scottmcm:no-slice-tryfold-unroll, r=bluss

Remove manual unrolling from slice::Iter(Mut)::try_fold

While this definitely helps sometimes (particularly for trivial closures), it's also a pessimization sometimes, so it's better to leave this to (hypothetical) future LLVM improvements instead of forcing this on everyone.

I think it's better for the advice to be that sometimes you need to unroll manually than you sometimes need to not-unroll manually (like #64545).

---

For context see https://github.com/rust-lang/rust/pull/64572#issuecomment-532961046

4 years agosyntax: reduce repetition in fn parsing.
Mazdak Farrokhzad [Mon, 30 Sep 2019 07:32:51 +0000 (09:32 +0200)]
syntax: reduce repetition in fn parsing.

4 years agosyntax: stylistic cleanup in item parsing.
Mazdak Farrokhzad [Mon, 30 Sep 2019 07:13:42 +0000 (09:13 +0200)]
syntax: stylistic cleanup in item parsing.

4 years agosyntax: fuse more code paths together.
Mazdak Farrokhzad [Mon, 30 Sep 2019 06:53:59 +0000 (08:53 +0200)]
syntax: fuse more code paths together.

4 years agoAuto merge of #64904 - ollie27:rustdoc_logo, r=Mark-Simulacrum
bors [Mon, 30 Sep 2019 06:01:48 +0000 (06:01 +0000)]
Auto merge of #64904 - ollie27:rustdoc_logo, r=Mark-Simulacrum

rustdoc: Fix default logo filename

This was a typo made in #64443. It's the reason the logo is missing on the [nightly docs](https://doc.rust-lang.org/nightly/std/).

r? @Mark-Simulacrum

4 years agoRemove legacy grammar
Erin Power [Sun, 29 Sep 2019 14:04:14 +0000 (16:04 +0200)]
Remove legacy grammar

4 years agoFixed a misleading documentation issue #64844
hman523 [Mon, 30 Sep 2019 05:26:42 +0000 (00:26 -0500)]
Fixed a misleading documentation issue #64844

4 years agosyntax: extract `error_on_invalid_abi`.
Mazdak Farrokhzad [Mon, 30 Sep 2019 04:47:35 +0000 (06:47 +0200)]
syntax: extract `error_on_invalid_abi`.

4 years agosyntax: cleanup `parse_visibility`.
Mazdak Farrokhzad [Mon, 30 Sep 2019 04:42:56 +0000 (06:42 +0200)]
syntax: cleanup `parse_visibility`.

4 years agosyntax: misc cleanup
Mazdak Farrokhzad [Mon, 30 Sep 2019 04:21:30 +0000 (06:21 +0200)]
syntax: misc cleanup

4 years agosyntax: cleanup `parse_fn_decl`.
Mazdak Farrokhzad [Mon, 30 Sep 2019 03:46:16 +0000 (05:46 +0200)]
syntax: cleanup `parse_fn_decl`.

4 years agosyntax: reorder param parsing to make more sense.
Mazdak Farrokhzad [Mon, 30 Sep 2019 03:32:46 +0000 (05:32 +0200)]
syntax: reorder param  parsing to make more sense.

4 years agosyntax refactor `parse_self_param` (5)
Mazdak Farrokhzad [Mon, 30 Sep 2019 01:29:41 +0000 (03:29 +0200)]
syntax refactor `parse_self_param` (5)

4 years agosyntax refactor `parse_self_param` (4)
Mazdak Farrokhzad [Mon, 30 Sep 2019 00:36:08 +0000 (02:36 +0200)]
syntax refactor `parse_self_param` (4)

4 years agosyntax refactor `parse_self_param` (3)
Mazdak Farrokhzad [Mon, 30 Sep 2019 00:06:55 +0000 (02:06 +0200)]
syntax refactor `parse_self_param` (3)

4 years agosyntax refactor `parse_self_param` (2)
Mazdak Farrokhzad [Sun, 29 Sep 2019 23:57:50 +0000 (01:57 +0200)]
syntax refactor `parse_self_param` (2)

4 years agosyntax refactor `parse_self_param` (1)
Mazdak Farrokhzad [Sun, 29 Sep 2019 23:49:22 +0000 (01:49 +0200)]
syntax refactor `parse_self_param` (1)

4 years agosyntax refactor `parse_fn_params`
Mazdak Farrokhzad [Sun, 29 Sep 2019 23:21:42 +0000 (01:21 +0200)]
syntax refactor `parse_fn_params`

4 years agoAuto merge of #64881 - RalfJung:miri, r=RalfJung
bors [Mon, 30 Sep 2019 02:09:43 +0000 (02:09 +0000)]
Auto merge of #64881 - RalfJung:miri, r=RalfJung

bump Miri

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

4 years agosyntax: `is_named_argument` -> `is_named_param`.
Mazdak Farrokhzad [Sun, 29 Sep 2019 23:19:37 +0000 (01:19 +0200)]
syntax: `is_named_argument` -> `is_named_param`.