]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoRollup merge of #61413 - davidtwco:async-argument-order-in-a-sane-way, r=eddyb
Mazdak Farrokhzad [Tue, 4 Jun 2019 02:48:11 +0000 (04:48 +0200)]
Rollup merge of #61413 - davidtwco:async-argument-order-in-a-sane-way, r=eddyb

Re-implement async fn drop order lowering

This PR re-implements the async fn drop order lowering changes so
that it all takes place in HIR lowering, building atop the work done by
@eddyb to refactor `Res::Upvar`.

Previously, this types involved in the lowering were constructed in
libsyntax as they had to be used during name resolution and HIR
lowering. This was awful because none of that logic should have existed
in libsyntax.

This commit also changes `ArgSource` to keep a `HirId` to the original
argument pattern rather than a cloned copy of the pattern.

Only b7aa4ed and 71fb8fa should be reviewed, any other commits
are from #61276 (though 447e336 might end up staying in this PR).

As a nice side effect, it also fixes #61187 (cc #61192).

r? @eddyb
cc @cramertj

5 years agoRollup merge of #61409 - varkor:condition-trait-param-ice, r=oli-obk
Mazdak Farrokhzad [Tue, 4 Jun 2019 02:48:08 +0000 (04:48 +0200)]
Rollup merge of #61409 - varkor:condition-trait-param-ice, r=oli-obk

Fix an ICE with a const argument in a trait

This goes some way towards fixing https://github.com/rust-lang/rust/issues/61383 (the reduced test case is fixed).

5 years agoRollup merge of #61404 - RalfJung:miri-unsize, r=oli-obk
Mazdak Farrokhzad [Tue, 4 Jun 2019 02:48:06 +0000 (04:48 +0200)]
Rollup merge of #61404 - RalfJung:miri-unsize, r=oli-obk

miri unsizing: fix projecting into a field of an operand

I don't know why this open-coded an operand field projection. Probably this code predates one or more of my refactorings.

Fixes https://github.com/rust-lang/miri/issues/754

r? @oli-obk

5 years agoRollup merge of #61135 - czipperz:rc-make_mut-weak-doc, r=Mark-Simulacrum
Mazdak Farrokhzad [Tue, 4 Jun 2019 02:48:03 +0000 (04:48 +0200)]
Rollup merge of #61135 - czipperz:rc-make_mut-weak-doc, r=Mark-Simulacrum

Fix documentation of `Rc::make_mut` regarding `rc::Weak`.

Closes #60961

5 years agoAuto merge of #59148 - lcnr:unchecked_maths, r=eddyb
bors [Mon, 3 Jun 2019 22:05:55 +0000 (22:05 +0000)]
Auto merge of #59148 - lcnr:unchecked_maths, r=eddyb

add support for unchecked math

add compiler support for
```rust
/// Returns the result of an unchecked addition, resulting in
/// undefined behavior when `x + y > T::max_value()` or `x + y < T::min_value()`.
pub fn unchecked_add<T>(x: T, y: T) -> T;

/// Returns the result of an unchecked substraction, resulting in
/// undefined behavior when `x - y > T::max_value()` or `x - y < T::min_value()`.
pub fn unchecked_sub<T>(x: T, y: T) -> T;

/// Returns the result of an unchecked multiplication, resulting in
/// undefined behavior when `x * y > T::max_value()` or `x * y < T::min_value()`.
pub fn unchecked_mul<T>(x: T, y: T) -> T;
```

cc https://github.com/rust-lang/rfcs/issues/2508

5 years agoadd ui tests for unchecked math
lcnr/Bastian Kauschke [Mon, 3 Jun 2019 19:30:25 +0000 (21:30 +0200)]
add ui tests for unchecked math

5 years agoAuto merge of #61100 - varkor:must_use-tuple-expr, r=cramertj
bors [Mon, 3 Jun 2019 19:12:17 +0000 (19:12 +0000)]
Auto merge of #61100 - varkor:must_use-tuple-expr, r=cramertj

Apply #[must_use] lint to components of tuples

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

5 years agoAdd nested must_use variant
varkor [Mon, 3 Jun 2019 17:50:32 +0000 (18:50 +0100)]
Add nested must_use variant

5 years agoSpecify tuple element in lint message
varkor [Tue, 28 May 2019 19:12:48 +0000 (20:12 +0100)]
Specify tuple element in lint message

5 years agoAdd function call to test
varkor [Mon, 27 May 2019 19:38:13 +0000 (20:38 +0100)]
Add function call to test

5 years agoFix issue with recursively encountering uninhabited type
varkor [Mon, 27 May 2019 19:11:15 +0000 (20:11 +0100)]
Fix issue with recursively encountering uninhabited type

5 years agoUse precise span for must_use tuple components
varkor [Mon, 27 May 2019 15:48:43 +0000 (16:48 +0100)]
Use precise span for must_use tuple components

5 years agoAdd test for #[must_use] in tuples
varkor [Thu, 23 May 2019 21:56:31 +0000 (22:56 +0100)]
Add test for #[must_use] in tuples

5 years agoWarn for #[must_use] in tuples
varkor [Thu, 23 May 2019 21:56:23 +0000 (22:56 +0100)]
Warn for #[must_use] in tuples

5 years agoAuto merge of #59033 - GuillaumeGomez:duplicated-bounds, r=Dylan-DPC
bors [Mon, 3 Jun 2019 14:02:15 +0000 (14:02 +0000)]
Auto merge of #59033 - GuillaumeGomez:duplicated-bounds, r=Dylan-DPC

Fix duplicated bounds printing in rustdoc

Fixes #56331.

Once again, I couldn't find out how to reproduce it with a small code so no test... :-/

r? @QuietMisdreavus

5 years agorustc: remove `ArgSource`
David Wood [Mon, 3 Jun 2019 10:36:19 +0000 (11:36 +0100)]
rustc: remove `ArgSource`

`ArgSource` is no longer used anywhere, so it can be removed.

5 years agorustc: construct statement vector directly
David Wood [Mon, 3 Jun 2019 09:14:27 +0000 (10:14 +0100)]
rustc: construct statement vector directly

This commit simplifies the previous logic to construct the statement
vector directly rather than constructing a `Vec` of
`(hir::Stmt, Option<hir::Stmt>)` first.

5 years agorustc: use lowering helpers
David Wood [Sun, 2 Jun 2019 18:59:49 +0000 (19:59 +0100)]
rustc: use lowering helpers

This commit changes the lowering to stop creating HIR statements,
expressions and patterns directly and instead uses the pre-existing
helper functions.

5 years agorustc: remove `HirId` from `ArgSource::AsyncFn`
David Wood [Sun, 2 Jun 2019 18:03:17 +0000 (19:03 +0100)]
rustc: remove `HirId` from `ArgSource::AsyncFn`

This commit removes the `HirId` from `ArgSource::AsyncFn`, relying on
the fact that only `simple_ident` is used in each of the locations that
previously took the original pattern from the `ArgSource::AsyncFn`.

5 years agoAuto merge of #57214 - Zoxc:no-local-interners, r=eddyb
bors [Mon, 3 Jun 2019 11:10:45 +0000 (11:10 +0000)]
Auto merge of #57214 - Zoxc:no-local-interners, r=eddyb

Store CtxtInterners for local values in AllArenas

r? @eddyb

5 years agoadd codegen test for unchecked math
lcnr/Bastian Kauschke [Mon, 3 Jun 2019 11:00:44 +0000 (13:00 +0200)]
add codegen test for unchecked math

5 years agoadd unchecked math intrinsics
lcnr/Bastian Kauschke [Mon, 3 Jun 2019 10:59:48 +0000 (12:59 +0200)]
add unchecked math intrinsics

5 years agoadd support for unchecked math
lcnr/Bastian Kauschke [Mon, 3 Jun 2019 10:59:17 +0000 (12:59 +0200)]
add support for unchecked math

5 years agorustc: async fn drop order lowering in HIR
David Wood [Wed, 29 May 2019 16:28:51 +0000 (19:28 +0300)]
rustc: async fn drop order lowering in HIR

This commit re-implements the async fn drop order lowering changes so
that it all takes place in HIR lowering, building atop the work done by
`@eddyb` to refactor `Res::Upvar`.

Previously, this types involved in the lowering were constructed in
libsyntax as they had to be used during name resolution and HIR
lowering. This was awful because none of that logic should have existed
in libsyntax.

This commit also changes `ArgSource` to keep a `HirId` to the original
argument pattern rather than a cloned copy of the pattern.

5 years agosyntax/rustc: move `mark_span_with_reason` back.
David Wood [Fri, 31 May 2019 14:50:06 +0000 (15:50 +0100)]
syntax/rustc: move `mark_span_with_reason` back.

5 years agosyntax: revert `ast::AsyncArgument` and associated changes.
Eduard-Mihai Burtescu [Wed, 29 May 2019 01:10:49 +0000 (04:10 +0300)]
syntax: revert `ast::AsyncArgument` and associated changes.

Here follows the main reverts applied in order to make this commit:

Revert "Rollup merge of #60676 - davidtwco:issue-60674, r=cramertj"

This reverts commit 45b09453dbf120cc23d889435aac3ed7d2ec8eb7, reversing
changes made to f6df1f6c30b469cb9e65c5453a0efa03cbb6005e.

Revert "Rollup merge of #60437 - davidtwco:issue-60236, r=nikomatsakis"

This reverts commit 16939a50ea440e72cb6ecefdaabb988addb1ec0e, reversing
changes made to 12bf98155249783583a91863c5dccf9e346f1226.

Revert "Rollup merge of #59823 - davidtwco:issue-54716, r=cramertj"

This reverts commit 62d1574876f5531bce1b267e62dff520d7adcbbb, reversing
changes made to 4eff8526a789e0dfa8b97f7dec91b7b5c18e8544.

5 years agoAllow `true` and `false` in const generic arguments
varkor [Fri, 31 May 2019 20:18:43 +0000 (21:18 +0100)]
Allow `true` and `false` in const generic arguments

5 years agoAllow TraitRef as AnonConst parent
varkor [Fri, 31 May 2019 19:49:30 +0000 (20:49 +0100)]
Allow TraitRef as AnonConst parent

5 years agoAuto merge of #61062 - mark-i-m:mono-mv, r=eddyb,oli-obk
bors [Mon, 3 Jun 2019 08:28:27 +0000 (08:28 +0000)]
Auto merge of #61062 - mark-i-m:mono-mv, r=eddyb,oli-obk

Remove _all_ codegen dependencies on `rustc_mir` :tada:

~This code is pretty self-contained. It has no references to the rest of `rustc_mir`. Moving it to its own crate means that almost all of the references from `rustc_codegen_*` to `rustc_mir` are instead moved to `rustc_monomorphize`, which should help improve compile times for the compiler a bit...~

With the help of eddyb and oli-obk, all of the dependencies of `librustc_codegen_*` on `librustc_mir` have been removed:
- dependencies on `rustc_mir::monomorphize` were moved to `rustc::mir::mono`
- `rustc_mir::const_eval::const_field` is made into a query.
- `rustc_mir::interpret::type_name` is made into a query.

This should help reduce compile time when working on `rustc_mir` :clock1:

cc #47849

r? @eddyb

5 years agoAuto merge of #61331 - estebank:fn-arg-parse-recovery, r=varkor
bors [Mon, 3 Jun 2019 05:40:53 +0000 (05:40 +0000)]
Auto merge of #61331 - estebank:fn-arg-parse-recovery, r=varkor

Recover gracefully from argument with missing type or param name

5 years agoquery-fy type_name
Mark Mansi [Mon, 3 Jun 2019 04:20:36 +0000 (23:20 -0500)]
query-fy type_name

5 years agoremove last dependency of codegen on rustc_mir
Mark Mansi [Fri, 24 May 2019 20:01:11 +0000 (15:01 -0500)]
remove last dependency of codegen on rustc_mir

5 years agoquery-ify const_field
Mark Mansi [Fri, 24 May 2019 19:58:37 +0000 (14:58 -0500)]
query-ify const_field

5 years agoremove unneeded deps
Mark Mansi [Fri, 24 May 2019 17:32:53 +0000 (12:32 -0500)]
remove unneeded deps

5 years agoremove as_mono_item
Mark Mansi [Fri, 24 May 2019 17:26:30 +0000 (12:26 -0500)]
remove as_mono_item

5 years agomove codegenunitext to rustc::mir::mono
Mark Mansi [Fri, 24 May 2019 16:19:53 +0000 (11:19 -0500)]
move codegenunitext to rustc::mir::mono

5 years agomove monoitemext to inherent methods
Mark Mansi [Fri, 24 May 2019 15:57:30 +0000 (10:57 -0500)]
move monoitemext to inherent methods

5 years agomove DefPathBasedNames to ty::print::obsolete
Mark Mansi [Thu, 23 May 2019 18:48:27 +0000 (13:48 -0500)]
move DefPathBasedNames to ty::print::obsolete

5 years agoremove reexports of mir::mono::{MonoItem,CodegenUnit}
Mark Mansi [Thu, 23 May 2019 18:10:11 +0000 (13:10 -0500)]
remove reexports of mir::mono::{MonoItem,CodegenUnit}

5 years agomove single-use function
Mark Mansi [Thu, 23 May 2019 18:00:08 +0000 (13:00 -0500)]
move single-use function

5 years agodeduplicate ty::Instance constructors
Mark Mansi [Thu, 23 May 2019 17:45:22 +0000 (12:45 -0500)]
deduplicate ty::Instance constructors

5 years agoremove reexport of rustc::ty::Instance
Mark Mansi [Thu, 23 May 2019 17:15:48 +0000 (12:15 -0500)]
remove reexport of rustc::ty::Instance

5 years agoAuto merge of #61361 - estebank:infer-type, r=varkor
bors [Mon, 3 Jun 2019 02:45:35 +0000 (02:45 +0000)]
Auto merge of #61361 - estebank:infer-type, r=varkor

Add more detail to type inference error

When encountering code where type inference fails, add more actionable
information:

```
fn main() {
    let foo = Vec::new();
}
```

```
error[E0282]: type annotations needed in `std::vec::Vec<T>`
  --> $DIR/vector-no-ann.rs:2:16
   |
LL |     let foo = Vec::new();
   |         ---   ^^^^^^^^ cannot infer type for `T` in `std::vec::Vec<T>`
   |         |
   |         consider giving `foo` a type
```

Fix #25633.

5 years agoAuto merge of #61008 - GuillaumeGomez:fix-rustdoc-code-highlighting, r=Manishearth
bors [Mon, 3 Jun 2019 00:02:34 +0000 (00:02 +0000)]
Auto merge of #61008 - GuillaumeGomez:fix-rustdoc-code-highlighting, r=Manishearth

Fix lines highlighting in rustdoc source view

Fixes #60948.

This PR fixes how we handle the lines highlighting from the URL (so in "/doc/src/alloc/string.rs.html#285-283", the "285-283" part). We got a hard limit on 50000, for some unknown and lost reasons which was used in case only one line is selected.

r? @Manishearth

5 years agoAuto merge of #61295 - RalfJung:miri, r=oli-obk
bors [Sun, 2 Jun 2019 21:15:35 +0000 (21:15 +0000)]
Auto merge of #61295 - RalfJung:miri, r=oli-obk

update miri

r? @oli-obk

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

5 years agoupdate miri
Ralf Jung [Sun, 2 Jun 2019 21:12:33 +0000 (23:12 +0200)]
update miri

5 years agoAuto merge of #61278 - RalfJung:miri-tag-allocations, r=oli-obk
bors [Sun, 2 Jun 2019 17:25:58 +0000 (17:25 +0000)]
Auto merge of #61278 - RalfJung:miri-tag-allocations, r=oli-obk

Miri: give machine the chance to tag all allocations

r? @oli-obk

The Miri side of this is at https://github.com/rust-lang/rust/pull/61278.

5 years agoAuto merge of #61460 - Centril:rollup-8txhjx4, r=Centril
bors [Sun, 2 Jun 2019 14:42:11 +0000 (14:42 +0000)]
Auto merge of #61460 - Centril:rollup-8txhjx4, r=Centril

Rollup of 6 pull requests

Successful merges:

 - #61380 (Fix some issues with `unwrap_usize` instead of `assert_usize`)
 - #61423 (codegen: change `$6d$` to `$u6d$`)
 - #61438 (Point at individual type args on arg count mismatch)
 - #61441 (Tweak wording when encountering `fn` call in pattern)
 - #61451 (Fix missing semicolon in doc)
 - #61458 (Fix typo in AsRef doc)

Failed merges:

r? @ghost

5 years agoRollup merge of #61458 - fabric-and-ink:doc-typo, r=jonas-schievink
Mazdak Farrokhzad [Sun, 2 Jun 2019 13:23:53 +0000 (15:23 +0200)]
Rollup merge of #61458 - fabric-and-ink:doc-typo, r=jonas-schievink

Fix typo in AsRef doc

5 years agoRollup merge of #61451 - 0x1793d1:master, r=Centril
Mazdak Farrokhzad [Sun, 2 Jun 2019 13:23:52 +0000 (15:23 +0200)]
Rollup merge of #61451 - 0x1793d1:master, r=Centril

Fix missing semicolon in doc

A semicolon is missing in the examples of compile_error.
Macros that expand to items must be delimited with braces or followed by a semicolon.

5 years agoRollup merge of #61441 - estebank:fn-call-in-match, r=varkor
Mazdak Farrokhzad [Sun, 2 Jun 2019 13:23:50 +0000 (15:23 +0200)]
Rollup merge of #61441 - estebank:fn-call-in-match, r=varkor

Tweak wording when encountering `fn` call in pattern

Fix #60642

5 years agoRollup merge of #61438 - estebank:generics-span, r=varkor
Mazdak Farrokhzad [Sun, 2 Jun 2019 13:23:49 +0000 (15:23 +0200)]
Rollup merge of #61438 - estebank:generics-span, r=varkor

Point at individual type args on arg count mismatch

- Point at individual type arguments on arg count mismatch
- Make generics always have a valid span, even when there are no args
- Explain that `impl Trait` introduces an implicit type argument

Fix #55991.

5 years agoRollup merge of #61423 - davidtwco:correct-symbol-mangling, r=eddyb
Mazdak Farrokhzad [Sun, 2 Jun 2019 13:23:47 +0000 (15:23 +0200)]
Rollup merge of #61423 - davidtwco:correct-symbol-mangling, r=eddyb

codegen: change `$6d$` to `$u6d$`

This changes a mistake introduced in #61195 where the mangling
workaround used was incorrect, resolving [this comment](https://github.com/rust-lang/rust/pull/61195#discussion_r289597707) from @eddyb.

r? @eddyb

5 years agoRollup merge of #61380 - varkor:expected-usize-got-param, r=eddyb
Mazdak Farrokhzad [Sun, 2 Jun 2019 13:23:46 +0000 (15:23 +0200)]
Rollup merge of #61380 - varkor:expected-usize-got-param, r=eddyb

Fix some issues with `unwrap_usize` instead of `assert_usize`

Fixes https://github.com/rust-lang/rust/issues/61337.
Fixes https://github.com/rust-lang/rust/issues/61341.
Fixes https://github.com/rust-lang/rust/issues/61422.

r? @eddyb

5 years agoFix typo in AsRef doc
Fabian Drinck [Sun, 2 Jun 2019 12:12:06 +0000 (14:12 +0200)]
Fix typo in AsRef doc

5 years agoAuto merge of #61276 - eddyb:kill-res-upvar, r=petrochenkov
bors [Sun, 2 Jun 2019 11:46:13 +0000 (11:46 +0000)]
Auto merge of #61276 - eddyb:kill-res-upvar, r=petrochenkov

rustc: remove Res::Upvar.

By keeping track of the current "`body_owner`" (the `DefId` of the current fn/closure/const/etc.) in several passes, `Res::Upvar` and `hir::Upvar` don't need to contain contextual information about the closure.

By leveraging [`indexmap`](https://docs.rs/indexmap), the list of upvars for a given closure can now also be queried, to check whether a local variable is a closure capture, and so `Res::Upvar` can be merged with `Res::Local`.

And finally, the `tcx.upvars(...)` query now collects upvars from HIR, without relying on `rustc_resolve`.

r? @petrochenkov cc @varkor @davidtwco

5 years agoupdate comments
Ralf Jung [Wed, 29 May 2019 13:16:18 +0000 (15:16 +0200)]
update comments

5 years agoFIXME
Ralf Jung [Wed, 29 May 2019 12:49:02 +0000 (14:49 +0200)]
FIXME

5 years agofix indentation
Ralf Jung [Wed, 29 May 2019 09:52:14 +0000 (11:52 +0200)]
fix indentation

5 years agoturn comments into doc-comments
Ralf Jung [Wed, 29 May 2019 09:51:43 +0000 (11:51 +0200)]
turn comments into doc-comments

5 years agofix comments
Ralf Jung [Tue, 28 May 2019 17:08:14 +0000 (19:08 +0200)]
fix comments

5 years agono longer assume that there is a default tag: give the machine the chance to tag...
Ralf Jung [Tue, 28 May 2019 08:44:46 +0000 (10:44 +0200)]
no longer assume that there is a default tag: give the machine the chance to tag all allocations

5 years agoFix missing semicolon in doc
0x1793d1 [Sun, 2 Jun 2019 08:23:33 +0000 (10:23 +0200)]
Fix missing semicolon in doc

A semicolon is missing in the examples of compile_error.
Macros that expand to items must be delimited with braces or followed by a semicolon.

5 years agocache tag for vtable; fn_alloc's don't have a stack nor tag
Ralf Jung [Sat, 25 May 2019 11:48:56 +0000 (13:48 +0200)]
cache tag for vtable; fn_alloc's don't have a stack nor tag

5 years agoAuto merge of #61384 - varkor:fmin-fmax-llvm-opt, r=alexcrichton
bors [Sun, 2 Jun 2019 04:10:25 +0000 (04:10 +0000)]
Auto merge of #61384 - varkor:fmin-fmax-llvm-opt, r=alexcrichton

Update LLVM to include fmin/fmax optimisations

This will enable us to test if the optimisation issues mentioned in https://github.com/rust-lang/rust/issues/18384 really are fixed. Unfortunately, using the intrinsics immediately is problematic due to the libcore/libstd split (see https://github.com/rust-lang/rust/issues/50145).

5 years agoreview comments: use param kind type to identify impl Trait
Esteban Küber [Sat, 1 Jun 2019 22:39:12 +0000 (15:39 -0700)]
review comments: use param kind type to identify impl Trait

5 years agoAuto merge of #61299 - eddyb:nicer-llvm-builder, r=rkruppe
bors [Sun, 2 Jun 2019 01:12:36 +0000 (01:12 +0000)]
Auto merge of #61299 - eddyb:nicer-llvm-builder, r=rkruppe

rustc_codegen_llvm: a couple builder niceties.

r? @nagisa cc @sunfishcode @rkruppe

5 years agoAdd regression test for #61422
varkor [Sat, 1 Jun 2019 10:57:22 +0000 (11:57 +0100)]
Add regression test for #61422

5 years agoAdd error for pattern-matching on arrays without a fixed size
varkor [Fri, 31 May 2019 21:27:26 +0000 (22:27 +0100)]
Add error for pattern-matching on arrays without a fixed size

5 years agoUse `assert_usize` instead of `unwrap_usize` in several places
varkor [Thu, 30 May 2019 23:26:30 +0000 (00:26 +0100)]
Use `assert_usize` instead of `unwrap_usize` in several places

5 years agoFix unwrapping usize issue with transparent MaybeUnit array wrapper
varkor [Thu, 30 May 2019 23:12:24 +0000 (00:12 +0100)]
Fix unwrapping usize issue with transparent MaybeUnit array wrapper

5 years agoTweak wording when encountering `fn` call in pattern
Esteban Küber [Sat, 1 Jun 2019 20:34:53 +0000 (13:34 -0700)]
Tweak wording when encountering `fn` call in pattern

5 years agoAccount for cases where we can find the type arg name, but the local name is `_`
Esteban Küber [Sat, 1 Jun 2019 22:33:31 +0000 (15:33 -0700)]
Account for cases where we can find the type arg name, but the local name is `_`

5 years agoreview comment: tweak wording
Esteban Küber [Sat, 1 Jun 2019 21:47:15 +0000 (14:47 -0700)]
review comment: tweak wording

5 years agoExtend docstring
Esteban Küber [Sat, 1 Jun 2019 21:13:57 +0000 (14:13 -0700)]
Extend docstring

5 years agoAuto merge of #61436 - Manishearth:clippyup, r=Manishearth
bors [Sat, 1 Jun 2019 18:58:54 +0000 (18:58 +0000)]
Auto merge of #61436 - Manishearth:clippyup, r=Manishearth

Update clippy

r? @ghost

5 years agoExplain that `impl Trait` introduces an implicit type argument
Esteban Küber [Sat, 1 Jun 2019 18:33:38 +0000 (11:33 -0700)]
Explain that `impl Trait` introduces an implicit type argument

5 years agorustc_codegen_llvm: replace `fn noname()` with `const UNNAMED`.
Eduard-Mihai Burtescu [Wed, 29 May 2019 01:46:55 +0000 (04:46 +0300)]
rustc_codegen_llvm: replace `fn noname()` with `const UNNAMED`.

5 years agorustc_codegen_llvm: pretty up a few builder methods with a macro.
Eduard-Mihai Burtescu [Wed, 29 May 2019 01:34:33 +0000 (04:34 +0300)]
rustc_codegen_llvm: pretty up a few builder methods with a macro.

5 years agoUpdate clippy
Manish Goregaokar [Sat, 1 Jun 2019 17:50:55 +0000 (10:50 -0700)]
Update clippy

5 years agorustc: collect upvars from HIR, instead of during name resolution.
Eduard-Mihai Burtescu [Tue, 28 May 2019 20:31:01 +0000 (23:31 +0300)]
rustc: collect upvars from HIR, instead of during name resolution.

5 years agoPoint at individual type arguments on arg count mismatch
Esteban Küber [Sat, 1 Jun 2019 17:35:31 +0000 (10:35 -0700)]
Point at individual type arguments on arg count mismatch

5 years agorustc_resolve: never push `ClosureRibKind` to `label_ribs`.
Eduard-Mihai Burtescu [Tue, 28 May 2019 20:50:30 +0000 (23:50 +0300)]
rustc_resolve: never push `ClosureRibKind` to `label_ribs`.

5 years agorustc: remove Res::Upvar.
Eduard-Mihai Burtescu [Tue, 28 May 2019 15:06:01 +0000 (18:06 +0300)]
rustc: remove Res::Upvar.

5 years agorustc: remove `has_parent` from `hir::Upvar`.
Eduard-Mihai Burtescu [Tue, 28 May 2019 14:12:24 +0000 (17:12 +0300)]
rustc: remove `has_parent` from `hir::Upvar`.

5 years agorustc: track the body owner in liveness.
Eduard-Mihai Burtescu [Mon, 27 May 2019 17:33:59 +0000 (20:33 +0300)]
rustc: track the body owner in liveness.

5 years agorustc: remove closure ID from Res::Upvar.
Eduard-Mihai Burtescu [Mon, 20 May 2019 18:51:55 +0000 (21:51 +0300)]
rustc: remove closure ID from Res::Upvar.

5 years agorustc: track the body owner DefId in MC and EUV.
Eduard-Mihai Burtescu [Wed, 22 May 2019 14:02:40 +0000 (17:02 +0300)]
rustc: track the body owner DefId in MC and EUV.

5 years agorustc: use indexmap instead of a plain vector for upvars.
Eduard-Mihai Burtescu [Tue, 14 May 2019 16:42:57 +0000 (19:42 +0300)]
rustc: use indexmap instead of a plain vector for upvars.

5 years agoAuto merge of #61350 - RalfJung:alloc, r=oli-obk
bors [Sat, 1 Jun 2019 16:06:11 +0000 (16:06 +0000)]
Auto merge of #61350 - RalfJung:alloc, r=oli-obk

light refactoring of global AllocMap

* rename AllocKind -> GlobalAlloc. This stores the allocation itself, not just its kind.
* rename the methods that allocate stuff to have consistent names.

Cc @oli-obk

5 years agorustc: remove the closure ID from hir::Upvar's parent field.
Eduard-Mihai Burtescu [Tue, 7 May 2019 01:40:36 +0000 (04:40 +0300)]
rustc: remove the closure ID from hir::Upvar's parent field.

5 years agorustc: remove the index field from Res::Upvar.
Eduard-Mihai Burtescu [Sat, 4 May 2019 02:05:38 +0000 (05:05 +0300)]
rustc: remove the index field from Res::Upvar.

5 years agorustc: replace Res in hir::Upvar with only Local/Upvar data.
Eduard-Mihai Burtescu [Sat, 4 May 2019 02:06:52 +0000 (05:06 +0300)]
rustc: replace Res in hir::Upvar with only Local/Upvar data.

5 years agoAuto merge of #61388 - Amanieu:hashbrown4, r=alexcrichton
bors [Sat, 1 Jun 2019 11:10:11 +0000 (11:10 +0000)]
Auto merge of #61388 - Amanieu:hashbrown4, r=alexcrichton

Bump hashbrown to 0.4.0

Fixes #61357

This also includes rust-lang/hashbrown#80.

5 years agocodegen: change `$6d$` to `$u6d$`
David Wood [Sat, 1 Jun 2019 10:37:11 +0000 (11:37 +0100)]
codegen: change `$6d$` to `$u6d$`

This changes a mistake introduced in #61195 where the mangling
workaround used was incorrect.

5 years agoBump hashbrown to 0.4.0
Amanieu d'Antras [Fri, 31 May 2019 07:40:14 +0000 (08:40 +0100)]
Bump hashbrown to 0.4.0

Fixes #61357

5 years agoAuto merge of #61418 - Centril:rollup-yvj33a1, r=Centril
bors [Sat, 1 Jun 2019 06:34:15 +0000 (06:34 +0000)]
Auto merge of #61418 - Centril:rollup-yvj33a1, r=Centril

Rollup of 8 pull requests

Successful merges:

 - #60729 (Expand dynamic drop tests for cases in #47949)
 - #61263 (Don't generate div inside header (h4/h3/h...) elements)
 - #61364 (Stabilize reverse_bits feature)
 - #61375 (Make "panic did not include expected string" message consistent)
 - #61387 (Remove ty::BrFresh and RegionConstraintCollector::new_bound)
 - #61389 (Remove GlobalArenas and use Arena instead)
 - #61391 (Doc comment fixes for `rustc::mir::interpret::InterpretCx`)
 - #61403 (Remove unnecessary `-Z continue-parse-after-error` from tests)

Failed merges:

r? @ghost

5 years agoMake generics always have a valid span
Esteban Küber [Sat, 1 Jun 2019 05:19:30 +0000 (22:19 -0700)]
Make generics always have a valid span

5 years agoRollup merge of #61403 - estebank:test-cleanup, r=petrochenkov
Mazdak Farrokhzad [Sat, 1 Jun 2019 04:50:10 +0000 (06:50 +0200)]
Rollup merge of #61403 - estebank:test-cleanup, r=petrochenkov

Remove unnecessary `-Z continue-parse-after-error` from tests

r? @petrochenkov

5 years agoRollup merge of #61391 - wesleywiser:doc_comments_interpretcx, r=Centril
Mazdak Farrokhzad [Sat, 1 Jun 2019 04:50:09 +0000 (06:50 +0200)]
Rollup merge of #61391 - wesleywiser:doc_comments_interpretcx, r=Centril

Doc comment fixes for `rustc::mir::interpret::InterpretCx`

Fixes some stuff I noticed while working in const-prop.