Commit graph

134755 commits

Author SHA1 Message Date
bors e792288df3 Auto merge of #79685 - sivadeilra:fix_env_vars_win, r=davidtwco
Fix src/test/ui/env-vars.rs on 128-core machines on Windows

On Windows, the environment variable NUMBER_OF_PROCESSORS has special
meaning. Unfortunately, you can get different answers, depending on
whether you are enumerating all environment variables or querying a
specific variable. This was causing the src/test/ui/env-vars.rs test
to fail on machines with more than 64 processors when run on Windows.
2020-12-05 20:30:58 +00:00
Albin Hedman 94762417e8 Still unable to get the tests working 2020-12-05 19:41:02 +01:00
bors 15eaa0020b Auto merge of #79719 - JohnTitor:nomicon, r=Mark-Simulacrum
Ping me when nomicon's toolstate is broken

So that I can notice the breakage easily.
2020-12-05 18:21:58 +00:00
Albin Hedman 7bd754cf8c Fix tests (hopefully) 2020-12-05 18:39:10 +01:00
Igor Matuszewski 2fa30ecf77 Add libc to rustc-workspace-hack 2020-12-05 18:08:33 +01:00
Albin Hedman d366ed2730 abort() now takes a msg parameter 2020-12-05 17:32:19 +01:00
bors 5bb68c31f8 Auto merge of #79445 - SNCPlay42:struct-tail-recursion-limit, r=oli-obk
check the recursion limit when finding a struct's tail

fixes #79437

This does a `delay_span_bug` (via `ty_error_with_message`) rather than emit a new error message, under the assumption that there will be an error elsewhere (even if the type isn't infinitely recursive, just deeper than the recursion limit, this appears to be the case).
2020-12-05 15:58:06 +00:00
Igor Matuszewski bd37d7d827 Update RLS and Rustfmt 2020-12-05 16:40:24 +01:00
Ethan Brierley 6845e22bba Const parameters can not be inferred with _
Small improvement. Thanks varkor

Co-authored-by: varkor <github@varkor.com>

Bless
2020-12-05 15:37:59 +00:00
bors 9122b769c8 Auto merge of #78373 - matthewjasper:drop-on-into, r=pnkfelix
Don't leak return value after panic in drop

Closes #47949
2020-12-05 13:41:08 +00:00
Matthias Krüger 1734f9c291 remove redundant clones 2020-12-05 12:59:54 +01:00
bors 551a2c6cbc Auto merge of #79724 - RalfJung:miri, r=RalfJung
update Miri

Fixes https://github.com/rust-lang/rust/issues/79709
Cc `@rust-lang/miri` r? `@ghost`
2020-12-05 11:24:40 +00:00
Ralf Jung e0e26b4bce update Miri 2020-12-05 10:02:18 +01:00
bors 8d678bcd2a Auto merge of #6418 - flip1995:apple_wraps_mhm, r=llogiq
Turn unnecessary_wraps applicability to MaybeIncorrect

Fixes: #6417

changelog: Turn [`unnecessary_wraps`] applicability to `MaybeIncorrect`
2020-12-05 08:42:21 +00:00
Aaron Hill c2946402ff
Properly re-use def path hash in incremental mode
Fixes #79661

In incremental compilation mode, we update a `DefPathHash -> DefId`
mapping every time we create a `DepNode` for a foreign `DefId`.
This mapping is written out to the on-disk incremental cache, and is
read by the next compilation session to allow us to lazily decode
`DefId`s.

When we decode a `DepNode` from the current incremental cache, we need
to ensure that any previously-recorded `DefPathHash -> DefId` mapping
gets recorded in the new mapping that we write out. However, PR #74967
didn't do this in all cases, leading to us being unable to decode a
`DefPathHash` in certain circumstances.

This PR refactors some of the code around `DepNode` deserialization to
prevent this kind of mistake from happening again.
2020-12-04 22:16:40 -05:00
Yuki Okushi b1d78360f9 Ping me when nomicon's toolstate is broken 2020-12-05 12:05:03 +09:00
bors 0781b4474b Auto merge of #76301 - matklad:fmt-test, r=matklad
Cleanup: move format! ui tests to where they belong
2020-12-05 01:03:48 +00:00
Matthew Jasper 4fef39113a Avoid leaking block expression values 2020-12-04 23:07:46 +00:00
Yuki Okushi ab121e3afe Add a regression test for issue-66286 2020-12-05 08:03:59 +09:00
bors a5fbaed6c3 Auto merge of #79673 - ijackson:intoinnerintoinnererror, r=m-ou-se
Provide IntoInnerError::into_parts

Hi.  This is an updated version of the IntoInnerError bits of my previous portmanteau MR #78689.  Thanks to `@jyn514` and `@m-ou-se` for helpful comments there.

I have made this insta-stable since it seems like it will probably be uncontroversial, but that is definitely something that someone from the libs API team should be aware of and explicitly consider.

I included a tangentially-related commit providing documentation of the buffer full behaviiour of `&mut [u8] as Write`; the behaviour I am documenting is relied on by the doctest for `into_parts`.
2020-12-04 22:30:19 +00:00
Matthew Jasper 7f3e8551dd Use record_operands_moved more aggresively 2020-12-04 22:22:52 +00:00
Matthew Jasper b766abc88f Simplify unscheduling of drops after moves 2020-12-04 22:19:28 +00:00
xFrednet 18383c69c1 Updated code for CI 2020-12-04 22:05:52 +00:00
xFrednet 6edd598856 Added a lint-fraction-readability flag to the configuration 2020-12-04 21:26:47 +00:00
bors 3ff10e74a7 Auto merge of #79286 - TimDiekmann:rename-allocref, r=Lokathor,Wodann,m-ou-se
Rename `AllocRef` to `Allocator` and `(de)alloc` to `(de)allocate`

Calling `Box::alloc_ref` and `Vec::alloc_ref` sounds like allocating a reference. To solve this ambiguity, this renames `AllocRef` to `Allocator` and `alloc` to `allocate`. For a more detailed explaination see https://github.com/rust-lang/wg-allocators/issues/76.

closes https://github.com/rust-lang/wg-allocators/issues/76

r? `@KodrAus`
`@rustbot` modify labels: +A-allocators +T-libs
`@rustbot` ping wg-allocators
2020-12-04 20:07:04 +00:00
Ian Jackson b777552167 IntoInnerError: Provide into_error
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-12-04 18:43:02 +00:00
Ian Jackson 19c7619dcd IntoInnerError: Provide into_parts
In particular, IntoIneerError only currently provides .error() which
returns a reference, not an owned value.  This is not helpful and
means that a caller of BufWriter::into_inner cannot acquire an owned
io::Error which seems quite wrong.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-12-04 18:43:02 +00:00
Ian Jackson db5d697004 std: impl of Write for &mut [u8]: document the buffer full error
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-12-04 18:38:44 +00:00
SNCPlay42 98fc02d6fa check the recursion limit when finding struct tail 2020-12-04 16:37:23 +00:00
bors 4340229264 Auto merge of #6419 - giraffate:fix_a_style_of_texts_in_size_of_in_element_count, r=flip1995
Fix a style of texts in `size_of_in_element_count`

Add missing ` to texts

changelog: none
2020-12-04 14:42:07 +00:00
Takayuki Nakata 75140e813f Fix a style of texts in size_of_in_element_count 2020-12-04 23:36:07 +09:00
Tim Diekmann 9274b37d99 Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
Aleksey Kladov 356ea6b5aa Move format machinery tests to where they belong 2020-12-04 16:22:36 +03:00
Daiki Ihara 87c621690a Update some associated-types ui test suites 2020-12-04 22:17:13 +09:00
Daiki Ihara a1e94cdcd5 Add long explanation for E0212
Update compiler/rustc_error_codes/src/error_codes/E0212.md

Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-12-04 22:17:06 +09:00
Daiki Ihara 36363e535a Refine E0212 error message 2020-12-04 22:17:06 +09:00
bors 2218520b8a Auto merge of #79680 - Nadrieril:fix-regression-79284, r=jonas-schievink
Fix perf regression caused by #79284

https://github.com/rust-lang/rust/pull/79284 only moved code around but this changed inlining and caused a large perf regression. This fixes it for me, though I'm less confident than usual because the regression was not observable with my usual (i.e. incremental) compilation settings.

r? `@Mark-Simulacrum`
2020-12-04 11:21:35 +00:00
Ryan Levick 19003517ce Fix UI tests for 'const expression' change 2020-12-04 12:21:33 +01:00
Ryan Levick 823f64532c A slightly clearer diagnostic when misusing 2020-12-04 11:33:30 +01:00
flip1995 01f3211602
Turn unnecessary_wraps applicability to MaybeIncorrect 2020-12-04 10:03:32 +01:00
bors e6225434ff Auto merge of #78177 - benjaminp:cleanups, r=jyn514
A few miscellaneous comment fixes and a tiny code clarification.
2020-12-04 07:11:41 +00:00
Benjamin Peterson 504f136c74 Writeback walks the HIR not the AST. 2020-12-03 23:38:36 -06:00
Benjamin Peterson 76ff0f408a The details of higher-rank sub are in the rustc book not a doc module. 2020-12-03 23:38:36 -06:00
Benjamin Peterson 4d8a7c2829 Unnest some .chain calls, so it's clearer what's going on. 2020-12-03 23:37:26 -06:00
Benjamin Peterson cb56b1a7e9 Fix comment that refers to dead enforce_object_limitations function. 2020-12-03 23:37:26 -06:00
bors e9dd18ca74 Auto merge of #79686 - Dylan-DPC:rollup-leama5f, r=Dylan-DPC
Rollup of 11 pull requests

Successful merges:

 - #77686 (Render Markdown in search results)
 - #79541 (Doc keyword lint pass)
 - #79602 (Fix SGX CI)
 - #79611 (Use more std:: instead of core:: in docs for consistency)
 - #79623 (Pass around Symbols instead of Idents in doctree)
 - #79627 (Update cargo)
 - #79631 (disable a ptr equality test on Miri)
 - #79638 (Use `item_name` instead of pretty printing for resolving `Self` on intra-doc links)
 - #79646 (rustc_metadata: Remove some dead code)
 - #79664 (move interpret::MemoryKind::Heap to const eval)
 - #79678 (Fix some clippy lints)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2020-12-04 04:51:49 +00:00
bors 6513f50291 Auto merge of #79109 - richkadel:llvm-coverage-counters-2.0.5, r=tmandry
Coverage tests for remaining TerminatorKinds and async, improve Assert

Tested and validate results for panic unwind, panic abort, assert!()
macro, TerminatorKind::Assert (for example, numeric overflow), and
async/await.

Implemented a previous documented idea to change Assert handling to be
the same as FalseUnwind and Goto, so it doesn't get its own
BasicCoverageBlock anymore. This changed a couple of coverage regions,
but I validated those changes are not any worse than the prior results,
and probably help assure some consistency (even if some people might
disagree with how the code region is consistently computed).

Fixed issue with async/await. AggregateKind::Generator needs to be
handled like AggregateKind::Closure; coverage span for the outer async
function should not "cover" the async body, which is actually executed
in a separate "closure" MIR.
2020-12-04 02:31:11 +00:00
Dylan DPC 5cebbaa6a1
Rollup merge of #79678 - jyn514:THE-PAPERCLIP-COMETH, r=varkor
Fix some clippy lints

Happy to revert these if you think they're less readable, but personally I like them better now (especially the `else { if { ... } }` to `else if { ... }` change).
2020-12-04 03:30:39 +01:00
Dylan DPC a2aa3d6e49
Rollup merge of #79664 - vn-ki:move-memkind-heap, r=oli-obk
move interpret::MemoryKind::Heap to const eval

r? ``@oli-obk``
2020-12-04 03:30:37 +01:00
Dylan DPC 0fbbe94662
Rollup merge of #79646 - petrochenkov:inclean, r=davidtwco
rustc_metadata: Remove some dead code

Follow up to https://github.com/rust-lang/rust/pull/74967
2020-12-04 03:30:36 +01:00