]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoReduce the amount of unsafe code and mark handle_deadlock as unsafe
John Kåre Alsaker [Tue, 5 Jun 2018 21:12:19 +0000 (23:12 +0200)]
Reduce the amount of unsafe code and mark handle_deadlock as unsafe

6 years agoAdd comments
John Kåre Alsaker [Thu, 31 May 2018 21:04:21 +0000 (23:04 +0200)]
Add comments

6 years agoMake QueryWaiter use safe code
John Kåre Alsaker [Thu, 31 May 2018 18:24:56 +0000 (20:24 +0200)]
Make QueryWaiter use safe code

6 years agoCreate thread-pool
John Kåre Alsaker [Sun, 27 May 2018 11:10:12 +0000 (13:10 +0200)]
Create thread-pool

6 years agoAdd comments and misc changes
John Kåre Alsaker [Sun, 27 May 2018 11:05:41 +0000 (13:05 +0200)]
Add comments and misc changes

6 years agoUse raw pointers
John Kåre Alsaker [Sun, 27 May 2018 07:01:57 +0000 (09:01 +0200)]
Use raw pointers

6 years agoAdd and use OnDrop::disable
John Kåre Alsaker [Sun, 27 May 2018 05:47:44 +0000 (07:47 +0200)]
Add and use OnDrop::disable

6 years agoUse try_lock in collect_active_jobs
John Kåre Alsaker [Sun, 27 May 2018 05:46:19 +0000 (07:46 +0200)]
Use try_lock in collect_active_jobs

6 years agoUpdate Rayon version
John Kåre Alsaker [Mon, 14 May 2018 01:00:52 +0000 (03:00 +0200)]
Update Rayon version

6 years agoMake queries block and handle query cycles
John Kåre Alsaker [Fri, 6 Apr 2018 10:56:59 +0000 (12:56 +0200)]
Make queries block and handle query cycles

6 years agoAuto merge of #50844 - bjorn3:adhoc_compiller_calls, r=nrc
bors [Wed, 6 Jun 2018 08:14:11 +0000 (08:14 +0000)]
Auto merge of #50844 - bjorn3:adhoc_compiller_calls, r=nrc

Add AdHocCalls and pass self to build_controller as Box<Self>

This makes it easier to write custom drivers.

6 years agoAdd comment
bjorn3 [Mon, 4 Jun 2018 10:14:50 +0000 (12:14 +0200)]
Add comment

6 years agoImpl CompilerCalls for CompileController instead of AdHocCompilerCalls
bjorn3 [Sun, 27 May 2018 18:02:51 +0000 (20:02 +0200)]
Impl CompilerCalls for CompileController instead of AdHocCompilerCalls

6 years agoAdd AdHocCalls and pass self to build_controller as Box<Self>
bjorn3 [Thu, 17 May 2018 18:32:09 +0000 (20:32 +0200)]
Add AdHocCalls and pass self to build_controller as Box<Self>

6 years agoAuto merge of #51369 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Tue, 5 Jun 2018 15:26:26 +0000 (15:26 +0000)]
Auto merge of #51369 - Mark-Simulacrum:rollup, r=Mark-Simulacrum

Rollup of 7 pull requests

Successful merges:

 - #50852 (Add doc comment to hiding portions of code example)
 - #51183 (Update rustdoc book to suggest using Termination trait instead of hidden ‘foo’ function)
 - #51255 (Fix confusing error message for sub_instant)
 - #51256 (Fix crate-name option in rustdoc)
 - #51308 (Check array indices in constant propagation)
 - #51343 (test: Ignore some problematic tests on sparc and sparc64)
 - #51358 (Tests that #39963 is fixed on MIR borrowck)

Failed merges:

6 years agoRollup merge of #51358 - barzamin:tests-39963, r=oli-obk
Mark Simulacrum [Tue, 5 Jun 2018 14:33:51 +0000 (08:33 -0600)]
Rollup merge of #51358 - barzamin:tests-39963, r=oli-obk

Tests that #39963 is fixed on MIR borrowck

As title.

fixes #39963

6 years agoRollup merge of #51343 - glaubitz:sparc64-tests, r=shepmaster
Mark Simulacrum [Tue, 5 Jun 2018 14:33:49 +0000 (08:33 -0600)]
Rollup merge of #51343 - glaubitz:sparc64-tests, r=shepmaster

test: Ignore some problematic tests on sparc and sparc64

This updates the list of tests which can be safely ignored on sparc and sparc64.

6 years agoRollup merge of #51308 - fanzier:const-prop-array-bounds-check, r=oli-obk
Mark Simulacrum [Tue, 5 Jun 2018 14:33:48 +0000 (08:33 -0600)]
Rollup merge of #51308 - fanzier:const-prop-array-bounds-check, r=oli-obk

Check array indices in constant propagation

Previously, uses of constant weren't correctly propagated.
This fixes #48920.

r? @oli-obk because you suggested it

6 years agoRollup merge of #51256 - GuillaumeGomez:fix-rustdoc-crate-name, r=QuietMisdreavus
Mark Simulacrum [Tue, 5 Jun 2018 14:33:47 +0000 (08:33 -0600)]
Rollup merge of #51256 - GuillaumeGomez:fix-rustdoc-crate-name, r=QuietMisdreavus

Fix crate-name option in rustdoc

Fixes #51229.

r? @QuietMisdreavus

6 years agoRollup merge of #51255 - avdv:patch-1, r=kennytm
Mark Simulacrum [Tue, 5 Jun 2018 14:33:46 +0000 (08:33 -0600)]
Rollup merge of #51255 - avdv:patch-1, r=kennytm

Fix confusing error message for sub_instant

When subtracting an Instant from another, the function will panick when `RHS > self`, but the error message confusingly displays a different error:

```rust
let i = Instant::now();
let other = Instant::now();
if other > i {
    println!("{:?}", i - other);
}
```
This results in a panic:
```
thread 'test_instant' panicked at 'other was less than the current instant', libstd/sys/unix/time.rs:292:17
```
But clearly, `other` was actually greater than the current instant.

6 years agoRollup merge of #51183 - teiesti:rustdoc-book-termination, r=steveklabnik
Mark Simulacrum [Tue, 5 Jun 2018 14:33:45 +0000 (08:33 -0600)]
Rollup merge of #51183 - teiesti:rustdoc-book-termination, r=steveklabnik

Update rustdoc book to suggest using Termination trait instead of hidden ‘foo’ function

Closes #50721.

I suggest that someone double-checks my English since I am not a native speaker.

r? @steveklabnik

6 years agoRollup merge of #50852 - mandeep:fix-rustdoc-example-testing, r=GuillaumeGomez
Mark Simulacrum [Tue, 5 Jun 2018 14:33:43 +0000 (08:33 -0600)]
Rollup merge of #50852 - mandeep:fix-rustdoc-example-testing, r=GuillaumeGomez

Add doc comment to hiding portions of code example

fixes #50816

Not sure if this is all that's needed, but I think it's a good start. One thing to note is that the code block is a text block where it could possibly be a rust block.

6 years agoAuto merge of #51246 - vakaras:select_polonius_algo_via_env_var, r=nikomatsakis
bors [Tue, 5 Jun 2018 12:49:40 +0000 (12:49 +0000)]
Auto merge of #51246 - vakaras:select_polonius_algo_via_env_var, r=nikomatsakis

Select Polonius algorithm via `POLONIUS_ALGORITHM` environment variable

This pull request allows selecting the Polonius algorithm being used by providing an environment variable `POLONIUS_ALGORITHM`.

Example usage:
```
POLONIUS_ALGORITHM=compare RUST_LOG=rustc_mir::borrow_check::nll=trace  ./x.py test --stage 1 --compare-mode polonius -- src/test/ui/nll/issue-47680.rs
...
stderr:
------------------------------------------
 INFO 2018-05-31T17:35:31Z: rustc_mir::borrow_check::nll: Using Polonius algorithm: Compare
 INFO 2018-05-31T17:35:31Z: rustc_mir::borrow_check::nll: Using Polonius algorithm: Compare

------------------------------------------
...
```

r? @nikomatsakis

6 years agoImprove wording
Tobias Stolzmann [Thu, 31 May 2018 18:01:03 +0000 (20:01 +0200)]
Improve wording

6 years agoUpdate rustdoc book to suggest using Termination trait instead of hidden ‘foo’ function
Tobias Stolzmann [Tue, 29 May 2018 19:43:10 +0000 (21:43 +0200)]
Update rustdoc book to suggest using Termination trait instead of hidden ‘foo’ function

6 years agoAuto merge of #51140 - GuillaumeGomez:doc-keyword, r=QuietMisdreavus
bors [Tue, 5 Jun 2018 10:00:08 +0000 (10:00 +0000)]
Auto merge of #51140 - GuillaumeGomez:doc-keyword, r=QuietMisdreavus

rustdoc: introduce the #[doc(keyword="")] attribute for documenting keywords

Part of #34601.

r? @QuietMisdreavus

6 years agoFix tests
Fabian Zaiser [Sun, 3 Jun 2018 21:39:02 +0000 (23:39 +0200)]
Fix tests

6 years agoFix tidy
Fabian Zaiser [Sun, 3 Jun 2018 19:05:22 +0000 (21:05 +0200)]
Fix tidy

6 years agoPropagate uses of constants correctly so that array index checks work
Fabian Zaiser [Sun, 3 Jun 2018 18:57:45 +0000 (20:57 +0200)]
Propagate uses of constants correctly so that array index checks work

6 years agoAuto merge of #51324 - oli-obk:debug_overflow, r=estebank
bors [Tue, 5 Jun 2018 07:14:52 +0000 (07:14 +0000)]
Auto merge of #51324 - oli-obk:debug_overflow, r=estebank

Also prevent overflow in debug builds

r? @estebank

6 years agoAuto merge of #51242 - ytausky:mut-ref, r=estebank
bors [Tue, 5 Jun 2018 01:47:13 +0000 (01:47 +0000)]
Auto merge of #51242 - ytausky:mut-ref, r=estebank

Suggest not mutably borrowing a mutable reference

This PR would (hopefully) solve #45392. I deviated a bit from @estebank's instructions since the error span only included the borrowed expression (e.g. the `b` in `&mut b`). I also didn't check the mutability of the local binding, since this whole case is concerned with an immutable local.

I can see two outstanding questions:
1. `note_immutability_blame` is called in two places, but I only have one test case. I think it covers the call in `report_bckerror`, but I'm not sure how to trigger the call from `report_aliasability_violation`.
2. There is one failing test, where the local binding is `self: &mut Self`. I'm not entirely sure what the correct output should be, but I think the new message should also apply. Unfortunately, since this parameter is parsed differently, its `let_span` covers both the pattern and the type, leading to a wrong suggestion text. I'm not sure how to correctly identify this case.

6 years agotests that #39963 is fixed on MIR borrowck
Erin Moon [Mon, 4 Jun 2018 23:14:33 +0000 (18:14 -0500)]
tests that #39963 is fixed on MIR borrowck

6 years agoAuto merge of #51307 - oli-obk:miri_fixes, r=eddyb
bors [Mon, 4 Jun 2018 23:10:15 +0000 (23:10 +0000)]
Auto merge of #51307 - oli-obk:miri_fixes, r=eddyb

ScalarPairs are offset==0 field + other non-zst field

r? @eddyb

fixes #51300

6 years agotest: Ignore some problematic tests on sparc and sparc64
John Paul Adrian Glaubitz [Mon, 4 Jun 2018 11:27:32 +0000 (13:27 +0200)]
test: Ignore some problematic tests on sparc and sparc64

6 years agoFix crate-name option in rustdoc
Guillaume Gomez [Thu, 31 May 2018 20:08:31 +0000 (22:08 +0200)]
Fix crate-name option in rustdoc

6 years agoUpdate rustdoc-js
Guillaume Gomez [Mon, 4 Jun 2018 19:22:51 +0000 (21:22 +0200)]
Update rustdoc-js

6 years agoAuto merge of #51340 - Amanieu:hashmap_layout2, r=SimonSapin
bors [Mon, 4 Jun 2018 18:36:50 +0000 (18:36 +0000)]
Auto merge of #51340 - Amanieu:hashmap_layout2, r=SimonSapin

Optimize layout calculations in HashMap

This now produces the same assembly code as the previous implementation.

cc #51163 @nnethercote @gnzlbg @andjo403

6 years agoOptimize layout calculations in HashMap
Amanieu d'Antras [Mon, 4 Jun 2018 08:22:07 +0000 (09:22 +0100)]
Optimize layout calculations in HashMap

This now produces the same assembly code as the previous implementation.

6 years agoSimplify value field access
Oliver Schneider [Mon, 4 Jun 2018 12:50:29 +0000 (14:50 +0200)]
Simplify value field access

6 years agoAuto merge of #51328 - oli-obk:no_union_promotion, r=eddyb
bors [Mon, 4 Jun 2018 11:29:38 +0000 (11:29 +0000)]
Auto merge of #51328 - oli-obk:no_union_promotion, r=eddyb

Do not promote union field accesses

r? @eddyb

technically a breaking change, but the code errored on the previous stable and produces UB + a warning on the current stable. I don't think we need a crater run in that case.

6 years agoAdd missing ui tests
Guillaume Gomez [Sun, 3 Jun 2018 10:15:55 +0000 (12:15 +0200)]
Add missing ui tests

6 years agoAdd even more tests
Guillaume Gomez [Sat, 2 Jun 2018 22:48:17 +0000 (00:48 +0200)]
Add even more tests

6 years agoPut doc keyword behind feature flag
Guillaume Gomez [Sat, 2 Jun 2018 22:45:49 +0000 (00:45 +0200)]
Put doc keyword behind feature flag

6 years agoRemove useless function call for keyword generation in rustdoc
Guillaume Gomez [Sat, 2 Jun 2018 21:36:35 +0000 (23:36 +0200)]
Remove useless function call for keyword generation in rustdoc

6 years agoFew improvements
Guillaume Gomez [Tue, 29 May 2018 13:38:31 +0000 (15:38 +0200)]
Few improvements

6 years agoAdd doc keyword support
Guillaume Gomez [Mon, 28 May 2018 19:30:01 +0000 (21:30 +0200)]
Add doc keyword support

6 years agoslightly improve rustdoc xml path error
Guillaume Gomez [Mon, 28 May 2018 19:29:02 +0000 (21:29 +0200)]
slightly improve rustdoc xml path error

6 years agoAuto merge of #51151 - sdroege:exact-chunks-docs-order, r=dtolnay
bors [Mon, 4 Jun 2018 07:16:36 +0000 (07:16 +0000)]
Auto merge of #51151 - sdroege:exact-chunks-docs-order, r=dtolnay

Move slice::exact_chunks directly above exact_chunks_mut for more con…

…sistent docs order

See https://github.com/rust-lang/rust/issues/47115#issuecomment-392532855

6 years agoClarify error phrase in `sub_instant` function
Claudio Bley [Mon, 4 Jun 2018 06:58:55 +0000 (08:58 +0200)]
Clarify error phrase in `sub_instant` function

Uses the same wording as [`src/libstd/sys/windows/time.rs`][1].

1: https://github.com/avdv/rust/blob/95e2bf253d864c5e14ad000ffa2040ce85916056/src/libstd/sys/windows/time.rs#L65

6 years agoMove slice::exact_chunks directly above exact_chunks_mut for more consistent docs...
Sebastian Dröge [Tue, 29 May 2018 07:41:33 +0000 (10:41 +0300)]
Move slice::exact_chunks directly above exact_chunks_mut for more consistent docs order

See https://github.com/rust-lang/rust/issues/47115#issuecomment-392532855

6 years agoAuto merge of #51334 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Mon, 4 Jun 2018 02:05:00 +0000 (02:05 +0000)]
Auto merge of #51334 - Mark-Simulacrum:rollup, r=Mark-Simulacrum

Rollup of 6 pull requests

Successful merges:

 - #51288 (Remove rustdoc-specific is_import field from HIR)
 - #51299 (const fn integer operations)
 - #51317 (Allow enabling incremental via config.toml)
 - #51323 (Generate br for all two target SwitchInts)
 - #51326 (Various minor slice iterator cleanups)
 - #51329 (Remove the unused `-Z trans-time-graph` flag.)

Failed merges:

6 years agoRollup merge of #51329 - kennytm:trans-left-over, r=oli-obk
Mark Simulacrum [Mon, 4 Jun 2018 00:18:08 +0000 (18:18 -0600)]
Rollup merge of #51329 - kennytm:trans-left-over, r=oli-obk

Remove the unused `-Z trans-time-graph` flag.

Rebase of #50783 has accidentally revived the flag (which should be renamed to `-Z codegen-time-graph` by #50615).

6 years agoRollup merge of #51326 - sdroege:slice-iter-cleanup, r=dtolnay
Mark Simulacrum [Mon, 4 Jun 2018 00:18:06 +0000 (18:18 -0600)]
Rollup merge of #51326 - sdroege:slice-iter-cleanup, r=dtolnay

Various minor slice iterator cleanups

See individual commits

6 years agoRollup merge of #51323 - nikic:switch-int-lowering, r=nagisa
Mark Simulacrum [Mon, 4 Jun 2018 00:18:05 +0000 (18:18 -0600)]
Rollup merge of #51323 - nikic:switch-int-lowering, r=nagisa

Generate br for all two target SwitchInts

Instead of only for booleans. This means that `if let` also becomes a br.

Apart from making the IR slightly simpler, this is supported by FastISel (#4353).

6 years agoRollup merge of #51317 - oli-obk:incremental_all_the_way, r=Mark-Simulacrum
Mark Simulacrum [Mon, 4 Jun 2018 00:18:04 +0000 (18:18 -0600)]
Rollup merge of #51317 - oli-obk:incremental_all_the_way, r=Mark-Simulacrum

Allow enabling incremental via config.toml

r? @QuietMisdreavus

6 years agoRollup merge of #51299 - faern:const-int-ops, r=oli-obk
Mark Simulacrum [Mon, 4 Jun 2018 00:18:03 +0000 (18:18 -0600)]
Rollup merge of #51299 - faern:const-int-ops, r=oli-obk

const fn integer operations

A follow up to #51171
Fixes #51267

Makes a lot of the integer methods (`swap_bytes`, `count_ones` etc) `const fn`s. See #51267 for a discussion about why this is wanted and the solution used.

6 years agoRollup merge of #51288 - Mark-Simulacrum:delete-is-import, r=eddyb
Mark Simulacrum [Mon, 4 Jun 2018 00:18:02 +0000 (18:18 -0600)]
Rollup merge of #51288 - Mark-Simulacrum:delete-is-import, r=eddyb

Remove rustdoc-specific is_import field from HIR

Fixes #47100.

I believe that there is no need to check for the name being the same, as this
part of rustdoc seems to be strictly interested in exploring "public modules."
Re-exports from the same module cannot visit another module; and, re-exports
cannot export items with a greater visibility than that item declares.
Therefore, I think this code is either sufficient, or in fact does more than
is necessary, depending on whether rustdoc cares about the re-export itself.

r? @eddyb

6 years agoAuto merge of #51111 - kennytm:intralink-resolution-failure-line-numbers, r=Guillaume...
bors [Sun, 3 Jun 2018 23:04:11 +0000 (23:04 +0000)]
Auto merge of #51111 - kennytm:intralink-resolution-failure-line-numbers, r=GuillaumeGomez

Point to the rustdoc attribute where intralink resolution failed.

6 years agoAuto merge of #50338 - japaric:panic-impl, r=alexcrichton
bors [Sun, 3 Jun 2018 20:13:09 +0000 (20:13 +0000)]
Auto merge of #50338 - japaric:panic-impl, r=alexcrichton

implement #[panic_implementation]

This implements the `#[panic_implementation]` attribute as instructed in https://github.com/rust-lang/rust/issues/44489#issuecomment-381324623

I haven't run the full test suite yet but at least all the compile-fail tests pass.

r? @nagisa

6 years agoturn run-make test into a run-make-fulldeps test
Jorge Aparicio [Sun, 3 Jun 2018 17:57:49 +0000 (19:57 +0200)]
turn run-make test into a run-make-fulldeps test

6 years agoDeduplicate and fix a test
Oliver Schneider [Sun, 3 Jun 2018 17:37:50 +0000 (19:37 +0200)]
Deduplicate and fix a test

6 years agoRemove is_import field
Mark Simulacrum [Sat, 2 Jun 2018 01:00:34 +0000 (19:00 -0600)]
Remove is_import field

6 years agoAuto merge of #50904 - collin5:b50509, r=Mark-Simulacrum
bors [Sun, 3 Jun 2018 17:16:13 +0000 (17:16 +0000)]
Auto merge of #50904 - collin5:b50509, r=Mark-Simulacrum

Clean up dependency tracking in Rustbuild [1/2]

Initial refactor of the `Mode` enum. Still a WIP
Ref  #50509

r? @Mark-Simulacrum

6 years agoRemove the unused `-Z trans-time-graph` flag.
kennytm [Sun, 3 Jun 2018 17:10:19 +0000 (01:10 +0800)]
Remove the unused `-Z trans-time-graph` flag.

Rebase of #50783 has accidentally revived the flag (which should be
renamed to `-Z codegen-time-graph` by #50615).

6 years agoDo not promote union field accesses
Oliver Schneider [Sun, 3 Jun 2018 17:00:22 +0000 (19:00 +0200)]
Do not promote union field accesses

6 years agoimpl is_tool on Mode enum
Collins Abitekaniza [Sun, 27 May 2018 23:56:33 +0000 (02:56 +0300)]
impl is_tool on Mode enum

make is_tool inherent prop of mode

fix errors from rebase

resolve issues from review

6 years agoImplement TrustedLen for Windows and the 4 Chunks iterators
Sebastian Dröge [Sun, 3 Jun 2018 14:38:49 +0000 (17:38 +0300)]
Implement TrustedLen for Windows and the 4 Chunks iterators

6 years agoRemove mention of Slice/SliceMut traits from IterMut documentation
Sebastian Dröge [Sun, 3 Jun 2018 14:34:23 +0000 (17:34 +0300)]
Remove mention of Slice/SliceMut traits from IterMut documentation

These don't exist anymore.

6 years agoMove TrustedLen and FusedIterator impl of Iter/IterMut into macro
Sebastian Dröge [Sun, 3 Jun 2018 14:33:49 +0000 (17:33 +0300)]
Move TrustedLen and FusedIterator impl of Iter/IterMut into macro

6 years agoAuto merge of #51325 - japaric:miri-up, r=TimNN
bors [Sun, 3 Jun 2018 13:36:54 +0000 (13:36 +0000)]
Auto merge of #51325 - japaric:miri-up, r=TimNN

update the miri submodule

the submodule currently seems to be pointing to a miri branch that has been deleted.

r? @TimNN

6 years agoupdate the miri submodule to master
Jorge Aparicio [Sun, 3 Jun 2018 12:31:37 +0000 (14:31 +0200)]
update the miri submodule to master

6 years agoupdate the miri submodule
Jorge Aparicio [Sun, 3 Jun 2018 12:27:46 +0000 (14:27 +0200)]
update the miri submodule

6 years agofix tidy error
Jorge Aparicio [Tue, 29 May 2018 12:25:35 +0000 (14:25 +0200)]
fix tidy error

6 years agoadd more tests
Jorge Aparicio [Tue, 29 May 2018 10:33:11 +0000 (12:33 +0200)]
add more tests

6 years agoreject `fn panic_impl<T>(_: &PanicInfo) -> !`
Jorge Aparicio [Tue, 29 May 2018 09:23:00 +0000 (11:23 +0200)]
reject `fn panic_impl<T>(_: &PanicInfo) -> !`

6 years agoremove #[unwind(allowed)]
Jorge Aparicio [Wed, 16 May 2018 17:56:24 +0000 (19:56 +0200)]
remove #[unwind(allowed)]

not required because this is a Rust function

6 years agofix after rebase
Jorge Aparicio [Wed, 16 May 2018 17:55:57 +0000 (19:55 +0200)]
fix after rebase

6 years agoundo payload in core::panic! changes
Jorge Aparicio [Wed, 16 May 2018 12:07:58 +0000 (14:07 +0200)]
undo payload in core::panic! changes

6 years agodocument that `panic_impl` never passes the FFI boundary
Jorge Aparicio [Tue, 1 May 2018 01:04:42 +0000 (03:04 +0200)]
document that `panic_impl` never passes the FFI boundary

6 years agoremove unused `struct NoPayload`
Jorge Aparicio [Tue, 1 May 2018 01:03:20 +0000 (03:03 +0200)]
remove unused `struct NoPayload`

6 years agoformat payload if possible instead of returning "Box<Any>"
Jorge Aparicio [Tue, 1 May 2018 01:02:39 +0000 (03:02 +0200)]
format payload if possible instead of returning "Box<Any>"

6 years agos/panic_fmt/panic_impl/g in docs
Jorge Aparicio [Mon, 30 Apr 2018 08:57:11 +0000 (10:57 +0200)]
s/panic_fmt/panic_impl/g in docs

6 years agoimplement #[panic_implementation]
Jorge Aparicio [Mon, 30 Apr 2018 08:55:24 +0000 (10:55 +0200)]
implement #[panic_implementation]

6 years agoShow which line the link is coming from.
kennytm [Sun, 3 Jun 2018 10:22:24 +0000 (18:22 +0800)]
Show which line the link is coming from.

6 years agoAlso prevent overflow in debug builds
Oliver Schneider [Sun, 3 Jun 2018 09:24:58 +0000 (11:24 +0200)]
Also prevent overflow in debug builds

6 years agoIgnore i128 test on asmjs
Linus Färnstrand [Sun, 3 Jun 2018 09:18:24 +0000 (11:18 +0200)]
Ignore i128 test on asmjs

6 years agoPoint to the rustdoc attribute where intralink resolution failed.
kennytm [Sun, 27 May 2018 17:46:59 +0000 (01:46 +0800)]
Point to the rustdoc attribute where intralink resolution failed.

6 years agocommand line args trump config.toml settings
Oliver Schneider [Sun, 3 Jun 2018 06:44:56 +0000 (08:44 +0200)]
command line args trump config.toml settings

6 years agoAuto merge of #51319 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Sun, 3 Jun 2018 03:13:43 +0000 (03:13 +0000)]
Auto merge of #51319 - Mark-Simulacrum:rollup, r=Mark-Simulacrum

Rollup of 6 pull requests

Successful merges:

 - #51143 (Specify that packed types must derive, not implement, Copy)
 - #51226 (Make Layout's align a NonZeroUsize)
 - #51297 (Fix run button style)
 - #51306 (impl Default for &mut str)
 - #51312 (Clarify the difference between get_mut and into_mut for OccupiedEntry)
 - #51313 (use type name in E0599 enum variant suggestion)

Failed merges:

6 years agorefactor mode to ToolRustc for Rls & Rustfmt
Collins Abitekaniza [Sun, 27 May 2018 23:02:58 +0000 (02:02 +0300)]
refactor mode to ToolRustc for Rls & Rustfmt

6 years agothread tool modes through
Collins Abitekaniza [Sun, 27 May 2018 22:09:43 +0000 (01:09 +0300)]
thread tool modes through

6 years agorefactor, make requested changes
Collins Abitekaniza [Thu, 24 May 2018 00:20:47 +0000 (03:20 +0300)]
refactor, make requested changes

6 years agorefactor Mode enum
Collins Abitekaniza [Sat, 19 May 2018 20:04:41 +0000 (23:04 +0300)]
refactor Mode enum

6 years agoRollup merge of #51313 - euclio:variant-name-suggestion-fix, r=oli-obk
Mark Simulacrum [Sun, 3 Jun 2018 01:55:10 +0000 (19:55 -0600)]
Rollup merge of #51313 - euclio:variant-name-suggestion-fix, r=oli-obk

use type name in E0599 enum variant suggestion

Also, rename the variable from "type_str" to "item_kind" to avoid
the ambiguity that caused this bug.

6 years agoRollup merge of #51312 - frewsxcv:clarify-hash-map-entry-get-mut, r=dtolnay
Mark Simulacrum [Sun, 3 Jun 2018 01:55:09 +0000 (19:55 -0600)]
Rollup merge of #51312 - frewsxcv:clarify-hash-map-entry-get-mut, r=dtolnay

Clarify the difference between get_mut and into_mut for OccupiedEntry

The examples for both hash_map::OccupiedEntry::get_mut and
hash_map::OccupiedEntry::into_mut were almost identical. This led to some
confusion over the difference, namely why you would ever use get_mut when
into_mut gives alonger lifetime. Reddit thread:
https://www.reddit.com/r/rust/comments/8a5swr/why_does_hashmaps

This commit adds two lines and a comment to the example, to show that the
entry object can be re-used after calling get_mut.

Closes https://github.com/rust-lang/rust/issues/49745

6 years agoRollup merge of #51306 - kennytm:impl-default-for-mut-str, r=SimonSapin
Mark Simulacrum [Sun, 3 Jun 2018 01:55:08 +0000 (19:55 -0600)]
Rollup merge of #51306 - kennytm:impl-default-for-mut-str, r=SimonSapin

impl Default for &mut str

Rationale: There is already `impl Default for &mut [T]`.

Note: This impl is insta-stable.

6 years agoRollup merge of #51297 - GuillaumeGomez:fix-run-but-style, r=QuietMisdreavus
Mark Simulacrum [Sun, 3 Jun 2018 01:55:07 +0000 (19:55 -0600)]
Rollup merge of #51297 - GuillaumeGomez:fix-run-but-style, r=QuietMisdreavus

Fix run button style

r? @QuietMisdreavus

6 years agoRollup merge of #51226 - gnzlbg:nonzero_align, r=SimonSapin
Mark Simulacrum [Sun, 3 Jun 2018 01:55:06 +0000 (19:55 -0600)]
Rollup merge of #51226 - gnzlbg:nonzero_align, r=SimonSapin

Make Layout's align a NonZeroUsize

This PR makes the `Layout`'s align field a `NonZeroUsize` since it cannot ever be zero, not even while building a `Layout`. It also contains some drive-by minor cleanups over the docs and the code, like updating the documented error types, or using the `size()` and `align()` methods instead of accessing the fields directly (the latter was required for the `NonZeroUsize` change anyways).

r? @SimonSapin

cc @Amanieu

6 years agoRollup merge of #51143 - Mark-Simulacrum:issue-50826, r=cramertj
Mark Simulacrum [Sun, 3 Jun 2018 01:55:04 +0000 (19:55 -0600)]
Rollup merge of #51143 - Mark-Simulacrum:issue-50826, r=cramertj

Specify that packed types must derive, not implement, Copy

6 years agoPass literal through black_box
Linus Färnstrand [Sun, 3 Jun 2018 01:13:29 +0000 (03:13 +0200)]
Pass literal through black_box