about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-06-04Fix spellingTyler Mandry-1/+1
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-06-04Add test for DropAndReplace bugTyler Mandry-0/+44
2019-06-04Move cached_block out of DropKindTyler Mandry-50/+35
2019-06-04Generate StorageDead along unwind paths for generatorsTyler Mandry-66/+88
2019-06-04Revert "Make MaybeStorageLive drop-aware"Tyler Mandry-10/+3
This reverts commit dd2eabc49d415dd30cea0953df5d7659d4d9440f.
2019-06-04Auto merge of #61407 - phansch:annotate_snippet_refactoring1, r=oli-obkbors-16/+266
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
2019-06-04Auto merge of #61454 - lzutao:ice-rotate_left, r=RalfJungbors-2/+36
Fix integer overflow in rotate_left Closes #61406 r? @RalfJung
2019-06-04eprint -> eprintln to add trailing newlinePhilipp Hansch-2/+2
2019-06-04Simplify source_string and block-format methodsPhilipp Hansch-14/+13
2019-06-04Print to stderr and blessPhilipp Hansch-2/+11
2019-06-04Add new error-format value to use annotate-snippet outputPhilipp Hansch-14/+40
2019-06-04Add new diagnostic writer using annotate-snippet libraryPhilipp Hansch-2/+218
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
2019-06-04Fix integer overflow in rotate_leftLzu Tao-2/+36
2019-06-04Auto merge of #61437 - christianpoveda:const-eval-indirects, ↵bors-13/+58
r=wesleywiser,oli-obk Add const-eval support for indirects r? @wesleywiser
2019-06-04Whitespace fixesWesley Wiser-2/+2
2019-06-04Auto merge of #61136 - matthewjasper:cannot-move-errors, r=pnkfelixbors-1516/+1116
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
2019-06-04Auto merge of #61510 - Centril:rollup-bvi95y2, r=Centrilbors-842/+605
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
2019-06-03Add const-eval support for indirectsChristian Poveda-14/+59
2019-06-04Rollup merge of #61499 - varkor:issue-53457, r=oli-obkMazdak Farrokhzad-0/+15
Add regression test for existential type ICE #53457 Closes #53457.
2019-06-04Rollup merge of #61497 - Mark-Simulacrum:codegen-units-std-num-cpus, ↵Mazdak Farrokhzad-9/+10
r=alexcrichton Treat 0 as special value for codegen-units-std Fixes #57669
2019-06-04Rollup merge of #61496 - Mark-Simulacrum:tidy-unbalanced-parens, r=varkorMazdak Farrokhzad-3/+5
Do not panic in tidy on unbalanced parentheses in cfg's Fixes #60505
2019-06-04Rollup merge of #61489 - alexcrichton:appveyor-timings, r=pietroalbiniMazdak Farrokhzad-0/+2
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!
2019-06-04Rollup merge of #61446 - czipperz:nll-unused_mut, r=matthewjasperMazdak Farrokhzad-14/+41
On TerminatorKind::DropAndReplace still handle unused_mut correctly Closes #61424 - [x] Todo add regression test
2019-06-04Rollup merge of #61444 - estebank:const-pt-as-ref, r=matthewjasperMazdak Farrokhzad-0/+23
Suggest using `as_ref` on `*const T` Fix #21596.
2019-06-04Rollup merge of #61420 - felixrabe:patch-2, r=dtolnayMazdak Farrokhzad-6/+4
Succinctify splice docs
2019-06-04Rollup merge of #61419 - scottmcm:casing-is-on-strings, r=cramertjMazdak Farrokhzad-0/+7
Add an unusual-conversion example to to_uppercase Like how to_lowercase has ὈΔΥΣΣΕΎΣ.
2019-06-04Rollup merge of #61413 - davidtwco:async-argument-order-in-a-sane-way, r=eddybMazdak Farrokhzad-712/+361
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
2019-06-04Rollup merge of #61409 - varkor:condition-trait-param-ice, r=oli-obkMazdak Farrokhzad-76/+107
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).
2019-06-04Rollup merge of #61404 - RalfJung:miri-unsize, r=oli-obkMazdak Farrokhzad-15/+3
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
2019-06-04Rollup merge of #61135 - czipperz:rc-make_mut-weak-doc, r=Mark-SimulacrumMazdak Farrokhzad-7/+27
Fix documentation of `Rc::make_mut` regarding `rc::Weak`. Closes #60961
2019-06-04Auto merge of #61467 - Manishearth:clippyup, r=Manishearthbors-8/+10
Update clippy r? @ghost
2019-06-03Update clippyManish Goregaokar-8/+10
2019-06-03Auto merge of #59148 - lcnr:unchecked_maths, r=eddybbors-2/+198
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
2019-06-03add ui tests for unchecked mathlcnr/Bastian Kauschke-0/+70
2019-06-03Auto merge of #61100 - varkor:must_use-tuple-expr, r=cramertjbors-42/+136
Apply #[must_use] lint to components of tuples Fixes https://github.com/rust-lang/rust/issues/61061.
2019-06-03Treat 0 as special value for codegen-units-stdMark Rousskov-9/+10
Fixes #57669
2019-06-03Add ui/impl-trait/issues foldervarkor-0/+0
2019-06-03Add a regression test for #53457varkor-0/+15
2019-06-03Do not panic in tidy on unbalanced parentheses in cfg'sMark Rousskov-3/+5
2019-06-03Add nested must_use variantvarkor-1/+11
2019-06-03Specify tuple element in lint messagevarkor-13/+16
2019-06-03Add function call to testvarkor-4/+18
2019-06-03Fix issue with recursively encountering uninhabited typevarkor-11/+10
2019-06-03Use precise span for must_use tuple componentsvarkor-7/+38
2019-06-03Add test for #[must_use] in tuplesvarkor-2/+22
2019-06-03Warn for #[must_use] in tuplesvarkor-36/+53
2019-06-03ci: Reenable step timings on AppVeyorAlex Crichton-0/+2
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!
2019-06-03Auto merge of #59033 - GuillaumeGomez:duplicated-bounds, r=Dylan-DPCbors-11/+11
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
2019-06-03Update tests for changes to cannot move errorsMatthew Jasper-1261/+724
2019-06-03Use `UseSpans` in cannot move errorsMatthew Jasper-6/+22