103029 Commits

Author SHA1 Message Date
Dylan MacKenzie
f4b9dc7d59 Make name work for MatchSource 2019-11-21 14:20:00 -08:00
Dylan MacKenzie
929ff68376 Hold a TyCtxt in the HIR const-checker 2019-11-21 14:20:00 -08:00
Dylan MacKenzie
a98d20a260 Allow Downcast projections if const_if_match enabled
These are generated when matching on enum variants to extract the value
within. We should have no problem evaluating these, but care should be
taken that we aren't accidentally allowing some other operation.
2019-11-21 14:20:00 -08:00
Dylan MacKenzie
e969fb2176 Don't transform short-circuiting logic if const_if_match enabled 2019-11-21 14:20:00 -08:00
Dylan MacKenzie
365d123689 Add feature gate for const if and match 2019-11-21 14:19:59 -08:00
Dylan MacKenzie
c537f22900 Give name to full regex capture 2019-11-21 14:13:42 -08:00
Dylan MacKenzie
ae2293837e Change some tests to use the shorter comment style 2019-11-21 14:09:18 -08:00
Dylan MacKenzie
701f6e51b2 Fix broken incremental test
This test does not actually emit any warnings, since
`#![allow(warnings)]` was specified. `compiletest` was erroneously
ignoring `//~` tests and looking only for `//[X]~` ones. As a result of
the changes in the previous commit, we now look for `//~` comments in
incremental tests and expect them to appear in *all* revisions.
2019-11-21 14:08:33 -08:00
Dylan MacKenzie
54d51bc483 Allow multiple cfgs per comment in "revisions:" tests
The `//[X]~` syntax filters errors for tests that are run across
multiple cfgs with  `// revisions:`. This commit extends that syntax to
accept `//[X,Y]~`, which will match multiple cfgs to the same error
annotation. This is functionally the same as writing two comments,
`//[X]~` and `//[Y]~`, but can fit on a single line.
2019-11-21 14:08:33 -08:00
Matthew Jasper
bccc59a8e6 Address review comments 2019-11-21 21:20:47 +00:00
bors
f11759d38c Auto merge of #66610 - alexreg:trait-upcasting-cosmetic, r=Centril
Aggregation of drive-by cosmetic changes for trait-upcasting PR

Cherry-picked from #60900.

As requested by @Centril (and @nikomatsakis, I believe).

r? @Centril
2019-11-21 21:01:14 +00:00
Matthew Jasper
025630d189 Bless remaining test output 2019-11-21 20:55:17 +00:00
Matthew Jasper
9abc34ed9d Track pointers to statics in MIR 2019-11-21 20:55:17 +00:00
Matthew Jasper
c6d97dfd83 Fix rebase 2019-11-21 20:55:17 +00:00
Santiago Pastorino
47a3294a1c Readjust constant evaluation for operands 2019-11-21 20:54:55 +00:00
Santiago Pastorino
36006955e7 Simplify pattern 2019-11-21 20:54:55 +00:00
Santiago Pastorino
ae9677c82f Readjust const qualification to detect statics again 2019-11-21 20:54:55 +00:00
Oliver Scherer
a1d04cc1d8 Remove statics from HAIR by lowering them to a pointer constant 2019-11-21 20:54:33 +00:00
Mazdak Farrokhzad
2f00e86cb5 Introduce MIR optimizations for simplifying x? on Results.
This optimization depends on inlining for the identity
conversions introduced by the lowering of the `?`.
To take advantage of `SimplifyArmIdentity`, `-Z mir-opt-level=2`
is required because that triggers the inlining MIR optimization.
2019-11-21 20:05:16 +01:00
Alexander Regueiro
1b2de17647 Applied suggestions from code review. 2019-11-21 18:50:40 +00:00
Alexander Regueiro
51cb60cd3f Aggregation of drive-by cosmetic changes. 2019-11-21 18:50:38 +00:00
bors
53712f8637 Auto merge of #66389 - estebank:type-err-labels, r=petrochenkov
Specific labels when referring to "expected" and "found" types
2019-11-21 17:53:19 +00:00
QuietMisdreavus
0d7a7b5547 move cfg(doc) docs into a separate page 2019-11-21 15:38:30 +01:00
Guillaume Gomez
a056bf9714 Rename the cfg attribute from rustdoc to doc 2019-11-21 15:38:30 +01:00
Guillaume Gomez
086c8d3db7 Stabilize cfg rustdoc 2019-11-21 15:37:36 +01:00
bors
35ef33a89d Auto merge of #66607 - Centril:rollup-yb7cl73, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #65355 (Stabilize `!` in Rust 1.41.0)
 - #65730 (Suggest to add lifetime constraint at explicit ouput of functions)
 - #66468 (Cleanup Miri SIMD intrinsics)
 - #66515 (Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`)
 - #66602 (Revert "Update Source Code Pro and include italics")

Failed merges:

r? @ghost
2019-11-21 14:30:02 +00:00
Mazdak Farrokhzad
5ab2bccbcd
Rollup merge of #66602 - GuillaumeGomez:revert-font, r=GuillaumeGomez
Revert "Update Source Code Pro and include italics"

This reverts commit ea9519bf16f0be137a814a49c9fbaf232ba49a43.
2019-11-21 15:29:08 +01:00
Mazdak Farrokhzad
d7bb37d663
Rollup merge of #66515 - Centril:cheaper-inline-asm, r=oli-obk
Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`

r? @oli-obk
2019-11-21 15:29:07 +01:00
Mazdak Farrokhzad
02b38ac0ff
Rollup merge of #66468 - RalfJung:simd-cleanup, r=oli-obk
Cleanup Miri SIMD intrinsics

r? @oli-obk @eddyb Cc @gnzlbg
2019-11-21 15:29:05 +01:00
Mazdak Farrokhzad
e4a634189e
Rollup merge of #65730 - csmoe:return-lifetime, r=nikomatsakis
Suggest to add lifetime constraint at explicit ouput of functions

Closes #62097
2019-11-21 15:29:02 +01:00
Mazdak Farrokhzad
0828d5327b
Rollup merge of #65355 - Centril:almost-is-never-enough, r=oli-obk
Stabilize `!` in Rust 1.41.0

This PR stabilizes the `never_type` (written `!`). The type represents computations that we know diverge in the type system and therefore has no values / inhabitants / elements / members.

The current nightly version is 1.40.0 which will become stable on 2019-12-19.

Tracking issue: https://github.com/rust-lang/rust/issues/35121.
Closes https://github.com/rust-lang/rust/issues/57012.
Closes https://github.com/rust-lang/rust/issues/58184.
Original stabilization report: https://github.com/rust-lang/rust/issues/57012#issuecomment-452398538

Additional notes:

- In #62661 we reserved `impl<T> From<!> for T` so this concern should be resolved.
- The type inference fallback change is moved to `#![feature(never_type_fallback)]` (https://github.com/rust-lang/rust/issues/65992).
- You can find all of the tests referencing `never_type` in this PR which also reorganizes these tests whereas they were more scattered before.

r? @nikomatsakis
2019-11-21 15:29:00 +01:00
Mazdak Farrokhzad
238d03b3a3 never_type: test interaction with auto traits 2019-11-21 15:09:18 +01:00
Mazdak Farrokhzad
089229a193 Redefine core::convert::Infallible as !. 2019-11-21 14:55:33 +01:00
Mazdak Farrokhzad
6eb0627b49 Gate fallback via #![feature(never_type_fallback)]. 2019-11-21 14:55:33 +01:00
Mazdak Farrokhzad
8f6197f39f Remove #![feature(never_type)] from tests.
Also remove `never_type` the feature-gate test.
2019-11-21 14:55:32 +01:00
Mazdak Farrokhzad
15c30ddd69 Stabilize the never_type, written !. 2019-11-21 14:55:32 +01:00
Guillaume Gomez
df9fed17ed Update tidy check for error codes testing 2019-11-21 13:12:43 +01:00
Nadrieril
3f917120a0 Reuse pat_constructor in split_grouped_ctors 2019-11-21 11:20:46 +00:00
Nadrieril
e6e5513894 Fold away AscribeUserType 2019-11-21 11:20:46 +00:00
Nadrieril
5510f5589e Use appropriate constructor for const slices 2019-11-21 11:20:46 +00:00
Nadrieril
fa4a4d3eda Add some tests 2019-11-21 11:20:46 +00:00
Guillaume Gomez
d0b67ddc0f Revert "Update Source Code Pro and include italics"
This reverts commit ea9519bf16f0be137a814a49c9fbaf232ba49a43.
2019-11-21 11:18:23 +01:00
MaulingMonkey
839d58ca56 debuginfo: Support for std::collections::Hash* in windows debuggers. 2019-11-20 19:27:42 -08:00
Aaron Hill
bc7b17c477
Fix cycle when debug-printing opaque types
Fixes #61577

When printing an opaque type in non-verbose mode, we use the
`tcx.predicates_of` query to retrieve the opaque type's bounds for
pretty-printing. However, the pervasiveness of logging within librustc
means that we may already be executing `tcx.predicates_of` for the
opaque type we're trying to print, leading to a cycle error.

This commit adds a new 'no queries' thread-local flag to the pretty
printer. This flag is enabled during the computation of `predicates_of`
for opaque types, and causes us to print the opaque type in 'verbose'
mode (which does not require computing any additinal queries). This
should only affect debug logging for highly nested log messages, not any
user-visible output.
2019-11-20 20:19:23 -05:00
Mazdak Farrokhzad
44cebe5970 reduce size of hir::ExprKind 2019-11-21 01:23:29 +01:00
Aaron Hill
a5c45f006a
Bump Miri for return code propagation 2019-11-20 17:26:49 -05:00
Phlosioneer
983cae77dd
Clarify Step Documentation
While the redesign is in progress (#62886), clarify the purpose of replace_zero and replace_one.
2019-11-20 14:40:54 -05:00
bors
f1b882b558 Auto merge of #66578 - Centril:rollup-pgz1v7t, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #66060 (Making ICEs and test them in incremental)
 - #66298 (rustdoc: fixes #64305: disable search field instead of hidding it)
 - #66457 (Just derive Hashstable in librustc)
 - #66496 (rustc_metadata: Privatize more things)
 - #66514 (Fix selected crate search filter)
 - #66535 (Avoid ICE when `break`ing to an unreachable label)
 - #66573 (Ignore run-make reproducible-build-2 on Mac)

Failed merges:

r? @ghost
2019-11-20 19:15:41 +00:00
Mark Rousskov
70805e6444 Delete ProcessCfgMod
The previous commit removes the use of this, and now we cleanup.
2019-11-20 14:07:57 -05:00
Mazdak Farrokhzad
8754409159
Rollup merge of #66573 - pnkfelix:issue-66568-ignore-reproducible-build-2-on-macos, r=alexcrichton
Ignore run-make reproducible-build-2 on Mac

Ignore run-make reproducible-build-2 on Mac (we already ignore it on Windows).

Until we can dedicate resources to fixing this properly, I think we are best off just ignoring this test on platforms/contexts where it does not matter as much.

cc #66568
2019-11-20 18:32:13 +01:00