]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoprocess_potential_macro_variable: de-fatalize an error
Mazdak Farrokhzad [Mon, 30 Dec 2019 23:25:30 +0000 (00:25 +0100)]
process_potential_macro_variable: de-fatalize an error

4 years agoparser: span_fatal -> struct_span_err
Mazdak Farrokhzad [Mon, 30 Dec 2019 23:20:41 +0000 (00:20 +0100)]
parser: span_fatal -> struct_span_err

4 years agode-fatalize some errors
Mazdak Farrokhzad [Mon, 30 Dec 2019 14:09:42 +0000 (15:09 +0100)]
de-fatalize some errors

4 years agoparser: call .struct_span_err directly
Mazdak Farrokhzad [Mon, 30 Dec 2019 13:56:57 +0000 (14:56 +0100)]
parser: call .struct_span_err directly

4 years agoAuto merge of #67032 - cjgillot:hirene, r=Zoxc
bors [Tue, 31 Dec 2019 03:27:36 +0000 (03:27 +0000)]
Auto merge of #67032 - cjgillot:hirene, r=Zoxc

Allocate HIR on an arena 4/4

This is the fourth and last PR in the series started by #66931, #66936 and #66942.

The last commits should compile on their own.
The difference with the previous PR is given by https://github.com/cjgillot/rust/compare/hirene-ty...hirene

A few more cleanups may be necessary, please tell me.

r? @eddyb like the other
cc @Zoxc

4 years agoInline and remove `nfc_symbol_from` method.
Charles Lew [Mon, 30 Dec 2019 12:00:05 +0000 (20:00 +0800)]
Inline and remove `nfc_symbol_from` method.

4 years agoAdd symbol normalization for proc_macro_server.
Charles Lew [Sun, 29 Dec 2019 11:50:43 +0000 (19:50 +0800)]
Add symbol normalization for proc_macro_server.

4 years ago[const-prop] Expand comment about casting ZST enums
Wesley Wiser [Sun, 29 Dec 2019 15:34:09 +0000 (10:34 -0500)]
[const-prop] Expand comment about casting ZST enums

4 years ago[const-prop] Clean up `check_cast()` a bit
Wesley Wiser [Sat, 28 Dec 2019 21:51:13 +0000 (16:51 -0500)]
[const-prop] Clean up `check_cast()` a bit

4 years ago[const-prop] Extract some functions out of `_const_prop`
Wesley Wiser [Sat, 28 Dec 2019 21:43:39 +0000 (16:43 -0500)]
[const-prop] Extract some functions out of `_const_prop`

4 years agoLint overflowing integer casts in const prop
Wesley Wiser [Fri, 13 Dec 2019 03:03:32 +0000 (22:03 -0500)]
Lint overflowing integer casts in const prop

This extends the invalid cases we catch in const prop to include
overflowing integer casts using the same machinery as the overflowing
binary and unary operation logic.

4 years agoEnlarge smallvec.
Camille GILLOT [Mon, 30 Dec 2019 22:25:47 +0000 (23:25 +0100)]
Enlarge smallvec.

4 years agoReduce allocations.
Camille GILLOT [Mon, 30 Dec 2019 22:09:35 +0000 (23:09 +0100)]
Reduce allocations.

4 years agoLess-than is asymmetric, not antisymmetric
JP Sugarbroad [Mon, 30 Dec 2019 20:17:23 +0000 (12:17 -0800)]
Less-than is asymmetric, not antisymmetric

This has bothered me for a while. It's such a small nit, but...

4 years agoreview comments and fix rebase
Esteban Küber [Mon, 30 Dec 2019 19:45:48 +0000 (11:45 -0800)]
review comments and fix rebase

4 years agoAuto merge of #67707 - petrochenkov:crateren, r=Centril
bors [Mon, 30 Dec 2019 18:06:54 +0000 (18:06 +0000)]
Auto merge of #67707 - petrochenkov:crateren, r=Centril

Rename some crates and modules in the frontend

Migrate from `syntax_*` naming scheme to `rustc_*`.
See https://github.com/rust-lang/rust/pull/65324#issuecomment-551103396 and several comments below.

Renamed crates:
`syntax_expand` -> `rustc_expand`
`syntax_pos` -> `rustc_span` ([motivation](https://github.com/rust-lang/rust/pull/65324#issuecomment-552173320))
`syntax_ext` -> `rustc_builtin_macros`

Also one module in resolve is renamed for consistency and to avoid tautology.

r? @Centril

4 years agoSuggest adding a lifetime constraint when opaque type is responsible for "does not...
Ohad Ravid [Tue, 24 Dec 2019 18:14:20 +0000 (19:14 +0100)]
Suggest adding a lifetime constraint when opaque type is responsible for "does not live long enough" error

4 years agoSupport `-Z ui-testing=yes/no`
Vadim Petrochenkov [Sun, 29 Dec 2019 21:23:19 +0000 (00:23 +0300)]
Support `-Z ui-testing=yes/no`

4 years agoRename `rustc_resolve/resolve_imports.rs` -> `rustc_resolve/imports.rs`
Vadim Petrochenkov [Sun, 29 Dec 2019 16:42:23 +0000 (19:42 +0300)]
Rename `rustc_resolve/resolve_imports.rs` -> `rustc_resolve/imports.rs`

4 years agoRename `libsyntax_ext` and `libsyntax_expand` in code
Vadim Petrochenkov [Sun, 29 Dec 2019 14:23:55 +0000 (17:23 +0300)]
Rename `libsyntax_ext` and `libsyntax_expand` in code

4 years agoMake things build again
Vadim Petrochenkov [Sun, 29 Dec 2019 13:53:32 +0000 (16:53 +0300)]
Make things build again

4 years agoRename directories for some crates from `syntax_x` to `rustc_x`
Vadim Petrochenkov [Sun, 29 Dec 2019 13:39:31 +0000 (16:39 +0300)]
Rename directories for some crates from `syntax_x` to `rustc_x`

`syntax_expand` -> `rustc_expand`
`syntax_pos` -> `rustc_span`
`syntax_ext` -> `rustc_builtin_macros`

4 years agoAuto merge of #67474 - mark-i-m:simplify-borrow_check-4, r=matthewjasper
bors [Mon, 30 Dec 2019 14:47:26 +0000 (14:47 +0000)]
Auto merge of #67474 - mark-i-m:simplify-borrow_check-4, r=matthewjasper

Get rid of ErrorReportingCtx [5/N]

We can now use `MirBorrowckCtxt` instead :)

```
6 files changed, 122 insertions(+), 243 deletions(-)
```

This is a followup to (and thus blocked on) #67241.

r? @matthewjasper

cc @eddyb

I while try to do one more to get rid of the weird usage of `RegionInferenceCtx` in `borrow_check::diagnostics::{region_errors, region_naming}`. I think those uses can possibly also be refactored to use `MirBorrowckCtxt`...

4 years agodiscriminant -> scrutinee
Mazdak Farrokhzad [Mon, 30 Dec 2019 11:48:48 +0000 (12:48 +0100)]
discriminant -> scrutinee

4 years agoBlame user type in pat type error.
Mazdak Farrokhzad [Mon, 30 Dec 2019 10:39:13 +0000 (11:39 +0100)]
Blame user type in pat type error.

4 years agocheck_fn: simplify
Mazdak Farrokhzad [Mon, 30 Dec 2019 08:40:44 +0000 (09:40 +0100)]
check_fn: simplify

4 years agorefactor and fix this-expression-has-type note
Mazdak Farrokhzad [Mon, 30 Dec 2019 08:08:18 +0000 (09:08 +0100)]
refactor and fix this-expression-has-type note

4 years agoBump smallvec
Mateusz Mikuła [Mon, 30 Dec 2019 12:48:00 +0000 (13:48 +0100)]
Bump smallvec

4 years agoPass the span of `<init>` in `let <pat> = <init>;`
Mazdak Farrokhzad [Mon, 30 Dec 2019 07:17:32 +0000 (08:17 +0100)]
Pass the span of `<init>` in `let <pat> = <init>;`
when type checking `<pat>`.

4 years agomove demand_eqtype_pat* to pat.rs
Mazdak Farrokhzad [Mon, 30 Dec 2019 06:48:16 +0000 (07:48 +0100)]
move demand_eqtype_pat* to pat.rs

4 years agoMatchExpressionArmPattern -> Pattern
Mazdak Farrokhzad [Mon, 30 Dec 2019 06:42:46 +0000 (07:42 +0100)]
MatchExpressionArmPattern -> Pattern

Current name is too specific for incoming changes.

4 years agoShow scrutinee expr type for struct fields.
Mazdak Farrokhzad [Mon, 30 Dec 2019 06:27:56 +0000 (07:27 +0100)]
Show scrutinee expr type for struct fields.

TODO: The type is wrong and will be fixed in later commits.

4 years agoMatchExpressionArmPattern: Use more generic wording.
Mazdak Farrokhzad [Mon, 30 Dec 2019 06:02:24 +0000 (07:02 +0100)]
MatchExpressionArmPattern: Use more generic wording.

The existing wording was inappropriate for e.g.
`if let Ok(_) = expr { .. }`. The diagnostic would
leak the fact that we desugar to a `match`.

4 years agocleanup check_pat
Mazdak Farrokhzad [Mon, 30 Dec 2019 05:53:02 +0000 (06:53 +0100)]
cleanup check_pat

4 years agoAuto merge of #67667 - wesleywiser:speed_up_trivially_valid_constants, r=oli-obk
bors [Mon, 30 Dec 2019 11:31:04 +0000 (11:31 +0000)]
Auto merge of #67667 - wesleywiser:speed_up_trivially_valid_constants, r=oli-obk

Resolve long compile times when evaluating always valid constants

This extends the existing logic which skips validating every integer or
floating point number type to also skip validating empty structs because
they are also trivially valid.

Fixes #67539

r? @oli-obk
cc @RalfJung @spastorino

4 years agoOutdated comment.
Camille GILLOT [Sun, 29 Dec 2019 13:41:39 +0000 (14:41 +0100)]
Outdated comment.

4 years agoInert doc comments.
Camille GILLOT [Sun, 29 Dec 2019 10:16:22 +0000 (11:16 +0100)]
Inert doc comments.

4 years agoMove region_scope_tree query to librustc_passes.
Camille GILLOT [Sun, 29 Dec 2019 09:59:15 +0000 (10:59 +0100)]
Move region_scope_tree query to librustc_passes.

4 years agoMove region.rs to librustc_passes.
Camille GILLOT [Sun, 29 Dec 2019 09:59:10 +0000 (10:59 +0100)]
Move region.rs to librustc_passes.

4 years agoDuplicate allocations in lowering.
Camille GILLOT [Sun, 29 Dec 2019 11:17:56 +0000 (12:17 +0100)]
Duplicate allocations in lowering.

4 years agoAvoid a few allocations.
Camille GILLOT [Thu, 26 Dec 2019 16:57:50 +0000 (17:57 +0100)]
Avoid a few allocations.

4 years agoAllocate inside lower_path_extra.
Camille GILLOT [Wed, 4 Dec 2019 18:45:50 +0000 (19:45 +0100)]
Allocate inside lower_path_extra.

4 years agoRetire hir::ptr.
Camille GILLOT [Sun, 1 Dec 2019 16:48:49 +0000 (17:48 +0100)]
Retire hir::ptr.

4 years agoRetire HirVec.
Camille GILLOT [Sun, 1 Dec 2019 16:21:00 +0000 (17:21 +0100)]
Retire HirVec.

4 years agoRemove HirVec from Generics.
Camille GILLOT [Sun, 1 Dec 2019 16:10:12 +0000 (17:10 +0100)]
Remove HirVec from Generics.

4 years agoGammer fix
Donough Liu [Mon, 30 Dec 2019 09:14:08 +0000 (17:14 +0800)]
Gammer fix

4 years agoAuto merge of #67658 - spastorino:do-not-copy-zsts, r=oli-obk
bors [Mon, 30 Dec 2019 08:24:22 +0000 (08:24 +0000)]
Auto merge of #67658 - spastorino:do-not-copy-zsts, r=oli-obk

Avoid memory copy logic for zsts

r? @oli-obk

One of the included commits is work done by @HeroicKatora in #62655

4 years agoAdd error code explanation for E0477
Donough Liu [Mon, 30 Dec 2019 06:41:46 +0000 (14:41 +0800)]
Add error code explanation for E0477

4 years agoAuto merge of #67721 - JohnTitor:rollup-o8zm4r9, r=JohnTitor
bors [Mon, 30 Dec 2019 05:12:48 +0000 (05:12 +0000)]
Auto merge of #67721 - JohnTitor:rollup-o8zm4r9, r=JohnTitor

Rollup of 10 pull requests

Successful merges:

 - #64273 (Stabilize attribute macros on inline modules)
 - #67287 (typeck: note other end-point when checking range pats)
 - #67564 (docs: Iterator adapters have unspecified results after a panic)
 - #67622 (Some keyword documentation.)
 - #67657 (Clean up const-hack PRs now that const if / match exist.)
 - #67677 (resolve: Minor cleanup of duplicate macro reexports)
 - #67687 (Do not ICE on lifetime error involving closures)
 - #67698 (Move reachable_set and diagnostic_items to librustc_passes.)
 - #67701 (tidy: Enforce formatting rather than just check it if `--bless` is specified)
 - #67715 (Typo fix)

Failed merges:

r? @ghost

4 years agoRollup merge of #67715 - petertodd:2019-typo-manuallydrop, r=Centril
Yuki Okushi [Mon, 30 Dec 2019 05:07:57 +0000 (14:07 +0900)]
Rollup merge of #67715 - petertodd:2019-typo-manuallydrop, r=Centril

Typo fix

4 years agoRollup merge of #67701 - petrochenkov:tidybless, r=Mark-Simulacrum
Yuki Okushi [Mon, 30 Dec 2019 05:07:56 +0000 (14:07 +0900)]
Rollup merge of #67701 - petrochenkov:tidybless, r=Mark-Simulacrum

tidy: Enforce formatting rather than just check it if `--bless` is specified

Ensuring the "tidy"-ness currently requires running `rustfmt` twice:
```sh
./x.py fmt && ./x.py test tidy
```
, once to actually format code and the second time as a part of tidy to check that the code is formatted.

Running `rustfmt` is slow, so we don't want to run it twice.

With this PR tidy enforces the formatting rather than just checks it if `--bless` was passed to it:
```sh
./x.py test tidy --bless
```

r? @Mark-Simulacrum

4 years agoRollup merge of #67698 - cjgillot:passes-first, r=Zoxc
Yuki Okushi [Mon, 30 Dec 2019 05:07:55 +0000 (14:07 +0900)]
Rollup merge of #67698 - cjgillot:passes-first, r=Zoxc

Move reachable_set and diagnostic_items to librustc_passes.

Split out of #67688

r? @Zoxc

4 years agoRollup merge of #67687 - estebank:issue-67634, r=matthewjasper
Yuki Okushi [Mon, 30 Dec 2019 05:07:53 +0000 (14:07 +0900)]
Rollup merge of #67687 - estebank:issue-67634, r=matthewjasper

Do not ICE on lifetime error involving closures

Fix #67634.

4 years agoRollup merge of #67677 - petrochenkov:dupexp, r=Centril
Yuki Okushi [Mon, 30 Dec 2019 05:07:52 +0000 (14:07 +0900)]
Rollup merge of #67677 - petrochenkov:dupexp, r=Centril

resolve: Minor cleanup of duplicate macro reexports

Enabled by https://github.com/rust-lang/rust/pull/65785 which changed `duplicate_macro_exports` from a lint to a hard error.

4 years agoRollup merge of #67657 - jumbatm:cleanup-const-hack, r=oli-obk
Yuki Okushi [Mon, 30 Dec 2019 05:07:50 +0000 (14:07 +0900)]
Rollup merge of #67657 - jumbatm:cleanup-const-hack, r=oli-obk

Clean up const-hack PRs now that const if / match exist.

Closes #67627.

Cleans up these merged PRs tagged with `const-hack`:

- #63810
- #63786
- #61635
- #58044

reverting their contents to have the match or if expressions they originally contained.

r? @oli-obk

There's one more PR in those tagged with `const-hack` that originally wasn't merged (#65107). Reading the thread, it looks like it was originally closed because the `const-hack` for the checked arithmetic non-negligibly hurt performance, and because there was no way to manipulate the returned Option at compile time anyway (with neither const if nor const match). Would you like me to add these changes to the changes from this PR here too, now that we have the necessary features?

4 years agoRollup merge of #67622 - gilescope:async-keyword-doc, r=Centril
Yuki Okushi [Mon, 30 Dec 2019 05:07:49 +0000 (14:07 +0900)]
Rollup merge of #67622 - gilescope:async-keyword-doc, r=Centril

Some keyword documentation.

I thought about going into detail, but I'd much rather route them to the async book asap.

4 years agoRollup merge of #67564 - Mark-Simulacrum:iter-adapter-panic, r=LukasKalbertodt
Yuki Okushi [Mon, 30 Dec 2019 05:07:47 +0000 (14:07 +0900)]
Rollup merge of #67564 - Mark-Simulacrum:iter-adapter-panic, r=LukasKalbertodt

docs: Iterator adapters have unspecified results after a panic

Fixes #58170.

That issue also has rough consensus from 3 members of the library team for this being the behavior we would like to specify.

4 years agoRollup merge of #67287 - Centril:mismatch-range-improve-diag, r=estebank
Yuki Okushi [Mon, 30 Dec 2019 05:07:46 +0000 (14:07 +0900)]
Rollup merge of #67287 - Centril:mismatch-range-improve-diag, r=estebank

typeck: note other end-point when checking range pats

Fixes #57389, alternative to #67214 that should be less invasive to type checking logic.

r? @estebank

4 years agoRollup merge of #64273 - petrochenkov:stabattrmod, r=Centril
Yuki Okushi [Mon, 30 Dec 2019 05:07:44 +0000 (14:07 +0900)]
Rollup merge of #64273 - petrochenkov:stabattrmod, r=Centril

Stabilize attribute macros on inline modules

While still gating non-inline modules in proc macro input.

Split from https://github.com/rust-lang/rust/pull/63931
cc https://github.com/rust-lang/rust/issues/54727

4 years agoAdd self to mailmap.
jumbatm [Mon, 30 Dec 2019 03:59:23 +0000 (13:59 +1000)]
Add self to mailmap.

4 years agofix review comment
mark [Sun, 29 Dec 2019 20:19:05 +0000 (14:19 -0600)]
fix review comment

4 years agoGet rid of ErrorReportingCtx
mark [Sat, 21 Dec 2019 05:59:31 +0000 (23:59 -0600)]
Get rid of ErrorReportingCtx

4 years agoreview comments
Esteban Küber [Fri, 27 Dec 2019 23:45:39 +0000 (15:45 -0800)]
review comments

4 years agoclean up logic
Esteban Küber [Fri, 27 Dec 2019 12:15:48 +0000 (04:15 -0800)]
clean up logic

4 years agoreview comments
Esteban Küber [Thu, 26 Dec 2019 22:01:45 +0000 (14:01 -0800)]
review comments

4 years agoFormat and fix rebase
Esteban Küber [Thu, 26 Dec 2019 21:25:04 +0000 (13:25 -0800)]
Format and fix rebase

4 years agoAccount for existing type params when suggesting replacing `_` for a new one
Esteban Küber [Tue, 24 Dec 2019 23:12:01 +0000 (15:12 -0800)]
Account for existing type params when suggesting replacing `_` for a new one

4 years agoAccount for all item kinds when collecting and gateing `_` in item defs
Esteban Küber [Tue, 24 Dec 2019 21:18:09 +0000 (13:18 -0800)]
Account for all item kinds when collecting and gateing `_` in item defs

4 years agoSuggest type param when encountering `_` in fn defs
Esteban Küber [Mon, 23 Dec 2019 22:16:34 +0000 (14:16 -0800)]
Suggest type param when encountering `_` in fn defs

When encountering `_` type placeholder in fn arguments and return type,
suggest using generic type parameters.
Expand what counts as an inferable return type to slice, array and
tuples of `_`.

4 years agoAuto merge of #67631 - oli-obk:polymorphic_promotion, r=wesleywiser
bors [Mon, 30 Dec 2019 02:05:24 +0000 (02:05 +0000)]
Auto merge of #67631 - oli-obk:polymorphic_promotion, r=wesleywiser

Work around a resolve bug in const prop

r? @wesleywiser @anp

This isn't exposed right now, but further changes to rustc may start causing bugs without this.

4 years agoTypo fix
Peter Todd [Mon, 30 Dec 2019 01:50:01 +0000 (20:50 -0500)]
Typo fix

4 years agonote other end-point when typeck range pats
Mazdak Farrokhzad [Fri, 13 Dec 2019 22:33:58 +0000 (23:33 +0100)]
note other end-point when typeck range pats

4 years agoAuto merge of #66942 - cjgillot:hirene-ty, r=Zoxc
bors [Sun, 29 Dec 2019 22:51:02 +0000 (22:51 +0000)]
Auto merge of #66942 - cjgillot:hirene-ty, r=Zoxc

Allocate HIR on an arena 3/4 -- Ty

This is the third PR in the series started by #66931 and #66936

Once again, 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-expr...hirene-ty

4 years agoResolve long compile times when evaluating always valid constants
Wesley Wiser [Fri, 27 Dec 2019 19:33:22 +0000 (14:33 -0500)]
Resolve long compile times when evaluating always valid constants

This extends the existing logic which skips validating every integer or
floating point number type to also skip validating empty structs because
they are also trivially valid.

Fixes #67539

4 years agoAuto merge of #67112 - Centril:expr-polish, r=estebank
bors [Sun, 29 Dec 2019 19:30:53 +0000 (19:30 +0000)]
Auto merge of #67112 - Centril:expr-polish, r=estebank

Refactor expression parsing thoroughly

Based on https://github.com/rust-lang/rust/pull/66994 together with which this has refactored basically the entirety of `expr.rs`.

r? @estebank

4 years agoAuto merge of #67661 - JohnTitor:clippy-cargo, r=oli-obk
bors [Sun, 29 Dec 2019 16:12:57 +0000 (16:12 +0000)]
Auto merge of #67661 - JohnTitor:clippy-cargo, r=oli-obk

Update Clippy and cargo

includes latest rustup and resolves dependency conflicts with cargo
Closes #67541

r? @oli-obk @Manishearth

4 years agoIntroduce librustc/middle/mod.rs
Camille GILLOT [Sun, 29 Dec 2019 10:57:30 +0000 (11:57 +0100)]
Introduce librustc/middle/mod.rs

4 years agoMove get_lib_features query in librustc_passes.
Camille GILLOT [Fri, 27 Dec 2019 17:52:36 +0000 (18:52 +0100)]
Move get_lib_features query in librustc_passes.

4 years agoMove lib_features.rs in librustc_passes.
Camille GILLOT [Fri, 27 Dec 2019 17:43:22 +0000 (18:43 +0100)]
Move lib_features.rs in librustc_passes.

4 years agotidy: Enforce formatting rather than just check it if `--bless` is specified
Vadim Petrochenkov [Sun, 29 Dec 2019 11:31:54 +0000 (14:31 +0300)]
tidy: Enforce formatting rather than just check it if `--bless` is specified

4 years agoMove diagnostic_items queries to librustc_passes.
Camille GILLOT [Thu, 26 Dec 2019 22:33:40 +0000 (23:33 +0100)]
Move diagnostic_items queries to librustc_passes.

4 years agoMove diagnostic_items.rs to librustc_passes.
Camille GILLOT [Thu, 26 Dec 2019 22:26:24 +0000 (23:26 +0100)]
Move diagnostic_items.rs to librustc_passes.

4 years agoMove reachable_set query in librustc_passes.
Camille GILLOT [Thu, 26 Dec 2019 22:24:36 +0000 (23:24 +0100)]
Move reachable_set query in librustc_passes.

4 years agoMove reachable.rs to librustc_passes.
Camille GILLOT [Thu, 26 Dec 2019 19:03:45 +0000 (20:03 +0100)]
Move reachable.rs to librustc_passes.

4 years agoAuto merge of #67694 - Dylan-DPC:rollup-wxxm9yu, r=Dylan-DPC
bors [Sun, 29 Dec 2019 09:33:04 +0000 (09:33 +0000)]
Auto merge of #67694 - Dylan-DPC:rollup-wxxm9yu, r=Dylan-DPC

Rollup of 3 pull requests

Successful merges:

 - #67482 (Fix outdated comment)
 - #67673 (Update .mailmap)
 - #67679 (Change "be returning" to "return")

Failed merges:

r? @ghost

4 years agoSome keyword documentation.
Giles Cope [Wed, 25 Dec 2019 22:59:26 +0000 (22:59 +0000)]
Some keyword documentation.

4 years agoUpdate Cargo.lock
Yuki Okushi [Fri, 27 Dec 2019 14:40:18 +0000 (23:40 +0900)]
Update Cargo.lock

4 years agoUpdate cargo
Yuki Okushi [Fri, 27 Dec 2019 14:40:09 +0000 (23:40 +0900)]
Update cargo

4 years agoUpdate Clippy
Yuki Okushi [Fri, 27 Dec 2019 14:40:01 +0000 (23:40 +0900)]
Update Clippy

4 years agoRollup merge of #67679 - kraai:change-be-returning-to-return, r=Dylan-DPC
Dylan DPC [Sun, 29 Dec 2019 07:39:59 +0000 (13:09 +0530)]
Rollup merge of #67679 - kraai:change-be-returning-to-return, r=Dylan-DPC

Change "be returning" to "return"

4 years agoRollup merge of #67673 - JohnTitor:mailmap, r=Dylan-DPC
Dylan DPC [Sun, 29 Dec 2019 07:39:58 +0000 (13:09 +0530)]
Rollup merge of #67673 - JohnTitor:mailmap, r=Dylan-DPC

Update .mailmap

r? @Mark-Simulacrum

4 years agoRollup merge of #67482 - ldm0:master, r=petrochenkov
Dylan DPC [Sun, 29 Dec 2019 07:39:56 +0000 (13:09 +0530)]
Rollup merge of #67482 - ldm0:master, r=petrochenkov

Fix outdated comment

Logics in `libsyntax/ext/expand.rs:MacroExpander::expand()` have been moved to `libsyntax_expand/expand.rs:MacroExpander::fully_expand_fragment()`
This pull request fixs the dangling file path.

#### Old

https://github.com/rust-lang/rust/blob/35176867f62f76b9bc27267878f2d74d9c776221/src/libsyntax/ext/expand.rs#L285-L301

#### New

https://github.com/rust-lang/rust/blob/9ff30a7810c586819a78188c173a7b74adbb9730/src/libsyntax_expand/expand.rs#L421-L439

https://github.com/rust-lang/rust/blob/9ff30a7810c586819a78188c173a7b74adbb9730/src/libsyntax_expand/base.rs#L224-L234

4 years agoAuto merge of #67614 - Mark-Simulacrum:global-callbacks, r=Zoxc
bors [Sun, 29 Dec 2019 04:30:56 +0000 (04:30 +0000)]
Auto merge of #67614 - Mark-Simulacrum:global-callbacks, r=Zoxc

Set callbacks globally

This sets the callbacks from syntax and rustc_errors just once, utilizing static (rather than thread-local) storage.

4 years agoEnsure that we don't cause *new* hard errors if we suddenly can evaluate more constan...
Oliver Scherer [Sat, 28 Dec 2019 23:26:25 +0000 (00:26 +0100)]
Ensure that we don't cause *new* hard errors if we suddenly can evaluate more constants during const prop

4 years agoAuto merge of #67334 - estebank:ignore-triple, r=nikomatsakis
bors [Sat, 28 Dec 2019 23:02:09 +0000 (23:02 +0000)]
Auto merge of #67334 - estebank:ignore-triple, r=nikomatsakis

Teach `compiletest` to ignore platform triples

The UI tests are written assuming `--remap-path-prefix` is *not used* (`remap-debuginfo` in `config.toml`). The consequence is that the error messages may include paths and snippets into the standard library. When `remap-debuginfo` is enabled, these messages change in format and structure because `rustc` will not show paths and snippets into the standard library.

This normally isn't a problem for the "main" platforms (linux/macos/windows), because the CI infrastructure is set up so that the tests run without `remap-debuginfo`, but the `dist` artifacts are built separately with `remap-debuginfo` enabled. However, some of the lower-tier platforms perform both tests and distribution in a single step with `remap-debuginfo` enabled. This also affects developers and distributors who use `remap-debuginfo`.

To sidestep this problem, we add a way to ignore tests in specific platform triples, and update the overly broad `ignore-x86` rule in affected tests.

Address #46948, #54546, #53081.

4 years agoDo not ICE on lifetime error involving closures
Esteban Küber [Sat, 28 Dec 2019 21:51:29 +0000 (13:51 -0800)]
Do not ICE on lifetime error involving closures

4 years agoIgnore i586-unknown-linux-gnu and i586-unknown-musl in tests
Esteban Küber [Sun, 15 Dec 2019 20:08:06 +0000 (12:08 -0800)]
Ignore i586-unknown-linux-gnu and i586-unknown-musl in tests

4 years agoAuto merge of #67151 - petrochenkov:docomm, r=estebank
bors [Sat, 28 Dec 2019 19:23:36 +0000 (19:23 +0000)]
Auto merge of #67151 - petrochenkov:docomm, r=estebank

doc comments: Less attribute mimicking

Make sure doc comments are not converted into intermediate meta-items, or not mixed with `doc(inline)` or something like that.

Follow-up to https://github.com/rust-lang/rust/pull/65750.

4 years agoAvoid copying some undef memory in MIR
Santiago Pastorino [Fri, 27 Dec 2019 18:50:56 +0000 (15:50 -0300)]
Avoid copying some undef memory in MIR

During MIR interpretation it may happen that a place containing
uninitialized bytes is copied. This would read the current
representation of these bytes and write it to the destination even
though they must, by definition, not matter to the execution.

This elides that representation change when no bytes are defined in such
a copy, saving some cpu cycles. In such a case, the memory of the target
allocation is not touched at all which also means that sometimes no
physical page backing the memory allocation of the representation needs
to be provided by the OS at all, reducing memory pressure on the system.

4 years agoAuto merge of #67459 - ssomers:#67438, r=RalfJung
bors [Sat, 28 Dec 2019 16:04:40 +0000 (16:04 +0000)]
Auto merge of #67459 - ssomers:#67438, r=RalfJung

prune ill-conceived BTreeMap iter_mut assertion and test its mutability

Proposal to deal with #67438 (and I'm more sure now that this is the right thing to do).
Passes testing with miri.