]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agofix src/test fallout
Mazdak Farrokhzad [Wed, 1 Jan 2020 23:01:07 +0000 (00:01 +0100)]
fix src/test fallout

4 years agosyntax::map_in_place: leave fixme
Mazdak Farrokhzad [Wed, 1 Jan 2020 20:11:02 +0000 (21:11 +0100)]
syntax::map_in_place: leave fixme

4 years agoNormalize `syntax::edition` imports.
Mazdak Farrokhzad [Wed, 1 Jan 2020 18:40:49 +0000 (19:40 +0100)]
Normalize `syntax::edition` imports.

4 years agoNormalize `syntax::symbol` imports.
Mazdak Farrokhzad [Wed, 1 Jan 2020 18:30:57 +0000 (19:30 +0100)]
Normalize `syntax::symbol` imports.

4 years agoNormalize `syntax::source_map` imports.
Mazdak Farrokhzad [Wed, 1 Jan 2020 18:25:28 +0000 (19:25 +0100)]
Normalize `syntax::source_map` imports.

4 years agoAuto merge of #67779 - Amanieu:ehabi_fix, r=Mark-Simulacrum
bors [Thu, 2 Jan 2020 07:04:20 +0000 (07:04 +0000)]
Auto merge of #67779 - Amanieu:ehabi_fix, r=Mark-Simulacrum

Update the barrier cache during ARM EHABI unwinding

Fixes #67242

r? @alexcrichton

4 years agoAuto merge of #67700 - cjgillot:passes-stability, r=Zoxc
bors [Thu, 2 Jan 2020 03:52:42 +0000 (03:52 +0000)]
Auto merge of #67700 - cjgillot:passes-stability, r=Zoxc

Move stability queries to librustc_passes.

Contains:
- check_mod_unstable_api_usage query;
- stability_index query;
- check_unused_or_stable features pass.

Split out of #67688

r? @Zoxc

4 years agoAuto merge of #67689 - mark-i-m:update-guide, r=JohnTitor
bors [Thu, 2 Jan 2020 00:37:03 +0000 (00:37 +0000)]
Auto merge of #67689 - mark-i-m:update-guide, r=JohnTitor

Update rustc-guide

r? @ehuss

cc @rust-lang/wg-learning

4 years agoAuto merge of #67676 - wesleywiser:lint_overflowing_int_casts, r=oli-obk
bors [Wed, 1 Jan 2020 21:27:11 +0000 (21:27 +0000)]
Auto merge of #67676 - wesleywiser:lint_overflowing_int_casts, r=oli-obk

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.

r? @oli-obk

4 years agoIgnore overflow lint on 32-bit platform
Wesley Wiser [Wed, 1 Jan 2020 17:30:17 +0000 (12:30 -0500)]
Ignore overflow lint on 32-bit platform

4 years agoupdate rustc-guide
Mark Mansi [Sat, 28 Dec 2019 23:05:55 +0000 (17:05 -0600)]
update rustc-guide

4 years agoUpdate the barrier cache during ARM EHABI unwinding
Amanieu d'Antras [Wed, 1 Jan 2020 16:11:45 +0000 (17:11 +0100)]
Update the barrier cache during ARM EHABI unwinding

4 years agoAuto merge of #67729 - mati865:deps, r=nikomatsakis
bors [Wed, 1 Jan 2020 15:10:48 +0000 (15:10 +0000)]
Auto merge of #67729 - mati865:deps, r=nikomatsakis

Bump smallvec

4 years agoMove stability queries to librustc_passes.
Camille GILLOT [Sun, 29 Dec 2019 10:20:20 +0000 (11:20 +0100)]
Move stability queries to librustc_passes.

Contains:
- check_mod_unstable_api_usage query;
- stability_index query;
- check_unused_or_stable features pass.

4 years agoMove stability.rs to librustc_passes.
Camille GILLOT [Sun, 29 Dec 2019 10:20:15 +0000 (11:20 +0100)]
Move stability.rs to librustc_passes.

4 years agoAuto merge of #67471 - nnethercote:revert-66405, r=nikomatsakis
bors [Wed, 1 Jan 2020 11:54:21 +0000 (11:54 +0000)]
Auto merge of #67471 - nnethercote:revert-66405, r=nikomatsakis

Revert parts of #66405.

Because PR #66405 caused major performance regressions in some cases.

That PR had five commits, two of which affected performance, and three
of which were refactorings. This change undoes the performance-affecting
changes, while keeping the refactorings in place.

Fixes #67454.

r? @nikomatsakis

4 years agoAuto merge of #67763 - petrochenkov:crateren2, r=Centril
bors [Wed, 1 Jan 2020 08:39:44 +0000 (08:39 +0000)]
Auto merge of #67763 - petrochenkov:crateren2, r=Centril

Rename `syntax_pos` to `rustc_span` in source code

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

r? @Centril

4 years agoRename `syntax_pos` to `rustc_span` in source code
Vadim Petrochenkov [Tue, 31 Dec 2019 17:15:40 +0000 (20:15 +0300)]
Rename `syntax_pos` to `rustc_span` in source code

4 years agoRevert parts of #66405.
Nicholas Nethercote [Fri, 20 Dec 2019 23:53:41 +0000 (10:53 +1100)]
Revert parts of #66405.

Because it caused major performance regressions in some cases.

That PR had five commits, two of which affected performance, and three
of which were refactorings. This change undoes the performance-affecting
changes, while keeping the refactorings in place.

Fixes #67454.

4 years agoAuto merge of #67726 - JohnTitor:clippy-up, r=oli-obk
bors [Tue, 31 Dec 2019 22:51:24 +0000 (22:51 +0000)]
Auto merge of #67726 - JohnTitor:clippy-up, r=oli-obk

Update Clippy

Fixes #67716
r? @oli-obk

4 years agoAuto merge of #67764 - Centril:rollup-ycbq3os, r=Centril
bors [Tue, 31 Dec 2019 19:41:36 +0000 (19:41 +0000)]
Auto merge of #67764 - Centril:rollup-ycbq3os, r=Centril

Rollup of 6 pull requests

Successful merges:

 - #67574 (Extract `rustc_ast_lowering` crate from `rustc`)
 - #67685 (Constify Result)
 - #67702 (Add symbol normalization for proc_macro_server.)
 - #67730 (Cleanup pattern type checking, fix diagnostics bugs (+ improvements))
 - #67744 (parser: reduce diversity in error handling mechanisms)
 - #67748 (Use function attribute "frame-pointer" instead of "no-frame-pointer-elim")

Failed merges:

r? @ghost

4 years agoRollup merge of #67748 - MaskRay:frame-pointer, r=rkruppe
Mazdak Farrokhzad [Tue, 31 Dec 2019 18:19:39 +0000 (19:19 +0100)]
Rollup merge of #67748 - MaskRay:frame-pointer, r=rkruppe

Use function attribute "frame-pointer" instead of "no-frame-pointer-elim"

LLVM 8 ([D56351](http://reviews.llvm.org/D56351)) introduced "frame-pointer". In LLVM 10 (D71863),
"no-frame-pointer-elim"/"no-frame-pointer-elim-non-leaf" will be
ignored.

-----

In the LLVM monorepo, run `git show origin/release/8.x:llvm/lib/CodeGen/TargetOptionsImpl.cpp` to see that `"frame-pointer"` is available since LLVM 8.

4 years agoRollup merge of #67744 - Centril:reduce-diversity, r=petrochenkov
Mazdak Farrokhzad [Tue, 31 Dec 2019 18:19:38 +0000 (19:19 +0100)]
Rollup merge of #67744 - Centril:reduce-diversity, r=petrochenkov

parser: reduce diversity in error handling mechanisms

Instead of having e.g. `span_err`, `fatal`, etc., we prefer to move towards uniformly using `struct_span_err` thus making it harder to emit fatal and/or unstructured diagnostics.

This PR also de-fatalizes some diagnostics.

r? @estebank

4 years agoRollup merge of #67730 - Centril:typeck-pat-cleanup, r=estebank
Mazdak Farrokhzad [Tue, 31 Dec 2019 18:19:36 +0000 (19:19 +0100)]
Rollup merge of #67730 - Centril:typeck-pat-cleanup, r=estebank

Cleanup pattern type checking, fix diagnostics bugs (+ improvements)

r? @estebank

4 years agoRollup merge of #67702 - crlf0710:normalize_ident2, r=petrochenkov
Mazdak Farrokhzad [Tue, 31 Dec 2019 18:19:34 +0000 (19:19 +0100)]
Rollup merge of #67702 - crlf0710:normalize_ident2, r=petrochenkov

Add symbol normalization for proc_macro_server.

Follow up for #66670, finishing the first bullet point in #55467.

r? @petrochenkov

4 years agoRollup merge of #67685 - lukaslueg:const_result, r=oli-obk
Mazdak Farrokhzad [Tue, 31 Dec 2019 18:19:33 +0000 (19:19 +0100)]
Rollup merge of #67685 - lukaslueg:const_result, r=oli-obk

Constify Result

r? @oli-obk

This is just the `Result`-part of #67494 which I'll resubmit once #66254 has landed.

4 years agoRollup merge of #67574 - Centril:librustc_lowering, r=Mark-Simulacrum
Mazdak Farrokhzad [Tue, 31 Dec 2019 18:19:31 +0000 (19:19 +0100)]
Rollup merge of #67574 - Centril:librustc_lowering, r=Mark-Simulacrum

Extract `rustc_ast_lowering` crate from `rustc`

Working towards https://github.com/rust-lang/rust/issues/65031.

This PR moves `src/librustc/hir/lowering{/, .rs}` to its own crate (`librustc_ast_lowering`) which is very self-contained (only `fn lower_crate` and `trait Resolver` are exposed).

r? @Mark-Simulacrum

4 years agonix `lower_label` identity function.
Mazdak Farrokhzad [Tue, 24 Dec 2019 02:52:56 +0000 (03:52 +0100)]
nix `lower_label` identity function.

4 years agolibrustc_ast_lowering: fix misc fallout.
Mazdak Farrokhzad [Sun, 22 Dec 2019 17:15:02 +0000 (18:15 +0100)]
librustc_ast_lowering: fix misc fallout.

4 years agolibrustc_ast_lowering: cargo changes.
Mazdak Farrokhzad [Sun, 22 Dec 2019 17:12:56 +0000 (18:12 +0100)]
librustc_ast_lowering: cargo changes.

4 years agolibrustc_ast_lowering: move the files.
Mazdak Farrokhzad [Sun, 22 Dec 2019 17:08:34 +0000 (18:08 +0100)]
librustc_ast_lowering: move the files.

4 years agoAuto merge of #67699 - cjgillot:passes-resolve, r=Zoxc
bors [Tue, 31 Dec 2019 16:21:10 +0000 (16:21 +0000)]
Auto merge of #67699 - cjgillot:passes-resolve, r=Zoxc

Move resolve_lifetimes query in librustc_resolve.

Split out of #67688

r? @Zoxc

4 years agoConstify Result
Lukas Lueg [Sat, 28 Dec 2019 20:33:36 +0000 (21:33 +0100)]
Constify Result

4 years agoAuto merge of #67752 - Dylan-DPC:rollup-7f9v4nx, r=Dylan-DPC
bors [Tue, 31 Dec 2019 12:58:10 +0000 (12:58 +0000)]
Auto merge of #67752 - Dylan-DPC:rollup-7f9v4nx, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #67430 (doc: minus (U+2212) instead of dash (U+002D) for negative infinity)
 - #67697 (Move the region_scope_tree query to librustc_passes.)
 - #67719 (Add self to .mailmap)
 - #67723 (Add error code explanation for E0477)
 - #67735 (Support `-Z ui-testing=yes/no`)

Failed merges:

r? @ghost

4 years agoRollup merge of #67735 - petrochenkov:uibool, r=Mark-Simulacrum
Dylan DPC [Tue, 31 Dec 2019 12:44:07 +0000 (18:14 +0530)]
Rollup merge of #67735 - petrochenkov:uibool, r=Mark-Simulacrum

Support `-Z ui-testing=yes/no`

`ui-testing` is now a boolean option (`-Z ui-testing=yes/no`) and can be specified multiple times with later values overriding earlier values (`-Z ui-testing=yes -Z ui-testing=no` == `-Z ui-testing=no`), so it can be set in a hierarchical way, e.g. UI testing infra may enable it by default with specific tests being able to opt-out.

This way we can remove the special opt-out support from `compiletest`.

Inspired by https://github.com/rust-lang/rust/pull/67709.

4 years agoRollup merge of #67723 - ldm0:E0477, r=Dylan-DPC
Dylan DPC [Tue, 31 Dec 2019 12:44:06 +0000 (18:14 +0530)]
Rollup merge of #67723 - ldm0:E0477, r=Dylan-DPC

Add error code explanation for E0477

Part of #61137

4 years agoRollup merge of #67719 - jumbatm:add-self-to-mailmap, r=Mark-Simulacrum
Dylan DPC [Tue, 31 Dec 2019 12:44:04 +0000 (18:14 +0530)]
Rollup merge of #67719 - jumbatm:add-self-to-mailmap, r=Mark-Simulacrum

Add self to .mailmap

r? @Mark-Simulacrum

Cheers.

4 years agoRollup merge of #67697 - cjgillot:passes-scope-tree, r=Zoxc
Dylan DPC [Tue, 31 Dec 2019 12:44:03 +0000 (18:14 +0530)]
Rollup merge of #67697 - cjgillot:passes-scope-tree, r=Zoxc

Move the region_scope_tree query to librustc_passes.

Split out of #67688.

r? @Zoxc

4 years agoRollup merge of #67430 - tspiteri:minus-inf, r=Dylan-DPC
Dylan DPC [Tue, 31 Dec 2019 12:44:01 +0000 (18:14 +0530)]
Rollup merge of #67430 - tspiteri:minus-inf, r=Dylan-DPC

doc: minus (U+2212) instead of dash (U+002D) for negative infinity

The documentation for [`f32::NEG_INFINITY`](https://doc.rust-lang.org/std/f32/constant.NEG_INFINITY.html) contains “-∞” with a dash instead of a minus sign, “−∞” with a proper minus sign looks better with the used Source Serif Pro font. Similarly for [`f64::NEG_INFINITY`](https://doc.rust-lang.org/std/f64/constant.NEG_INFINITY.html).

4 years agoUpdate Clippy
Yuki Okushi [Mon, 30 Dec 2019 11:27:26 +0000 (20:27 +0900)]
Update Clippy

4 years agoAuto merge of #67597 - estebank:placeholder-type, r=oli-obk
bors [Tue, 31 Dec 2019 09:50:49 +0000 (09:50 +0000)]
Auto merge of #67597 - estebank:placeholder-type, r=oli-obk

Suggest type param when encountering `_` in item signatures

Fix #27435.

4 years agoSimplify ResolveLiftimes creation.
Camille GILLOT [Mon, 30 Dec 2019 11:48:32 +0000 (12:48 +0100)]
Simplify ResolveLiftimes creation.

4 years agoReview comments.
Camille GILLOT [Sun, 29 Dec 2019 19:45:48 +0000 (20:45 +0100)]
Review comments.

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

4 years agoMove resolve_lifetimes query in librustc_resolve.
Camille GILLOT [Sun, 29 Dec 2019 09:48:52 +0000 (10:48 +0100)]
Move resolve_lifetimes query in librustc_resolve.

4 years agoMove resolve_lifetime.rs to librustc_resolve.
Camille GILLOT [Sun, 29 Dec 2019 09:47:49 +0000 (10:47 +0100)]
Move resolve_lifetime.rs to librustc_resolve.

4 years agoUse function attribute "frame-pointer" instead of "no-frame-pointer-elim"
Fangrui Song [Tue, 31 Dec 2019 05:35:13 +0000 (21:35 -0800)]
Use function attribute "frame-pointer" instead of "no-frame-pointer-elim"

LLVM 8 (D56351) introduced "frame-pointer". In LLVM 10 (D71863),
"no-frame-pointer-elim"/"no-frame-pointer-elim-non-leaf" will be
ignored.

4 years agoparser: bug -> span_bug
Mazdak Farrokhzad [Tue, 31 Dec 2019 03:30:55 +0000 (04:30 +0100)]
parser: bug -> span_bug

4 years agoparser::diagnostics: remove fn fatal
Mazdak Farrokhzad [Tue, 31 Dec 2019 03:21:58 +0000 (04:21 +0100)]
parser::diagnostics: remove fn fatal

4 years agoparser::pat: remove .fatal calls
Mazdak Farrokhzad [Tue, 31 Dec 2019 02:36:45 +0000 (03:36 +0100)]
parser::pat: remove .fatal calls

4 years agoparser::path: remove .fatal calls
Mazdak Farrokhzad [Tue, 31 Dec 2019 00:57:42 +0000 (01:57 +0100)]
parser::path: remove .fatal calls

4 years agoparser::module: remove .fatal calls
Mazdak Farrokhzad [Tue, 31 Dec 2019 00:28:10 +0000 (01:28 +0100)]
parser::module: remove .fatal calls

4 years agoparser::item: remove .fatal calls
Mazdak Farrokhzad [Tue, 31 Dec 2019 00:19:53 +0000 (01:19 +0100)]
parser::item: remove .fatal calls

4 years agoparser::attr: remove .fatal calls
Mazdak Farrokhzad [Tue, 31 Dec 2019 00:13:00 +0000 (01:13 +0100)]
parser::attr: remove .fatal calls

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 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 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