]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoAuto merge of #61498 - TankhouseAle:const-fn-type-name, r=oli-obk
bors [Wed, 5 Jun 2019 15:40:16 +0000 (15:40 +0000)]
Auto merge of #61498 - TankhouseAle:const-fn-type-name, r=oli-obk

Add "type_name" support in emulate_intrinsic()

I did some dumb Git things and deleted my original fork repo semi-accidentally (but probably for the best as I'd messed up the history.)

This is the same issue as #61399, which was obviously auto-closed, to be clear.

5 years agoAuto merge of #61484 - nnethercote:avoid-more-hygiene-lookups, r=petrochenkov
bors [Wed, 5 Jun 2019 12:46:15 +0000 (12:46 +0000)]
Auto merge of #61484 - nnethercote:avoid-more-hygiene-lookups, r=petrochenkov

Avoid more hygiene lookups

Mostly by combining multiple `HygieneData::with` calls into a single call on hot paths.

r? @petrochenkov

5 years agoAuto merge of #61502 - alexcrichton:update-backtrace, r=estebank
bors [Wed, 5 Jun 2019 08:20:20 +0000 (08:20 +0000)]
Auto merge of #61502 - alexcrichton:update-backtrace, r=estebank

std: Update dependency on `backtrace`

Discovered in #61416 an accidental regression in libstd's backtrace
behavior is that it previously attempted to consult libbacktrace and
would then fall back to `dladdr` if libbacktrace didn't report anything.
The `backtrace` crate, however, did not do this, so that's now been
fixed!

Changes: https://github.com/rust-lang/backtrace-rs/compare/0.3.25...0.3.29

Closes #61416

5 years agostd: Update dependency on `backtrace`
Alex Crichton [Mon, 3 Jun 2019 19:29:53 +0000 (12:29 -0700)]
std: Update dependency on `backtrace`

Discovered in #61416 an accidental regression in libstd's backtrace
behavior is that it previously attempted to consult libbacktrace and
would then fall back to `dladdr` if libbacktrace didn't report anything.
The `backtrace` crate, however, did not do this, so that's now been
fixed!

Changes: https://github.com/rust-lang/backtrace-rs/compare/0.3.25...0.3.27

Closes #61416

5 years agoAdd `modernize_and_adjust` methods.
Nicholas Nethercote [Mon, 3 Jun 2019 06:10:03 +0000 (16:10 +1000)]
Add `modernize_and_adjust` methods.

These combine two `HygieneData::with` calls into one.

5 years agoAuto merge of #61527 - pietroalbini:rollup-vhxyqlk, r=pietroalbini
bors [Tue, 4 Jun 2019 23:05:05 +0000 (23:05 +0000)]
Auto merge of #61527 - pietroalbini:rollup-vhxyqlk, r=pietroalbini

Rollup of 5 pull requests

Successful merges:

 - #61069 (Make MIR drop terminators borrow the dropped location)
 - #61453 (Remove unneeded feature attr from atomic integers doctests)
 - #61488 (Fix NLL typeck ICEs)
 - #61500 (Fix regression 61475)
 - #61523 (Hide gen_future API from documentation)

Failed merges:

r? @ghost

5 years agoAvoid unnecessary `rust_2018` calls.
Nicholas Nethercote [Mon, 3 Jun 2019 05:34:54 +0000 (15:34 +1000)]
Avoid unnecessary `rust_2018` calls.

The commit combines two calls into one by saving the result in a local
variable. The commit also moves the check for `async` later, so that
when a different keyword is present the `rust_2018` call will be avoided
completely.

5 years agoAdd a useful comment about this file.
Nicholas Nethercote [Mon, 3 Jun 2019 03:08:15 +0000 (13:08 +1000)]
Add a useful comment about this file.

5 years agoAdd `walk_chain`.
Nicholas Nethercote [Mon, 3 Jun 2019 02:07:51 +0000 (12:07 +1000)]
Add `walk_chain`.

This combines multiple `HygieneData::with` calls on a hot path.

5 years agoAdd `SyntaxContext::hygienic_eq`.
Nicholas Nethercote [Sun, 2 Jun 2019 23:43:20 +0000 (09:43 +1000)]
Add `SyntaxContext::hygienic_eq`.

This combines multiple `HygieneData::with` calls into one, by combining
parts of `hygienic_eq` and `adjust_ident`.

5 years agoAdd and use `SyntaxContext::outer_and_expn_info`.
Nicholas Nethercote [Sun, 2 Jun 2019 23:21:27 +0000 (09:21 +1000)]
Add and use `SyntaxContext::outer_and_expn_info`.

This combines two `HygieneData::with` calls into one on a hot path.

5 years agoOptimize `glob_adjust` and `reverse_glob_adjust`.
Nicholas Nethercote [Fri, 31 May 2019 22:35:01 +0000 (08:35 +1000)]
Optimize `glob_adjust` and `reverse_glob_adjust`.

They can each now do a single `HygieneData::with` call by replacing the
`SyntaxContext` and `Mark` methods with the equivalent methods from
`HygieneData`.

5 years agoAdd `HygieneData::apply_mark`.
Nicholas Nethercote [Sat, 1 Jun 2019 22:35:37 +0000 (08:35 +1000)]
Add `HygieneData::apply_mark`.

This combines two `HygieneData::with` calls into one.

5 years agoAdd `HygieneData::apply_mark_with_transparency`.
Nicholas Nethercote [Sat, 1 Jun 2019 22:23:54 +0000 (08:23 +1000)]
Add `HygieneData::apply_mark_with_transparency`.

Also remove `HygieneData::apply_mark_internal`, which is no longer
needed.

5 years agoAdd `HygieneData::apply_mark_internal`.
Nicholas Nethercote [Sat, 1 Jun 2019 22:16:46 +0000 (08:16 +1000)]
Add `HygieneData::apply_mark_internal`.

5 years agoAdd `HygieneData::marks`.
Nicholas Nethercote [Sat, 1 Jun 2019 22:27:36 +0000 (08:27 +1000)]
Add `HygieneData::marks`.

5 years agoAdd `HygieneData::adjust`.
Nicholas Nethercote [Fri, 31 May 2019 21:44:14 +0000 (07:44 +1000)]
Add `HygieneData::adjust`.

5 years agoAdd `HygieneData::remove_mark`.
Nicholas Nethercote [Fri, 31 May 2019 21:28:15 +0000 (07:28 +1000)]
Add `HygieneData::remove_mark`.

5 years agoAdd `HygieneData::default_transparency`.
Nicholas Nethercote [Fri, 31 May 2019 21:24:51 +0000 (07:24 +1000)]
Add `HygieneData::default_transparency`.

Also use `HygieneData::expn_info` in an appropriate place.

5 years agoAdd some useful methods to `HygieneData`.
Nicholas Nethercote [Fri, 31 May 2019 21:19:58 +0000 (07:19 +1000)]
Add some useful methods to `HygieneData`.

5 years agoMove `modern` calls inside `glob_adjust` and `reverse_glob_adjust`.
Nicholas Nethercote [Fri, 31 May 2019 06:50:44 +0000 (16:50 +1000)]
Move `modern` calls inside `glob_adjust` and `reverse_glob_adjust`.

5 years agoRollup merge of #61523 - Nemo157:hide-gen-future, r=cramertj
Pietro Albini [Tue, 4 Jun 2019 20:39:41 +0000 (22:39 +0200)]
Rollup merge of #61523 - Nemo157:hide-gen-future, r=cramertj

Hide gen_future API from documentation

This is internal rustc only API which should never be used outside code created by the current `async` transform, if it is used then the panic messages don't make sense as they're written from the perspective of that meaning there is a bug in the `async` transform (e.g. #61482).

5 years agoRollup merge of #61500 - estebank:expregression, r=petrochenkov
Pietro Albini [Tue, 4 Jun 2019 20:39:39 +0000 (22:39 +0200)]
Rollup merge of #61500 - estebank:expregression, r=petrochenkov

Fix regression 61475

Addresses #61475.

5 years agoRollup merge of #61488 - matthewjasper:fix-nll-typeck-ices, r=pnkfelix
Pietro Albini [Tue, 4 Jun 2019 20:39:38 +0000 (22:39 +0200)]
Rollup merge of #61488 - matthewjasper:fix-nll-typeck-ices, r=pnkfelix

Fix NLL typeck ICEs

* Don't ICE when a type containing a region is constrained by nothing
* Don't ICE trying to normalize a type in a `ParamEnv` containing global bounds.

To explain what was happening in the `issue-61311-normalize.rs` case:

* When borrow checking the `the_fn` in the last `impl` we would try to normalize `Self::Proj` (`<Unit as HasProjFn>::Proj`).
* We would find the `impl` that we're checking and and check its `where` clause.
* This would need us to check `<Box<dyn Obj + 'static> as HasProj>::Proj: Bound`
* We find two possible implementations, the blanket impl and the bound in our `ParamEnv`.
* The bound in our `ParamEnv` was canonicalized, so we don't see it as a global bound. As such we prefer it to the `impl`.
* This means that we cannot normalize `<Box<dyn Obj + 'static> as HasProj>::Proj` to `Unit`.
* The `<Box<dyn Obj + 'static> as HasProj>::Proj: Bound` bound, which looks like it should be in our `ParamEnv` has been normalized to `Unit: Bound`.
* We fail to prove `<Box<dyn Obj + 'static> as HasProj>::Proj: Bound`.
* We ICE, since we believe typeck have errored.

Closes #61311
Closes #61315
Closes #61320

r? @pnkfelix
cc @nikomatsakis

5 years agoRollup merge of #61453 - lzutao:nouse-featuregate-integer_atomics, r=sfackler
Pietro Albini [Tue, 4 Jun 2019 20:39:36 +0000 (22:39 +0200)]
Rollup merge of #61453 - lzutao:nouse-featuregate-integer_atomics, r=sfackler

Remove unneeded feature attr from atomic integers doctests

Closes #61448

r? @Centril

5 years agoRollup merge of #61069 - Zoxc:drop-borrow-fix, r=pnkfelix
Pietro Albini [Tue, 4 Jun 2019 20:39:35 +0000 (22:39 +0200)]
Rollup merge of #61069 - Zoxc:drop-borrow-fix, r=pnkfelix

Make MIR drop terminators borrow the dropped location

r? @eddyb
cc @tmandry

5 years agoAuto merge of #61407 - phansch:annotate_snippet_refactoring1, r=oli-obk
bors [Tue, 4 Jun 2019 20:10:54 +0000 (20:10 +0000)]
Auto merge of #61407 - phansch:annotate_snippet_refactoring1, r=oli-obk

Add new diagnostic writer using annotate-snippet library

This adds a new diagnostic writer `AnnotateRsEmitterWriter` that uses
the [`annotate-snippet`][as] library to print out the human readable
diagnostics.

The goal of #59346 is to eventually switch over to using the library instead of
maintaining our own diagnostics output.

This PR does **not** add all the required features to the new
diagnostics writer. It is only meant as a starting point so that other
people can start contributing as well.

There are some FIXMEs in `librustc_errors/annotate_rs_emitter.rs` that
point at yet to be implemented features of the new diagnostic emitter, however
those are most likely not exhaustive.

[as]: https://github.com/rust-lang/annotate-snippets-rs

5 years agoHide gen_future API from documentation
Wim Looman [Tue, 4 Jun 2019 17:22:30 +0000 (19:22 +0200)]
Hide gen_future API from documentation

5 years agoAuto merge of #61454 - lzutao:ice-rotate_left, r=RalfJung
bors [Tue, 4 Jun 2019 17:20:14 +0000 (17:20 +0000)]
Auto merge of #61454 - lzutao:ice-rotate_left, r=RalfJung

Fix integer overflow in rotate_left

Closes #61406
r? @RalfJung

5 years agoeprint -> eprintln to add trailing newline
Philipp Hansch [Mon, 3 Jun 2019 05:38:55 +0000 (07:38 +0200)]
eprint -> eprintln to add trailing newline

5 years agoSimplify source_string and block-format methods
Philipp Hansch [Mon, 3 Jun 2019 05:38:19 +0000 (07:38 +0200)]
Simplify source_string and block-format methods

5 years agoPrint to stderr and bless
Philipp Hansch [Sat, 1 Jun 2019 06:29:12 +0000 (08:29 +0200)]
Print to stderr and bless

5 years agoAdd new error-format value to use annotate-snippet output
Philipp Hansch [Fri, 31 May 2019 19:15:59 +0000 (21:15 +0200)]
Add new error-format value to use annotate-snippet output

5 years agoAdd new diagnostic writer using annotate-snippet library
Philipp Hansch [Fri, 31 May 2019 20:01:27 +0000 (22:01 +0200)]
Add new diagnostic writer using annotate-snippet library

This adds a new diagnostic writer `AnnotateRsEmitterWriter` that uses
the [`annotate-snippet`][as] library to print out the human readable
diagnostics.

The goal is to eventually switch over to using the library instead of
maintaining our own diagnostics output.

This commit does *not* add all the required features to the new
diagnostics writer. It is only meant as a starting point so that other
people can contribute as well.

[as]: https://github.com/rust-lang/annotate-snippets-rs

5 years agoFix integer overflow in rotate_left
Lzu Tao [Sun, 2 Jun 2019 16:51:51 +0000 (16:51 +0000)]
Fix integer overflow in rotate_left

5 years agoRemove unneeded feature attr from atomic integers doctests
Lzu Tao [Tue, 4 Jun 2019 13:24:39 +0000 (13:24 +0000)]
Remove unneeded feature attr from atomic integers doctests

5 years agoAuto merge of #61437 - christianpoveda:const-eval-indirects, r=wesleywiser,oli-obk
bors [Tue, 4 Jun 2019 12:37:44 +0000 (12:37 +0000)]
Auto merge of #61437 - christianpoveda:const-eval-indirects, r=wesleywiser,oli-obk

Add const-eval support for indirects

r? @wesleywiser

5 years agoWhitespace fixes
Wesley Wiser [Tue, 4 Jun 2019 10:30:36 +0000 (06:30 -0400)]
Whitespace fixes

5 years agoAuto merge of #61136 - matthewjasper:cannot-move-errors, r=pnkfelix
bors [Tue, 4 Jun 2019 08:31:53 +0000 (08:31 +0000)]
Auto merge of #61136 - matthewjasper:cannot-move-errors, r=pnkfelix

Make cannot move errors more consistent with other borrowck errors

* Note the type of the place being moved in all cases.
* Note the place being moved from.
* Simplify the search for overloaded place operators
* Extend the note for move from overloaded deref apply to all types.
* Add a note for moves from overloaded index.
* Special case moves for closure captures.

r? @pnkfelix

5 years agoAuto merge of #61510 - Centril:rollup-bvi95y2, r=Centril
bors [Tue, 4 Jun 2019 05:37:44 +0000 (05:37 +0000)]
Auto merge of #61510 - Centril:rollup-bvi95y2, r=Centril

Rollup of 13 pull requests

Successful merges:

 - #61135 (Fix documentation of `Rc::make_mut` regarding `rc::Weak`.)
 - #61404 (miri unsizing: fix projecting into a field of an operand)
 - #61409 (Fix an ICE with a const argument in a trait)
 - #61413 (Re-implement async fn drop order lowering )
 - #61419 (Add an unusual-conversion example to to_uppercase)
 - #61420 (Succinctify splice docs)
 - #61444 (Suggest using `as_ref` on `*const T`)
 - #61446 (On TerminatorKind::DropAndReplace still handle unused_mut correctly)
 - #61485 (azure: retry s3 upload if it fails)
 - #61489 (ci: Reenable step timings on AppVeyor)
 - #61496 (Do not panic in tidy on unbalanced parentheses in cfg's)
 - #61497 (Treat 0 as special value for codegen-units-std)
 - #61499 (Add regression test for existential type ICE #53457)

Failed merges:

r? @ghost

5 years agoAdd const-eval support for indirects
Christian Poveda [Sat, 1 Jun 2019 18:08:04 +0000 (13:08 -0500)]
Add const-eval support for indirects

5 years agoRollup merge of #61499 - varkor:issue-53457, r=oli-obk
Mazdak Farrokhzad [Tue, 4 Jun 2019 02:48:31 +0000 (04:48 +0200)]
Rollup merge of #61499 - varkor:issue-53457, r=oli-obk

Add regression test for existential type ICE #53457

Closes #53457.

5 years agoRollup merge of #61497 - Mark-Simulacrum:codegen-units-std-num-cpus, r=alexcrichton
Mazdak Farrokhzad [Tue, 4 Jun 2019 02:48:29 +0000 (04:48 +0200)]
Rollup merge of #61497 - Mark-Simulacrum:codegen-units-std-num-cpus, r=alexcrichton

Treat 0 as special value for codegen-units-std

Fixes #57669

5 years agoRollup merge of #61496 - Mark-Simulacrum:tidy-unbalanced-parens, r=varkor
Mazdak Farrokhzad [Tue, 4 Jun 2019 02:48:27 +0000 (04:48 +0200)]
Rollup merge of #61496 - Mark-Simulacrum:tidy-unbalanced-parens, r=varkor

Do not panic in tidy on unbalanced parentheses in cfg's

Fixes #60505

5 years agoRollup merge of #61489 - alexcrichton:appveyor-timings, r=pietroalbini
Mazdak Farrokhzad [Tue, 4 Jun 2019 02:48:25 +0000 (04:48 +0200)]
Rollup merge of #61489 - alexcrichton:appveyor-timings, r=pietroalbini

ci: Reenable step timings on AppVeyor

This was accidentally regressed in #60777 by accident, and we've stopped
printing out step timings on AppVeyor recently reducing the ability for
us to track build times over time!

5 years agoRollup merge of #61485 - pietroalbini:retry-azure-upload, r=alexcrichton
Mazdak Farrokhzad [Tue, 4 Jun 2019 02:48:23 +0000 (04:48 +0200)]
Rollup merge of #61485 - pietroalbini:retry-azure-upload, r=alexcrichton

azure: retry s3 upload if it fails

We had some cases (like [this](https://dev.azure.com/rust-lang/e71b0ddf-dd27-435a-873c-e30f86eea377/_apis/build/builds/370/logs/734) a few hours ago) when uploading to S3 fails with a network error. This retries the upload if it fails.

r? @alexcrichton

5 years agoRollup merge of #61446 - czipperz:nll-unused_mut, r=matthewjasper
Mazdak Farrokhzad [Tue, 4 Jun 2019 02:48:21 +0000 (04:48 +0200)]
Rollup merge of #61446 - czipperz:nll-unused_mut, r=matthewjasper

On TerminatorKind::DropAndReplace still handle unused_mut correctly

Closes #61424

- [x] Todo add regression test

5 years agoRollup merge of #61444 - estebank:const-pt-as-ref, r=matthewjasper
Mazdak Farrokhzad [Tue, 4 Jun 2019 02:48:19 +0000 (04:48 +0200)]
Rollup merge of #61444 - estebank:const-pt-as-ref, r=matthewjasper

Suggest using `as_ref` on `*const T`

Fix #21596.

5 years agoRollup merge of #61420 - felixrabe:patch-2, r=dtolnay
Mazdak Farrokhzad [Tue, 4 Jun 2019 02:48:16 +0000 (04:48 +0200)]
Rollup merge of #61420 - felixrabe:patch-2, r=dtolnay

Succinctify splice docs

5 years agoRollup merge of #61419 - scottmcm:casing-is-on-strings, r=cramertj
Mazdak Farrokhzad [Tue, 4 Jun 2019 02:48:13 +0000 (04:48 +0200)]
Rollup merge of #61419 - scottmcm:casing-is-on-strings, r=cramertj

Add an unusual-conversion example to to_uppercase

Like how to_lowercase has ὈΔΥΣΣΕΎΣ.

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 #61467 - Manishearth:clippyup, r=Manishearth
bors [Tue, 4 Jun 2019 02:42:13 +0000 (02:42 +0000)]
Auto merge of #61467 - Manishearth:clippyup, r=Manishearth

Update clippy

r? @ghost

5 years agoAdd regression test
Esteban Küber [Tue, 4 Jun 2019 01:39:17 +0000 (18:39 -0700)]
Add regression test

5 years agoUpdate clippy
Manish Goregaokar [Mon, 3 Jun 2019 23:00:38 +0000 (16:00 -0700)]
Update clippy

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 agoFix regression #61475
Esteban Küber [Mon, 3 Jun 2019 19:06:49 +0000 (12:06 -0700)]
Fix regression #61475

5 years agoTreat 0 as special value for codegen-units-std
Mark Rousskov [Mon, 3 Jun 2019 18:14:10 +0000 (12:14 -0600)]
Treat 0 as special value for codegen-units-std

Fixes #57669

5 years agoAdd ui/impl-trait/issues folder
varkor [Mon, 3 Jun 2019 18:57:13 +0000 (19:57 +0100)]
Add ui/impl-trait/issues folder

5 years agoRe-add needed Immediate dependency
TankhouseAle [Mon, 3 Jun 2019 18:55:36 +0000 (14:55 -0400)]
Re-add needed Immediate dependency

5 years agoAdd a regression test for #53457
varkor [Mon, 3 Jun 2019 18:54:28 +0000 (19:54 +0100)]
Add a regression test for #53457

5 years agoRe-add type_name.rs changes
TankhouseAle [Mon, 3 Jun 2019 18:40:08 +0000 (14:40 -0400)]
Re-add type_name.rs changes

5 years agoRe-add intrinsics.rs changes
TankhouseAle [Mon, 3 Jun 2019 18:38:39 +0000 (14:38 -0400)]
Re-add intrinsics.rs changes

5 years agoRe-add test file
TankhouseAle [Mon, 3 Jun 2019 18:36:22 +0000 (14:36 -0400)]
Re-add test file

5 years agoDo not panic in tidy on unbalanced parentheses in cfg's
Mark Rousskov [Mon, 3 Jun 2019 17:53:09 +0000 (11:53 -0600)]
Do not panic in tidy on unbalanced parentheses in cfg's

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 agoci: Reenable step timings on AppVeyor
Alex Crichton [Mon, 3 Jun 2019 14:46:08 +0000 (07:46 -0700)]
ci: Reenable step timings on AppVeyor

This was accidentally regressed in #60777 by accident, and we've stopped
printing out step timings on AppVeyor recently reducing the ability for
us to track build times over time!

5 years agoDon't canonicalize `'static` in normalize
Matthew Jasper [Mon, 3 Jun 2019 14:04:40 +0000 (15:04 +0100)]
Don't canonicalize `'static` in normalize

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 agoUpdate tests for changes to cannot move errors
Matthew Jasper [Sun, 5 May 2019 11:02:32 +0000 (12:02 +0100)]
Update tests for changes to cannot move errors

5 years agoUse `UseSpans` in cannot move errors
Matthew Jasper [Sun, 5 May 2019 11:02:17 +0000 (12:02 +0100)]
Use `UseSpans` in cannot move errors

5 years agoImprove cannot move errors
Matthew Jasper [Sun, 5 May 2019 10:16:56 +0000 (11:16 +0100)]
Improve cannot move errors

* Show the place and type being moved
* Give a special error for variables in match guard
* Simplify search for overloaded deref
* Search for overloaded index

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 agoDon't try to lower ReEmpty in NLL
Matthew Jasper [Mon, 3 Jun 2019 12:46:38 +0000 (13:46 +0100)]
Don't try to lower ReEmpty in NLL

5 years agoAdd method to note types don't implement `Copy`
Matthew Jasper [Sat, 4 May 2019 21:28:22 +0000 (22:28 +0100)]
Add method to note types don't implement `Copy`

5 years agoAdd `is_ref_for_guard` method
Matthew Jasper [Sat, 4 May 2019 21:26:59 +0000 (22:26 +0100)]
Add `is_ref_for_guard` method

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 agoci: retry s3 upload on azure if it fails
Pietro Albini [Mon, 3 Jun 2019 09:54:36 +0000 (11:54 +0200)]
ci: retry s3 upload on azure if it fails

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