]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoAuto merge of #67598 - jumbatm:issue67557_simd_shuffle, r=oli-obk
bors [Sat, 28 Dec 2019 06:02:45 +0000 (06:02 +0000)]
Auto merge of #67598 - jumbatm:issue67557_simd_shuffle, r=oli-obk

Fix ICE / miscompilation when inlining simd shuffle intrinsic in MIR.

Closes #67557.

r? @oli-obk

4 years agoAuto merge of #67670 - oli-obk:rollup-2dp08sd, r=oli-obk
bors [Sat, 28 Dec 2019 00:18:59 +0000 (00:18 +0000)]
Auto merge of #67670 - oli-obk:rollup-2dp08sd, r=oli-obk

Rollup of 15 pull requests

Successful merges:

 - #65244 (add IntoFuture trait and support for await)
 - #67576 (reuse `capacity` variable in slice::repeat)
 - #67588 (Use NonNull in slice::Iter and slice::IterMut.)
 - #67594 (Update libc to 0.2.66)
 - #67602 (Use issue = "none" instead of "0" in intrinsics)
 - #67604 (Add Scalar::to_(u|i)16 methods)
 - #67617 (Remove `compiler_builtins_lib` documentation)
 - #67621 (Use the correct type for static qualifs)
 - #67629 (Remove redundant link texts)
 - #67632 (Convert collapsed to shortcut reference links)
 - #67633 (Update .mailmap)
 - #67635 (Document safety of Path casting)
 - #67654 (Add regression test for old NLL ICE)
 - #67659 (Stabilize the `matches!` macro)
 - #67664 (Fix some mailmap entries)

Failed merges:

r? @ghost

4 years agoRollup merge of #67664 - Manishearth:mailmapfixes, r=Mark-Simulacrum
Oliver Scherer [Fri, 27 Dec 2019 23:36:18 +0000 (00:36 +0100)]
Rollup merge of #67664 - Manishearth:mailmapfixes, r=Mark-Simulacrum

Fix some mailmap entries

r? @pietroalbini

4 years agoRollup merge of #67659 - SimonSapin:matches, r=rkruppe
Oliver Scherer [Fri, 27 Dec 2019 23:36:17 +0000 (00:36 +0100)]
Rollup merge of #67659 - SimonSapin:matches, r=rkruppe

Stabilize the `matches!` macro

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

FCP: https://github.com/rust-lang/rust/issues/65721#issuecomment-569118119

4 years agoRollup merge of #67654 - rossmacarthur:fix-51770-add-regression-test, r=Centril
Oliver Scherer [Fri, 27 Dec 2019 23:36:16 +0000 (00:36 +0100)]
Rollup merge of #67654 - rossmacarthur:fix-51770-add-regression-test, r=Centril

Add regression test for old NLL ICE

This fails on nightly-2018-06-24.

Resolves #51770

4 years agoRollup merge of #67635 - Mark-Simulacrum:path-doc-unsafe, r=dtolnay
Oliver Scherer [Fri, 27 Dec 2019 23:36:14 +0000 (00:36 +0100)]
Rollup merge of #67635 - Mark-Simulacrum:path-doc-unsafe, r=dtolnay

Document safety of Path casting

I would personally feel more comfortable making the relevant (internal anyway) types repr(transparent) and then documenting that we can make these casts because of that, but I believe this is a more minimal PR, so posting it first.

Resolves #45910.

4 years agoRollup merge of #67633 - christianpoveda:patch-1, r=Mark-Simulacrum
Oliver Scherer [Fri, 27 Dec 2019 23:36:13 +0000 (00:36 +0100)]
Rollup merge of #67633 - christianpoveda:patch-1, r=Mark-Simulacrum

Update .mailmap

4 years agoRollup merge of #67632 - kraai:remove-collapsed-reference-links, r=steveklabnik
Oliver Scherer [Fri, 27 Dec 2019 23:36:11 +0000 (00:36 +0100)]
Rollup merge of #67632 - kraai:remove-collapsed-reference-links, r=steveklabnik

Convert collapsed to shortcut reference links

4 years agoRollup merge of #67629 - kraai:remove-redundant-link-texts, r=steveklabnik
Oliver Scherer [Fri, 27 Dec 2019 23:36:09 +0000 (00:36 +0100)]
Rollup merge of #67629 - kraai:remove-redundant-link-texts, r=steveklabnik

Remove redundant link texts

Most of these links are followed by a parenthesized expression.  I think that the redundant link texts were added to prevent interpretation as an inline link.  This is unnecessary since the closing square bracket and opening parenthesis are separated by whitespace.

4 years agoRollup merge of #67621 - matthewjasper:correct-static-type, r=oli-obk
Oliver Scherer [Fri, 27 Dec 2019 23:36:08 +0000 (00:36 +0100)]
Rollup merge of #67621 - matthewjasper:correct-static-type, r=oli-obk

Use the correct type for static qualifs

Closes #67609

4 years agoRollup merge of #67617 - kraai:remove-compiler_builtins_lib-docs, r=Dylan-DPC
Oliver Scherer [Fri, 27 Dec 2019 23:36:07 +0000 (00:36 +0100)]
Rollup merge of #67617 - kraai:remove-compiler_builtins_lib-docs, r=Dylan-DPC

Remove `compiler_builtins_lib` documentation

Fixes #67593

4 years agoRollup merge of #67604 - christianpoveda:scalar_to_(u|i)64, r=RalfJung
Oliver Scherer [Fri, 27 Dec 2019 23:36:05 +0000 (00:36 +0100)]
Rollup merge of #67604 - christianpoveda:scalar_to_(u|i)64, r=RalfJung

Add Scalar::to_(u|i)16 methods

r? @RalfJung

4 years agoRollup merge of #67602 - xfix:use-issue-none-instead-of-0-in-intrinsics, r=Centril
Oliver Scherer [Fri, 27 Dec 2019 23:36:04 +0000 (00:36 +0100)]
Rollup merge of #67602 - xfix:use-issue-none-instead-of-0-in-intrinsics, r=Centril

Use issue = "none" instead of "0" in intrinsics

`issue = "0"` was incorrectly used in https://github.com/rust-lang/rust/commit/9ee16e14c51668309f446636e8960b7fbbac066d, the project is moving away from issue 0

4 years agoRollup merge of #67594 - oxalica:update-libc, r=Dylan-DPC
Oliver Scherer [Fri, 27 Dec 2019 23:36:02 +0000 (00:36 +0100)]
Rollup merge of #67594 - oxalica:update-libc, r=Dylan-DPC

Update libc to 0.2.66

cc @gnzlbg @alexcrichton

4 years agoRollup merge of #67588 - Kixunil:nonnull-slice-iter, r=rkruppe
Oliver Scherer [Fri, 27 Dec 2019 23:36:01 +0000 (00:36 +0100)]
Rollup merge of #67588 - Kixunil:nonnull-slice-iter, r=rkruppe

Use NonNull in slice::Iter and slice::IterMut.

`ptr` of `slice::Iter` and `slice::IterMut` can never be null, but this
fact wasn't exploited for layout optimizations. By changing `ptr` from
`*<mutability> T` to `NonNull<T>`, the compiler can now optimize layout
of `Option<Iter<'a, T>>`.

Closes #67228

4 years agoRollup merge of #67576 - king6cong:slice_repeat, r=Dylan-DPC
Oliver Scherer [Fri, 27 Dec 2019 23:35:59 +0000 (00:35 +0100)]
Rollup merge of #67576 - king6cong:slice_repeat, r=Dylan-DPC

reuse `capacity` variable in slice::repeat

None

4 years agoRollup merge of #65244 - seanmonstar:into-future, r=seanmonstar
Oliver Scherer [Fri, 27 Dec 2019 23:35:58 +0000 (00:35 +0100)]
Rollup merge of #65244 - seanmonstar:into-future, r=seanmonstar

add IntoFuture trait and support for await

The [async-await RFC](https://rust-lang.github.io/rfcs/2394-async_await.html#the-await-compiler-built-in) mentions being able to `await` anything implementing `IntoFuture`. Somewhere along the way, it was left out.

4 years agocore: add IntoFuture trait and support for await
Sean McArthur [Thu, 26 Dec 2019 20:57:09 +0000 (12:57 -0800)]
core: add IntoFuture trait and support for await

4 years agoAuto merge of #67035 - Goirad:implement-ipadd-padding, r=dtolnay
bors [Fri, 27 Dec 2019 18:40:50 +0000 (18:40 +0000)]
Auto merge of #67035 - Goirad:implement-ipadd-padding, r=dtolnay

Implement padding for IpAddr without heap alloc

Implements padding for `IpAddr`s without heap allocations.
This fixes issue #66810 .

cc @jethrogb @mzohreva

4 years agoFix whitequark's entry in the mailmap
Manish Goregaokar [Fri, 27 Dec 2019 17:51:34 +0000 (09:51 -0800)]
Fix whitequark's entry in the mailmap

4 years agoFix Nika's entry in the mailmap
Manish Goregaokar [Fri, 27 Dec 2019 17:52:49 +0000 (09:52 -0800)]
Fix Nika's entry in the mailmap

4 years agoFix my entry in the mailmap
Manish Goregaokar [Fri, 27 Dec 2019 17:39:21 +0000 (09:39 -0800)]
Fix my entry in the mailmap

4 years agoStabilize the `matches!` macro
Simon Sapin [Fri, 27 Dec 2019 13:07:16 +0000 (14:07 +0100)]
Stabilize the `matches!` macro

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

FCP: https://github.com/rust-lang/rust/issues/65721#issuecomment-569118119

4 years agoAdd regression test for old NLL ICE
Ross MacArthur [Fri, 27 Dec 2019 11:36:41 +0000 (13:36 +0200)]
Add regression test for old NLL ICE

4 years agoAuto merge of #67437 - matthew-healy:skip-llvm-rebuild, r=Mark-Simulacrum
bors [Fri, 27 Dec 2019 10:58:57 +0000 (10:58 +0000)]
Auto merge of #67437 - matthew-healy:skip-llvm-rebuild, r=Mark-Simulacrum

Add LLVM `skip-rebuild` option to `x.py`

This PR reimplements parts of @Walther's work from #65848, and closes #65612.

I decided not to implement the [arguments to override this setting](https://github.com/rust-lang/rust/issues/65612#issuecomment-544247546) in this PR. If there's strong feeling that this change shouldn't be merged without the overrides then I'm happy to close this until I've had a chance to add them in. Otherwise I'll aim to submit a second PR with those this weekend.

I'd have liked to have tested the change in `native.rs`, but there didn't seem to be any existing test infrastructure. I ran this a few times manually and it _worked on my machine_ though... ðŸ˜¬

4 years agoAuto merge of #67192 - oli-obk:const_zst_addr, r=RalfJung,varkor
bors [Fri, 27 Dec 2019 07:38:52 +0000 (07:38 +0000)]
Auto merge of #67192 - oli-obk:const_zst_addr, r=RalfJung,varkor

Various const eval and pattern matching ICE fixes

r? @RalfJung
cc @spastorino

This PR does not change existing behaviour anymore and just fixes a bunch of ICEs reachable from user code (sometimes even on stable via obscure union transmutes).

4 years agoAuto merge of #66936 - cjgillot:hirene-expr, r=Zoxc
bors [Fri, 27 Dec 2019 01:40:41 +0000 (01:40 +0000)]
Auto merge of #66936 - cjgillot:hirene-expr, r=Zoxc

Allocate HIR on an arena 2/4 -- Expr & Pat

This is the second PR in the series started by #66931

This time, commits don't really make sense on their own.
They are mostly split by type of compile error.

The additional diff is here: https://github.com/cjgillot/rust/compare/hirene-preamble...hirene-expr

4 years agoMove arena_vec inside lowering.
Camille GILLOT [Tue, 24 Dec 2019 17:57:28 +0000 (18:57 +0100)]
Move arena_vec inside lowering.

4 years agoRemove some type information.
Camille GILLOT [Tue, 3 Dec 2019 21:54:44 +0000 (22:54 +0100)]
Remove some type information.

4 years agoFewer calls to arena.alloc.
Camille GILLOT [Sun, 1 Dec 2019 20:10:43 +0000 (21:10 +0100)]
Fewer calls to arena.alloc.

4 years agoFallout in other crates.
Camille GILLOT [Sat, 30 Nov 2019 14:08:22 +0000 (15:08 +0100)]
Fallout in other crates.

4 years agoLowering for hir::Expr.
Camille GILLOT [Fri, 29 Nov 2019 18:01:31 +0000 (19:01 +0100)]
Lowering for hir::Expr.

4 years agoVisit for hir::Expr.
Camille GILLOT [Fri, 29 Nov 2019 13:08:03 +0000 (14:08 +0100)]
Visit for hir::Expr.

4 years agoSyntax for hir::Expr.
Camille GILLOT [Fri, 29 Nov 2019 12:43:03 +0000 (13:43 +0100)]
Syntax for hir::Expr.

4 years agoSkip LLVM rebuild when skip-rebuild is true
Matthew Healy [Thu, 19 Dec 2019 19:42:01 +0000 (20:42 +0100)]
Skip LLVM rebuild when skip-rebuild is true

4 years agoParse llvm_skip_rebuild into Config
Matthew Healy [Thu, 19 Dec 2019 18:55:42 +0000 (19:55 +0100)]
Parse llvm_skip_rebuild into Config

4 years agoDocument LLVM skip-rebuild config.toml option
Matthew Healy [Thu, 19 Dec 2019 18:46:19 +0000 (19:46 +0100)]
Document LLVM skip-rebuild config.toml option

4 years agoMake ui test bitwidth independent
Oliver Scherer [Tue, 24 Dec 2019 13:31:36 +0000 (14:31 +0100)]
Make ui test bitwidth independent

4 years agoFix rebase fallout
Oliver Scherer [Mon, 23 Dec 2019 16:13:50 +0000 (17:13 +0100)]
Fix rebase fallout

4 years agoUse the targetted const eval functions
Oliver Scherer [Mon, 23 Dec 2019 16:13:25 +0000 (17:13 +0100)]
Use the targetted const eval functions

4 years agoReintroduce the recursion comment
Oliver Scherer [Sun, 22 Dec 2019 20:31:24 +0000 (21:31 +0100)]
Reintroduce the recursion comment

4 years agoDocumentation nit
Oliver Scherer [Sun, 22 Dec 2019 20:28:25 +0000 (21:28 +0100)]
Documentation nit

4 years agoAdd a `const_eval` helper to `InterpCx`
Oliver Scherer [Sun, 22 Dec 2019 19:56:01 +0000 (20:56 +0100)]
Add a `const_eval` helper to `InterpCx`

4 years agoEarly abort instead of building up zero sized values
Oliver Scherer [Sun, 22 Dec 2019 19:39:35 +0000 (20:39 +0100)]
Early abort instead of building up zero sized values

4 years agoExplain why `const_eval` is ok here
Oliver Scherer [Sun, 22 Dec 2019 12:30:47 +0000 (13:30 +0100)]
Explain why `const_eval` is ok here

4 years agoTypo
Oliver Scherer [Sun, 22 Dec 2019 12:13:08 +0000 (13:13 +0100)]
Typo

4 years agoRemove unintended noisy log statement
Oliver Scherer [Sun, 22 Dec 2019 12:10:56 +0000 (13:10 +0100)]
Remove unintended noisy log statement

4 years agoExplain the currently necessary existance of `TransmuteSizeDiff`
Oliver Scherer [Sun, 22 Dec 2019 12:06:50 +0000 (13:06 +0100)]
Explain the currently necessary existance of `TransmuteSizeDiff`

4 years agoExplain what we are doing with parameter environments for statics
Oliver Scherer [Sun, 22 Dec 2019 11:59:15 +0000 (12:59 +0100)]
Explain what we are doing with parameter environments for statics

4 years agoComments should start capitalized and end in a period
Oliver Scherer [Sun, 22 Dec 2019 11:55:31 +0000 (12:55 +0100)]
Comments should start capitalized and end in a period

4 years agoExplain ParamEnv::reveal_all usage
Oliver Scherer [Sun, 22 Dec 2019 11:54:48 +0000 (12:54 +0100)]
Explain ParamEnv::reveal_all usage

4 years agoAdd regression test for ZST statics being allowed to "read" from themselves
Oliver Scherer [Fri, 20 Dec 2019 11:37:05 +0000 (12:37 +0100)]
Add regression test for ZST statics being allowed to "read" from themselves

4 years agoImmediately evaluate and validate constants when we want them as operands
Oliver Scherer [Fri, 20 Dec 2019 11:31:52 +0000 (12:31 +0100)]
Immediately evaluate and validate constants when we want them as operands

4 years agoInterning even happens when validation of a constant fails
Oliver Scherer [Sat, 14 Dec 2019 11:15:37 +0000 (12:15 +0100)]
Interning even happens when validation of a constant fails

4 years agoPrevent an ICE on invalid transmutes
Oliver Scherer [Fri, 13 Dec 2019 23:19:24 +0000 (00:19 +0100)]
Prevent an ICE on invalid transmutes

4 years agoComment on a few odd things that we should look at
Oliver Scherer [Fri, 13 Dec 2019 23:05:28 +0000 (00:05 +0100)]
Comment on a few odd things that we should look at

4 years agoSimplify `force_allocation_maybe_sized`
Oliver Scherer [Fri, 13 Dec 2019 23:05:04 +0000 (00:05 +0100)]
Simplify `force_allocation_maybe_sized`

4 years agoRetire `to_ptr` which should already have no users but still kept getting new ones
Oliver Scherer [Fri, 13 Dec 2019 23:04:27 +0000 (00:04 +0100)]
Retire `to_ptr` which should already have no users but still kept getting new ones

4 years agoDon't ICE on the use of integer addresses for ZST constants in pattern matching
Oliver Scherer [Fri, 13 Dec 2019 23:01:12 +0000 (00:01 +0100)]
Don't ICE on the use of integer addresses for ZST constants in pattern matching

4 years agoUse NonNull in slice::Iter and slice::IterMut.
Martin Habovstiak [Tue, 24 Dec 2019 15:08:30 +0000 (16:08 +0100)]
Use NonNull in slice::Iter and slice::IterMut.

`ptr` of `slice::Iter` and `slice::IterMut` can never be null, but this
fact wasn't exploited for layout optimizations. By changing `ptr` from
`*<mutability> T` to `NonNull<T>`, the compiler can now optimize layout
of `Option<Iter<'a, T>>`.

4 years agoDocument safety of Path casting
Mark Rousskov [Thu, 26 Dec 2019 17:12:42 +0000 (12:12 -0500)]
Document safety of Path casting

4 years agoAuto merge of #67592 - matthewjasper:cleanup-match, r=Centril
bors [Thu, 26 Dec 2019 16:44:52 +0000 (16:44 +0000)]
Auto merge of #67592 - matthewjasper:cleanup-match, r=Centril

Prepare for lowering or-patterns

This is probably best reviewed commit-by-commit.

* Rustfmt `rustc_mir::build::{self, matches}`
* Remove `-Znll-dont-emit-read-for-match`
* Split `match_expr` into smaller functions
* Feature gate or-patterns in const contexts

cc https://github.com/rust-lang/rust/issues/54883

r? @Centril

4 years agoImplement padding for IpAddr without heap alloc
Dario Gonzalez [Wed, 4 Dec 2019 18:36:43 +0000 (10:36 -0800)]
Implement padding for IpAddr without heap alloc

4 years agoUpdate .mailmap
Christian Poveda [Thu, 26 Dec 2019 15:32:26 +0000 (10:32 -0500)]
Update .mailmap

4 years agoConvert collapsed to shortcut reference links
Matthew Kraai [Thu, 26 Dec 2019 13:27:55 +0000 (05:27 -0800)]
Convert collapsed to shortcut reference links

4 years agoAuto merge of #67327 - oli-obk:cleanup, r=RalfJung
bors [Thu, 26 Dec 2019 13:15:05 +0000 (13:15 +0000)]
Auto merge of #67327 - oli-obk:cleanup, r=RalfJung

Split up `const_eval.rs`

Fixes #67316

r? @RalfJung

4 years agoRemove redundant link texts
Matthew Kraai [Thu, 26 Dec 2019 13:04:46 +0000 (05:04 -0800)]
Remove redundant link texts

4 years agoRebase fallout
Oliver Scherer [Wed, 25 Dec 2019 00:28:30 +0000 (01:28 +0100)]
Rebase fallout

4 years agoA cycle error on a diverging function is now a const stack overflow again
Oliver Scherer [Mon, 23 Dec 2019 22:11:03 +0000 (23:11 +0100)]
A cycle error on a diverging function is now a const stack overflow again

4 years agoBail out before running the query
Oliver Scherer [Mon, 23 Dec 2019 16:33:09 +0000 (17:33 +0100)]
Bail out before running the query

4 years agoTidy
Oliver Scherer [Mon, 23 Dec 2019 16:31:55 +0000 (17:31 +0100)]
Tidy

4 years agoFix imports after rebase
Oliver Scherer [Mon, 23 Dec 2019 14:02:55 +0000 (15:02 +0100)]
Fix imports after rebase

4 years agoRename `query` module
Oliver Scherer [Mon, 23 Dec 2019 11:55:16 +0000 (12:55 +0100)]
Rename `query` module

4 years agoMove function definitions before their first use
Oliver Scherer [Sun, 22 Dec 2019 21:20:46 +0000 (22:20 +0100)]
Move function definitions before their first use

4 years agoMove all functions used by the queries to query.rs
Oliver Scherer [Wed, 25 Dec 2019 00:15:26 +0000 (01:15 +0100)]
Move all functions used by the queries to query.rs

4 years agoMove a function to make its adjacent impl block easier to discover
Oliver Scherer [Sun, 22 Dec 2019 20:10:43 +0000 (21:10 +0100)]
Move a function to make its adjacent impl block easier to discover

4 years agoMake some functions crate local
Oliver Scherer [Sun, 15 Dec 2019 16:50:37 +0000 (17:50 +0100)]
Make some functions crate local

4 years agoMove `eval_body_using_ecx` to the only module it is used in
Oliver Scherer [Wed, 25 Dec 2019 00:09:47 +0000 (01:09 +0100)]
Move `eval_body_using_ecx` to the only module it is used in

4 years agoMove `eval_const_fn_call` to the `const_eval` module
Oliver Scherer [Wed, 25 Dec 2019 00:08:39 +0000 (01:08 +0100)]
Move `eval_const_fn_call` to the `const_eval` module

4 years agoMove const eval query components into their own module
Oliver Scherer [Wed, 25 Dec 2019 00:06:51 +0000 (01:06 +0100)]
Move const eval query components into their own module

4 years agoMove const eval machine into its own module
Oliver Scherer [Wed, 25 Dec 2019 00:04:32 +0000 (01:04 +0100)]
Move const eval machine into its own module

4 years agoAuto merge of #66670 - crlf0710:normalize_ident, r=Dylan-DPC
bors [Thu, 26 Dec 2019 09:55:00 +0000 (09:55 +0000)]
Auto merge of #66670 - crlf0710:normalize_ident, r=Dylan-DPC

Normalize ident

Perform unicode normalization on identifiers. Resolving the first bullet point in #55467.

4 years agoAdd unicode-normalization to whitelist.
Charles Lew [Thu, 19 Dec 2019 03:57:30 +0000 (11:57 +0800)]
Add unicode-normalization to whitelist.

4 years agoAdd a test and bless existing test case.
Charles Lew [Sat, 23 Nov 2019 14:37:46 +0000 (22:37 +0800)]
Add a test and bless existing test case.

4 years agoNormalize identifiers in librustc_parse.
Charles Lew [Sat, 23 Nov 2019 14:33:40 +0000 (22:33 +0800)]
Normalize identifiers in librustc_parse.

4 years agoAuto merge of #67268 - estebank:assoc-types, r=oli-obk
bors [Thu, 26 Dec 2019 03:42:59 +0000 (03:42 +0000)]
Auto merge of #67268 - estebank:assoc-types, r=oli-obk

Tweak errors for missing associated types and type parameters

* On `dyn Trait` missing associated types, provide a structured suggestion for them
* On missing type parameters, provide structured suggestion for them
* Point at trait definition when missing required type parameter
* Tweak output of E0658
* Tweak wording of E0719
* Account for `Trait1 + Trait2` case

Fix #66380, fix #60595. CC #63711.

4 years agoAuto merge of #67580 - RalfJung:miri-unleash-tests, r=oli-obk
bors [Thu, 26 Dec 2019 00:27:13 +0000 (00:27 +0000)]
Auto merge of #67580 - RalfJung:miri-unleash-tests, r=oli-obk

test the unleashed Miri

In particular, test what happens when we try to drop something. Cc https://github.com/rust-lang/const-eval/issues/17

r? @oli-obk

4 years agoAuto merge of #66919 - dtolnay:description, r=KodrAus
bors [Wed, 25 Dec 2019 21:10:49 +0000 (21:10 +0000)]
Auto merge of #66919 - dtolnay:description, r=KodrAus

Deprecate Error::description for real

`description` has been documented as soft-deprecated since 1.27.0 (17 months ago). There is no longer any reason to call it or implement it.

This PR:

- adds `#[rustc_deprecated(since = "1.41.0")]` to `Error::description`;
- moves `description` (and `cause`, which is also deprecated) below the `source` and `backtrace` methods in the Error trait;
- reduces documentation of `description` and `cause` to take up much less vertical real estate in rustdocs, while preserving the example that shows how to render errors without needing to call `description`;
- removes the description function of all *currently unstable* Error impls in the standard library;
- marks `#[allow(deprecated)]` the description function of all *stable* Error impls in the standard library;
- replaces miscellaneous uses of `description` in example code and the compiler.

---

![description](https://user-images.githubusercontent.com/1940490/69910369-3bbaca80-13bf-11ea-94f7-2fe27a7ea333.png)

4 years agoUse the correct type for static qualifs
Matthew Jasper [Wed, 25 Dec 2019 21:09:51 +0000 (21:09 +0000)]
Use the correct type for static qualifs

4 years agoRemove `compiler_builtins_lib` documentation
Matthew Kraai [Wed, 25 Dec 2019 19:56:19 +0000 (11:56 -0800)]
Remove `compiler_builtins_lib` documentation

Fixes #67593

4 years agoFix rebase and sort assoc type list for deterministic output
Esteban Küber [Tue, 24 Dec 2019 22:10:55 +0000 (14:10 -0800)]
Fix rebase and sort assoc type list for deterministic output

4 years agorewrite scalar to integer methods
Christian Poveda [Wed, 25 Dec 2019 15:41:50 +0000 (10:41 -0500)]
rewrite scalar to integer methods

4 years agoAdd Scalar::to_(u|i)16 methods
Christian Poveda [Wed, 25 Dec 2019 13:42:14 +0000 (08:42 -0500)]
Add Scalar::to_(u|i)16 methods

4 years agoUse issue = "none" instead of "0" in intrinsics
Konrad Borowski [Wed, 25 Dec 2019 10:54:55 +0000 (11:54 +0100)]
Use issue = "none" instead of "0" in intrinsics

4 years agoAuto merge of #67524 - LukasKalbertodt:improve-into-iter-lint, r=matthewjasper
bors [Wed, 25 Dec 2019 10:20:48 +0000 (10:20 +0000)]
Auto merge of #67524 - LukasKalbertodt:improve-into-iter-lint, r=matthewjasper

Generalize `array_into_iter` lint to also lint for boxed arrays

`Box` is special in that a method call on a box can move the value out
of the box. Thus, the same backwards-compatibility problem can arise
for boxed arrays as for simple arrays.

---

CC #66145
r? @matthewjasper  (as you reviewed the first PR)

4 years agouse error-pattern
Ralf Jung [Wed, 25 Dec 2019 10:18:39 +0000 (11:18 +0100)]
use error-pattern

4 years agoUse link in doc comment
matthewjasper [Tue, 24 Dec 2019 19:56:20 +0000 (19:56 +0000)]
Use link in doc comment

Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
4 years agoFeature gate or patterns in const contexts
Matthew Jasper [Tue, 24 Dec 2019 16:43:17 +0000 (16:43 +0000)]
Feature gate or patterns in const contexts

4 years agoSplit `match_expr` into smaller functions
Matthew Jasper [Tue, 24 Dec 2019 16:35:11 +0000 (16:35 +0000)]
Split `match_expr` into smaller functions

4 years agoRemove `-Znll-dont-emit-read-for-match`
Matthew Jasper [Tue, 24 Dec 2019 14:31:03 +0000 (14:31 +0000)]
Remove `-Znll-dont-emit-read-for-match`