]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agorustdoc: attempt full build for compile_fail test
Trevor Spiteri [Thu, 30 Jan 2020 14:49:21 +0000 (15:49 +0100)]
rustdoc: attempt full build for compile_fail test

Some code fails when doing a full build but does not fail when only
emitting metadata. This commit makes sure compile_fail tests for such
code behave as expected, that is, the test succeeds because the
compilation fails.

4 years agoAuto merge of #68659 - Dylan-DPC:rollup-zo7zi9f, r=Dylan-DPC
bors [Thu, 30 Jan 2020 02:25:56 +0000 (02:25 +0000)]
Auto merge of #68659 - Dylan-DPC:rollup-zo7zi9f, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #66648 (Implement clone_from for BTreeMap and BTreeSet)
 - #68468 (BTreeMap: tag and explain unsafe internal functions or assert preconditions)
 - #68626 (Use termize instead of term_size)
 - #68640 (Document remaining undocumented `From` implementations for IPs)
 - #68651 (Document `From` implementation for NonZero nums)
 - #68655 (Fix revision annotations in borrowck-feature-nll-overrides-migrate)

Failed merges:

r? @ghost

4 years agoRollup merge of #68655 - tmiasko:rev, r=Dylan-DPC
Dylan DPC [Thu, 30 Jan 2020 00:46:48 +0000 (01:46 +0100)]
Rollup merge of #68655 - tmiasko:rev, r=Dylan-DPC

Fix revision annotations in borrowck-feature-nll-overrides-migrate

4 years agoRollup merge of #68651 - LeSeulArtichaut:doc-from-nonzero, r=steveklabnik
Dylan DPC [Thu, 30 Jan 2020 00:46:46 +0000 (01:46 +0100)]
Rollup merge of #68651 - LeSeulArtichaut:doc-from-nonzero, r=steveklabnik

Document `From` implementation for NonZero nums

This is more of a nitpick than a real change in documentation. I did this for consistency with other documentation (namely Atomic integers).

Related to #51430

r? @steveklabnik

PS: I actually tested the code this time. My CPU died in the process, but I get to open a (hopefully ðŸ¤ž) working PR

4 years agoRollup merge of #68640 - LeSeulArtichaut:doc-from-ip, r=steveklabnik
Dylan DPC [Thu, 30 Jan 2020 00:46:45 +0000 (01:46 +0100)]
Rollup merge of #68640 - LeSeulArtichaut:doc-from-ip, r=steveklabnik

Document remaining undocumented `From` implementations for IPs

Some `From` implementations were missing documentation. I added examples, I tried to be as close to existing examples as possible.

Related to #51430 (cc @skade)

r? @steveklabnik

4 years agoRollup merge of #68626 - Zoxc:termize, r=estebank
Dylan DPC [Thu, 30 Jan 2020 00:46:43 +0000 (01:46 +0100)]
Rollup merge of #68626 - Zoxc:termize, r=estebank

Use termize instead of term_size

`termize` is a fork of `term_size` which uses `winapi` 0.3 instead of 0.2. This is a step towards removing the `winapi` 0.2 dependency.

r? @Mark-Simulacrum

4 years agoRollup merge of #68468 - ssomers:btreemap_prefer_middle, r=Mark-Simulacrum
Dylan DPC [Thu, 30 Jan 2020 00:46:42 +0000 (01:46 +0100)]
Rollup merge of #68468 - ssomers:btreemap_prefer_middle, r=Mark-Simulacrum

BTreeMap: tag and explain unsafe internal functions or assert preconditions

#68418 concluded that it's not desirable to tag all internal functions with preconditions as being unsafe. This PR does it to some functions, documents why, and elsewhere enforces the preconditions with asserts.

4 years agoRollup merge of #66648 - crgl:btree-clone-from, r=Amanieu
Dylan DPC [Thu, 30 Jan 2020 00:46:38 +0000 (01:46 +0100)]
Rollup merge of #66648 - crgl:btree-clone-from, r=Amanieu

Implement clone_from for BTreeMap and BTreeSet

See #28481. This results in up to 90% speedups on simple data types when `self` and `other` are the same size, and is generally comparable or faster. Some concerns:

1. This implementation requires an `Ord` bound on the `Clone` implementation for `BTreeMap` and `BTreeSet`. Since these structs can only be created externally for keys with `Ord` implemented, this should be fine? If not, there's certainly a less safe way to do this.
2. Changing `next_unchecked` on `RangeMut` to return mutable key references allows for replacing the entire overlapping portion of both maps without changing the external interface in any way. However, if `clone_from` fails it can leave the `BTreeMap` in an invalid state, which might be unacceptable.

~This probably needs an FCP since it changes a trait bound, but (as far as I know?) that change cannot break any external code.~

4 years agoAuto merge of #67688 - cjgillot:passes, r=Zoxc
bors [Wed, 29 Jan 2020 23:09:58 +0000 (23:09 +0000)]
Auto merge of #67688 - cjgillot:passes, r=Zoxc

Move some code to librustc_passes.

Per instructions by @Zoxc, some code from `librustc::middle` is moved to `librustc_passes`.

cc #65031
r? @Zoxc

4 years agoFix revision annotations in borrowck-feature-nll-overrides-migrate
Tomasz MiÄ…sko [Wed, 29 Jan 2020 00:00:00 +0000 (00:00 +0000)]
Fix revision annotations in borrowck-feature-nll-overrides-migrate

4 years agoMake Target::from_impl_item a free function.
Camille GILLOT [Mon, 27 Jan 2020 18:37:36 +0000 (19:37 +0100)]
Make Target::from_impl_item a free function.

4 years agoMove upvars query to librustc_passes.
Camille GILLOT [Wed, 1 Jan 2020 16:31:03 +0000 (17:31 +0100)]
Move upvars query to librustc_passes.

4 years agoMove upvars.rs to librustc_passes.
Camille GILLOT [Wed, 1 Jan 2020 16:28:12 +0000 (17:28 +0100)]
Move upvars.rs to librustc_passes.

4 years agoMove check_mod_attr query in librustc_passes.
Camille GILLOT [Wed, 1 Jan 2020 16:27:30 +0000 (17:27 +0100)]
Move check_mod_attr query in librustc_passes.

4 years agoMove check_attr.rs to librustc_passes.
Camille GILLOT [Wed, 1 Jan 2020 16:13:28 +0000 (17:13 +0100)]
Move check_attr.rs to librustc_passes.

4 years agoDocument `From` implementation for NonZero nums
LeSeulArtichaut [Wed, 29 Jan 2020 15:18:51 +0000 (16:18 +0100)]
Document `From` implementation for NonZero nums

4 years agoDocument remaining undocumented `From` implementations for IPs
LeSeulArtichaut [Wed, 29 Jan 2020 14:09:04 +0000 (15:09 +0100)]
Document remaining undocumented `From` implementations for IPs

4 years agoAuto merge of #68634 - JohnTitor:clippy-up, r=JohnTitor
bors [Wed, 29 Jan 2020 16:39:45 +0000 (16:39 +0000)]
Auto merge of #68634 - JohnTitor:clippy-up, r=JohnTitor

Update Clippy

Fixes #68631

r? @ghost

4 years agoAuto merge of #68635 - JohnTitor:rollup-jsc34ac, r=JohnTitor
bors [Wed, 29 Jan 2020 13:40:58 +0000 (13:40 +0000)]
Auto merge of #68635 - JohnTitor:rollup-jsc34ac, r=JohnTitor

Rollup of 7 pull requests

Successful merges:

 - #67722 (Minor: note how Any is an unsafe trait in SAFETY comments)
 - #68586 (Make conflicting_repr_hints a deny-by-default c-future-compat lint)
 - #68598 (Fix null synthetic_implementors error)
 - #68603 (Changelog: Demonstrate final build-override syntax)
 - #68609 (Set lld flavor for MSVC to link.exe)
 - #68611 (Correct ICE caused by macros generating invalid spans.)
 - #68627 (Document that write_all will not call write if given an empty buffer)

Failed merges:

r? @ghost

4 years agoBTreeMap: tag and explain unsafe internal functions or assert preconditions
Stein Somers [Wed, 22 Jan 2020 10:01:18 +0000 (11:01 +0100)]
BTreeMap: tag and explain unsafe internal functions or assert preconditions
Co-Authored-By: Mark Rousskov <mark.simulacrum@gmail.com>
4 years agoRollup merge of #68627 - joshtriplett:write-all-none, r=Dylan-DPC
Yuki Okushi [Wed, 29 Jan 2020 09:56:34 +0000 (18:56 +0900)]
Rollup merge of #68627 - joshtriplett:write-all-none, r=Dylan-DPC

Document that write_all will not call write if given an empty buffer

Some types of Write instances have a semantic meaning associated with
writing an empty buffer, such as sending an empty packet. This works
when calling `write` directly, and supplying an empty buffer. However,
calling `write_all` on an empty buffer will simply never call `write`,
because `write_all` assumes it has no work to do.

Document this behavior, to help prospective users of
datagram-packet-style Write instances.

4 years agoRollup merge of #68611 - MichaelBurge:master, r=estebank
Yuki Okushi [Wed, 29 Jan 2020 09:56:32 +0000 (18:56 +0900)]
Rollup merge of #68611 - MichaelBurge:master, r=estebank

Correct ICE caused by macros generating invalid spans.

Closes #68605

4 years agoRollup merge of #68609 - Zoxc:lld-msvc, r=alexcrichton
Yuki Okushi [Wed, 29 Jan 2020 09:56:31 +0000 (18:56 +0900)]
Rollup merge of #68609 - Zoxc:lld-msvc, r=alexcrichton

Set lld flavor for MSVC to link.exe

This enables linking with LLD on Windows with just `-C linker=rust-lld` instead of needing `-C linker=rust-lld -C linker-flavor=lld-link`.

4 years agoRollup merge of #68603 - kornelski:patch-1, r=pietroalbini
Yuki Okushi [Wed, 29 Jan 2020 09:56:29 +0000 (18:56 +0900)]
Rollup merge of #68603 - kornelski:patch-1, r=pietroalbini

Changelog: Demonstrate final build-override syntax

4 years agoRollup merge of #68598 - GuillaumeGomez:fix-null-synthetic_implementors, r=ollie27
Yuki Okushi [Wed, 29 Jan 2020 09:56:28 +0000 (18:56 +0900)]
Rollup merge of #68598 - GuillaumeGomez:fix-null-synthetic_implementors, r=ollie27

Fix null synthetic_implementors error

Fixes #68584.

r? @ollie27

cc @kinnison

4 years agoRollup merge of #68586 - Centril:repr-deny, r=pnkfelix
Yuki Okushi [Wed, 29 Jan 2020 09:56:26 +0000 (18:56 +0900)]
Rollup merge of #68586 - Centril:repr-deny, r=pnkfelix

Make conflicting_repr_hints a deny-by-default c-future-compat lint

Closes https://github.com/rust-lang/rust/issues/68428.
cc https://github.com/rust-lang/rust/issues/68585.

r? @petrochenkov @pnkfelix

4 years agoRollup merge of #67722 - petertodd:2019-improve-any-comment, r=Mark-Simulacrum
Yuki Okushi [Wed, 29 Jan 2020 09:56:22 +0000 (18:56 +0900)]
Rollup merge of #67722 - petertodd:2019-improve-any-comment, r=Mark-Simulacrum

Minor: note how Any is an unsafe trait in SAFETY comments

Motivation: helpful to people like myself reading the standard library source to better understand how to use Any, especially if we do go ahead with https://github.com/rust-lang/rust/pull/67562 and make it an unsafe trait.

4 years agoUpdate Clippy
Yuki Okushi [Wed, 29 Jan 2020 09:41:09 +0000 (18:41 +0900)]
Update Clippy

4 years agoAuto merge of #68572 - tmiasko:sanitizer-use-after-scope, r=nikic
bors [Wed, 29 Jan 2020 07:44:36 +0000 (07:44 +0000)]
Auto merge of #68572 - tmiasko:sanitizer-use-after-scope, r=nikic

Detect use-after-scope bugs with AddressSanitizer

Enable use-after-scope checks by default when using AddressSanitizer.
They allow to detect incorrect use of stack objects after their scope
have already ended. The detection is based on LLVM lifetime intrinsics.

To facilitate the use of this functionality, the lifetime intrinsics are
now emitted regardless of optimization level if enabled sanitizer makes
use of them.

4 years agoAuto merge of #68512 - spastorino:local-is-copy, r=oli-obk
bors [Wed, 29 Jan 2020 04:36:50 +0000 (04:36 +0000)]
Auto merge of #68512 - spastorino:local-is-copy, r=oli-obk

Local is copy

r? @oli-obk

4 years agoMinor: note why we can rely on Any trait for safety
Peter Todd [Wed, 29 Jan 2020 01:53:45 +0000 (20:53 -0500)]
Minor: note why we can rely on Any trait for safety

4 years agoAuto merge of #68625 - JohnTitor:rollup-20pfcru, r=JohnTitor
bors [Wed, 29 Jan 2020 01:28:55 +0000 (01:28 +0000)]
Auto merge of #68625 - JohnTitor:rollup-20pfcru, r=JohnTitor

Rollup of 8 pull requests

Successful merges:

 - #68289 (Don't ICE on path-collision in dep-graph)
 - #68378 (Add BTreeMap::remove_entry)
 - #68553 (Fix run button positionning in case of scrolling)
 - #68556 (rustdoc: Fix re-exporting primitive types)
 - #68582 (Add E0727 long explanation)
 - #68592 (fix: typo in vec.rs)
 - #68619 (Fix a few spelling mistakes)
 - #68620 (Update links to WASI docs in time.rs module)

Failed merges:

r? @ghost

4 years agoDocument that write_all will not call write if given an empty buffer
Josh Triplett [Wed, 29 Jan 2020 01:22:38 +0000 (17:22 -0800)]
Document that write_all will not call write if given an empty buffer

Some types of Write instances have a semantic meaning associated with
writing an empty buffer, such as sending an empty packet. This works
when calling `write` directly, and supplying an empty buffer. However,
calling `write_all` on an empty buffer will simply never call `write`,
because `write_all` assumes it has no work to do.

Document this behavior, to help prospective users of
datagram-packet-style Write instances.

4 years agoRollup merge of #68620 - kubkon:patch-1, r=Dylan-DPC
Yuki Okushi [Wed, 29 Jan 2020 00:34:54 +0000 (09:34 +0900)]
Rollup merge of #68620 - kubkon:patch-1, r=Dylan-DPC

Update links to WASI docs in time.rs module

Since the docs for the WASI API are now evolving in [WebAssembly/WASI] repo,
I thought it might be useful to update the links in the docs to point to that location
instead of using the outdated `CraneStation/wasmtime` destination.

[WebAssembly/WASI]: https://github.com/WebAssembly/WASI

r? @steveklabnik

cc @alexcrichton

4 years agoRollup merge of #68619 - gorilskij:master, r=varkor
Yuki Okushi [Wed, 29 Jan 2020 00:34:52 +0000 (09:34 +0900)]
Rollup merge of #68619 - gorilskij:master, r=varkor

Fix a few spelling mistakes

4 years agoRollup merge of #68592 - pdbrito:master, r=jonas-schievink
Yuki Okushi [Wed, 29 Jan 2020 00:34:51 +0000 (09:34 +0900)]
Rollup merge of #68592 - pdbrito:master, r=jonas-schievink

fix: typo in vec.rs

4 years agoRollup merge of #68582 - LeSeulArtichaut:code-explanations, r=Dylan-DPC
Yuki Okushi [Wed, 29 Jan 2020 00:34:49 +0000 (09:34 +0900)]
Rollup merge of #68582 - LeSeulArtichaut:code-explanations, r=Dylan-DPC

Add E0727 long explanation

Add long explanation for the `E0727` error code (async generators not yet supported).
Part of #61137

r? @GuillaumeGomez

4 years agoRollup merge of #68556 - ollie27:rustdoc_primitive_re-export, r=GuillaumeGomez
Yuki Okushi [Wed, 29 Jan 2020 00:34:48 +0000 (09:34 +0900)]
Rollup merge of #68556 - ollie27:rustdoc_primitive_re-export, r=GuillaumeGomez

rustdoc: Fix re-exporting primitive types

* Generate links to the primitive type docs for re-exports.
* Don't ICE on cross crate primitive type re-exports.
* Make primitive type re-exports show up cross crate.

Fixes #67646
Closes #67972

r? @GuillaumeGomez

4 years agoRollup merge of #68553 - GuillaumeGomez:fix-run-button-scroll-pos, r=kinnison
Yuki Okushi [Wed, 29 Jan 2020 00:34:47 +0000 (09:34 +0900)]
Rollup merge of #68553 - GuillaumeGomez:fix-run-button-scroll-pos, r=kinnison

Fix run button positionning in case of scrolling

Fixes #68337.

r? @kinnison

4 years agoRollup merge of #68378 - billyrieger:btreemap-remove-entry, r=KodrAus
Yuki Okushi [Wed, 29 Jan 2020 00:34:45 +0000 (09:34 +0900)]
Rollup merge of #68378 - billyrieger:btreemap-remove-entry, r=KodrAus

Add BTreeMap::remove_entry

Implements https://github.com/rust-lang/rust/issues/66714.

4 years agoRollup merge of #68289 - pnkfelix:issue-62649-dont-ice-on-path-collision-in-dep-graph...
Yuki Okushi [Wed, 29 Jan 2020 00:34:43 +0000 (09:34 +0900)]
Rollup merge of #68289 - pnkfelix:issue-62649-dont-ice-on-path-collision-in-dep-graph, r=michaelwoerister

Don't ICE on path-collision in dep-graph

Collisions in the dep-graph due to path-reuse are rare but can occur.

So, instead of ICE'ing, just fail to mark green in such cases (for `DepKind::{Hir, HirBody, CrateMetadata}`).

Fix #62649.

4 years agoUse termize instead of term_size
John KÃ¥re Alsaker [Wed, 29 Jan 2020 00:13:48 +0000 (01:13 +0100)]
Use termize instead of term_size

4 years agoUpdate links to WASI docs in time.rs module
Jakub Konka [Tue, 28 Jan 2020 22:34:00 +0000 (23:34 +0100)]
Update links to WASI docs in time.rs module

Since the docs for the WASI API are now evolving in [WebAssembly/WASI] repo,
I thought it might be useful to update the links in the docs to point to that location
instead of using the outdated `CraneStation/wasmtime` destination.

[WebAssembly/WASI]: https://github.com/WebAssembly/WASI

4 years agoFix null synthetic_implementors error
Guillaume Gomez [Tue, 28 Jan 2020 12:48:08 +0000 (13:48 +0100)]
Fix null synthetic_implementors error

4 years agoFix a few spelling mistakes
gorilskij [Tue, 28 Jan 2020 22:06:58 +0000 (23:06 +0100)]
Fix a few spelling mistakes

4 years agoAuto merge of #68606 - jonas-schievink:normalize-fastpath, r=Zoxc
bors [Tue, 28 Jan 2020 20:26:24 +0000 (20:26 +0000)]
Auto merge of #68606 - jonas-schievink:normalize-fastpath, r=Zoxc

Add an early-exit to `QueryNormalizer::fold_ty`

Pulled out from https://github.com/rust-lang/rust/pull/68524, this results in a ~60-70% reduction in compile time for the await-call-tree benchmarks. This should unblock https://github.com/rust-lang/rust/issues/67982 as well.

r? @Zoxc

4 years agoAdd E0727 long explanation
LeSeulArtichaut [Mon, 27 Jan 2020 20:22:05 +0000 (21:22 +0100)]
Add E0727 long explanation

4 years agoCorrect ICE caused by macros generating invalid spans.
Michael Burge [Tue, 28 Jan 2020 18:57:03 +0000 (10:57 -0800)]
Correct ICE caused by macros generating invalid spans.

4 years agoReformat truncation section of clone_from
Charles Gleason [Tue, 28 Jan 2020 16:59:50 +0000 (11:59 -0500)]
Reformat truncation section of clone_from

4 years agoDemonstrate final build-override syntax
Kornel [Tue, 28 Jan 2020 15:53:21 +0000 (15:53 +0000)]
Demonstrate final build-override syntax

4 years agoSet lld flavor for MSVC to link.exe
John KÃ¥re Alsaker [Tue, 28 Jan 2020 16:58:44 +0000 (17:58 +0100)]
Set lld flavor for MSVC to link.exe

4 years agoAdd private is_empty method to RangeMut
Charles Gleason [Tue, 28 Jan 2020 16:46:49 +0000 (11:46 -0500)]
Add private is_empty method to RangeMut

4 years agoInclude empty BTreeMap in clone_from tests
Charles Gleason [Tue, 28 Jan 2020 16:39:48 +0000 (11:39 -0500)]
Include empty BTreeMap in clone_from tests

4 years agoAdd an early-exit to `QueryNormalizer::fold_ty`
Jonas Schievink [Mon, 27 Jan 2020 23:52:21 +0000 (00:52 +0100)]
Add an early-exit to `QueryNormalizer::fold_ty`

4 years agoFormat safety comment as per tidy
Charles Gleason [Tue, 28 Jan 2020 16:27:31 +0000 (11:27 -0500)]
Format safety comment as per tidy

Co-Authored-By: Ashley Mannix <ashleymannix@live.com.au>
4 years agoAuto merge of #68533 - tmiasko:compiletest, r=nikomatsakis
bors [Tue, 28 Jan 2020 16:25:35 +0000 (16:25 +0000)]
Auto merge of #68533 - tmiasko:compiletest, r=nikomatsakis

compiletest: Unit tests for `EarlyProps` (+ small cleanup)

* Parse `EarlyProps` from a reader
* Add unit tests for `EarlyProps`
* Remove unused `llvm-cxxflags` option
* Remove unnecessary memory allocations in `iter_header`
* Update mode list displayed in `--help`

4 years agoFix some wrong dereferences after rebase
Santiago Pastorino [Tue, 28 Jan 2020 15:17:02 +0000 (12:17 -0300)]
Fix some wrong dereferences after rebase

4 years agoRemove unneeded & on match pattern
Santiago Pastorino [Fri, 24 Jan 2020 16:27:01 +0000 (13:27 -0300)]
Remove unneeded & on match pattern

4 years ago./x.py fmt
Santiago Pastorino [Fri, 24 Jan 2020 15:50:13 +0000 (12:50 -0300)]
./x.py fmt

4 years agoPlace::ty_from takes local by value
Santiago Pastorino [Tue, 14 Jan 2020 05:21:42 +0000 (02:21 -0300)]
Place::ty_from takes local by value

4 years agoLocal field on PlaceRef and RootPlace is not a reference anymore
Santiago Pastorino [Tue, 14 Jan 2020 05:10:05 +0000 (02:10 -0300)]
Local field on PlaceRef and RootPlace is not a reference anymore

4 years agocodegen_place and related functions can take PlaceRef by value
Santiago Pastorino [Tue, 14 Jan 2020 04:51:59 +0000 (01:51 -0300)]
codegen_place and related functions can take PlaceRef by value

4 years agomake_integrate_local takes Local by value
Santiago Pastorino [Tue, 14 Jan 2020 04:26:11 +0000 (01:26 -0300)]
make_integrate_local takes Local by value

4 years agorecord_killed_borrows_for_local takes Local by value
Santiago Pastorino [Tue, 14 Jan 2020 04:23:51 +0000 (01:23 -0300)]
record_killed_borrows_for_local takes Local by value

4 years agoPlace conflict functions take Local by value
Santiago Pastorino [Tue, 14 Jan 2020 04:21:10 +0000 (01:21 -0300)]
Place conflict functions take Local by value

4 years agoAuto merge of #68529 - TimDiekmann:rename-alloc, r=Amanieu
bors [Tue, 28 Jan 2020 08:44:20 +0000 (08:44 +0000)]
Auto merge of #68529 - TimDiekmann:rename-alloc, r=Amanieu

Rename `Alloc` to `AllocRef`

The allocator-wg has decided to merge this change upstream in https://github.com/rust-lang/wg-allocators/issues/8#issuecomment-577122958.

This renames `Alloc` to `AllocRef` because types that implement `Alloc` are a reference, smart pointer, or ZSTs. It is not possible to have an allocator like `MyAlloc([u8; N])`, that owns the memory and also implements `Alloc`, since that would mean, that moving a `Vec<T, MyAlloc>` would need to correct the internal pointer, which is not possible as we don't have move constructors.

For further explanation please see https://github.com/rust-lang/wg-allocators/issues/8#issuecomment-489464843 and the comments after that one.

Additionally it clarifies the semantics of `Clone` on an allocator. In the case of `AllocRef`, it is clear that the cloned handle still points to the same allocator instance, and that you can free data allocated from one handle with another handle.

The initial proposal was to rename `Alloc` to `AllocHandle`, but `Ref` expresses the semantics better than `Handle`. Also, the only appearance of `Handle` in `std` are for windows specific resources, which might be confusing.

Blocked on https://github.com/rust-lang/miri/pull/1160

4 years agofix: typo in vec.rs
Pedro de Brito [Tue, 28 Jan 2020 06:59:07 +0000 (07:59 +0100)]
fix: typo in vec.rs

4 years agoAdd BTreeMap::remove_entry
Billy Rieger [Mon, 20 Jan 2020 02:44:46 +0000 (21:44 -0500)]
Add BTreeMap::remove_entry

Mainly for API parity with HashMap.

- Add BTreeMap::remove_entry
- Rewrite BTreeMap::remove to use remove_entry
- Use btreemap_remove_entry feature in doc comment

4 years agoAuto merge of #68234 - CAD97:slice-from-raw-parts, r=KodrAus
bors [Tue, 28 Jan 2020 05:31:34 +0000 (05:31 +0000)]
Auto merge of #68234 - CAD97:slice-from-raw-parts, r=KodrAus

Stabilize ptr::slice_from_raw_parts[_mut]

Closes #36925, the tracking issue.
Initial impl: #60667

r? @rust-lang/libs

In addition to stabilizing, I've adjusted the example of `ptr::slice_from_raw_parts` to use `slice_from_raw_parts` instead of `slice_from_raw_parts_mut`, which was unnecessary for the example as written.

4 years agoAuto merge of #68587 - JohnTitor:rollup-fz45xwc, r=JohnTitor
bors [Tue, 28 Jan 2020 02:17:10 +0000 (02:17 +0000)]
Auto merge of #68587 - JohnTitor:rollup-fz45xwc, r=JohnTitor

Rollup of 11 pull requests

Successful merges:

 - #68200 (Stabilize the debug_map_key_value feature)
 - #68383 (Clean up E0205 explanation)
 - #68412 (Clean up E0207 explanation)
 - #68454 (clean up E0214 explanation)
 - #68482 (clean up error codes explanation)
 - #68563 (Don't call `tcx.fn_sig` on closures)
 - #68570 (Bump LLVM submodule to fix LLVM assertion failure in MSP430 interrupt generation.)
 - #68571 (check_match: extract common logic)
 - #68573 (Clean up E0262 explanation)
 - #68575 (Disable the testcase for Vxworks.)
 - #68581 (Add support for icebreakers-cleanup-crew commands)

Failed merges:

r? @ghost

4 years agoRollup merge of #68581 - spastorino:support-ice-breaker-cleanup-crew, r=Dylan-DPC
Yuki Okushi [Tue, 28 Jan 2020 01:48:23 +0000 (10:48 +0900)]
Rollup merge of #68581 - spastorino:support-ice-breaker-cleanup-crew, r=Dylan-DPC

Add support for icebreakers-cleanup-crew commands

r? @nikomatsakis

4 years agoRollup merge of #68575 - Wind-River:master_2020, r=alexcrichton
Yuki Okushi [Tue, 28 Jan 2020 01:48:21 +0000 (10:48 +0900)]
Rollup merge of #68575 - Wind-River:master_2020, r=alexcrichton

Disable the testcase for Vxworks.

r? @alexcrichton

4 years agoRollup merge of #68573 - GuillaumeGomez:clean-up-e0262, r=Dylan-DPC
Yuki Okushi [Tue, 28 Jan 2020 01:48:20 +0000 (10:48 +0900)]
Rollup merge of #68573 - GuillaumeGomez:clean-up-e0262, r=Dylan-DPC

Clean up E0262 explanation

r? @Dylan-DPC

4 years agoRollup merge of #68571 - Centril:check_in_cx, r=oli-obk
Yuki Okushi [Tue, 28 Jan 2020 01:48:19 +0000 (10:48 +0900)]
Rollup merge of #68571 - Centril:check_in_cx, r=oli-obk

check_match: extract common logic

This is part of work on `hir::ExprKind::Let` which I thought made sense on its own (though makes even more sense with `::Let`).

r? @oli-obk

4 years agoRollup merge of #68570 - cr1901:msp430-fix-1-2020, r=alexcrichton
Yuki Okushi [Tue, 28 Jan 2020 01:48:17 +0000 (10:48 +0900)]
Rollup merge of #68570 - cr1901:msp430-fix-1-2020, r=alexcrichton

Bump LLVM submodule to fix LLVM assertion failure in MSP430 interrupt generation.

This PR brings in changes introduced by [this cherry-pick](https://github.com/rust-lang/llvm-project/pull/37) to the Rust repository.

Nightlies downloaded from `rustup` do not appear to have llvm assertions enabled; the assertion failure [sometimes](https://github.com/YuhanLiin/msp430fr2355-quickstart/issues/3) causes link errors that shouldn't occur. I couldn't find any indication of other bugs; however, it should still be fixed.

4 years agoRollup merge of #68563 - Aaron1011:fix/fn-sig-closure, r=varkor
Yuki Okushi [Tue, 28 Jan 2020 01:48:16 +0000 (10:48 +0900)]
Rollup merge of #68563 - Aaron1011:fix/fn-sig-closure, r=varkor

Don't call `tcx.fn_sig` on closures

Fixes #68542

4 years agoRollup merge of #68482 - GuillaumeGomez:clean-up-err-codes, r=Dylan-DPC
Yuki Okushi [Tue, 28 Jan 2020 01:48:14 +0000 (10:48 +0900)]
Rollup merge of #68482 - GuillaumeGomez:clean-up-err-codes, r=Dylan-DPC

clean up error codes explanation

r? @Dylan-DPC

4 years agoRollup merge of #68454 - GuillaumeGomez:clean-up-e0214, r=Dylan-DPC
Yuki Okushi [Tue, 28 Jan 2020 01:48:12 +0000 (10:48 +0900)]
Rollup merge of #68454 - GuillaumeGomez:clean-up-e0214, r=Dylan-DPC

clean up E0214 explanation

r? @Dylan-DPC

4 years agoRollup merge of #68412 - GuillaumeGomez:clean-up-e0207, r=Dylan-DPC
Yuki Okushi [Tue, 28 Jan 2020 01:48:10 +0000 (10:48 +0900)]
Rollup merge of #68412 - GuillaumeGomez:clean-up-e0207, r=Dylan-DPC

Clean up E0207 explanation

r? @Dylan-DPC

4 years agoRollup merge of #68383 - GuillaumeGomez:clean-up-e0205, r=Dylan-DPC
Yuki Okushi [Tue, 28 Jan 2020 01:48:05 +0000 (10:48 +0900)]
Rollup merge of #68383 - GuillaumeGomez:clean-up-e0205, r=Dylan-DPC

Clean up E0205 explanation

r? @Dylan-DPC

4 years agoRollup merge of #68200 - KodrAus:stabilize/debug_map_key_value, r=alexcrichton
Yuki Okushi [Tue, 28 Jan 2020 01:48:04 +0000 (10:48 +0900)]
Rollup merge of #68200 - KodrAus:stabilize/debug_map_key_value, r=alexcrichton

Stabilize the debug_map_key_value feature

RFC: https://github.com/rust-lang/rfcs/pull/2696
Tracking issue: #62482

Stabilizes the `debug_map_key_value` feature, which covers:

```rust
impl<'a, 'b> DebugMap<'a, 'b> {
    pub fn key(&mut self, key: &dyn fmt::Debug) -> &mut DebugMap<'a, 'b> {}
    pub fn value(&mut self, value: &dyn fmt::Debug) -> &mut DebugMap<'a, 'b> {}
}
```

These methods are small and self-contained, and are used as the basis for the existing `DebugMap::entry` method, so have been used in the wild for the last 6 months or so.

4 years agostabilize the debug_map_key_value feature
Ashley Mannix [Tue, 14 Jan 2020 04:43:05 +0000 (14:43 +1000)]
stabilize the debug_map_key_value feature

4 years agolintify conflicting_repr_hints
Mazdak Farrokhzad [Mon, 27 Jan 2020 23:27:57 +0000 (00:27 +0100)]
lintify conflicting_repr_hints

4 years agoAuto merge of #68580 - Mark-Simulacrum:rollup-r80xhus, r=Mark-Simulacrum
bors [Mon, 27 Jan 2020 22:59:38 +0000 (22:59 +0000)]
Auto merge of #68580 - Mark-Simulacrum:rollup-r80xhus, r=Mark-Simulacrum

Rollup of 3 pull requests

Successful merges:

 - #68459 (don't clone types that are copy, round two.)
 - #68576 (update miri)
 - #68579 (Update cargo)

Failed merges:

r? @ghost

4 years agoRename `Alloc` to `AllocRef`
Tim Diekmann [Thu, 23 Jan 2020 00:49:29 +0000 (01:49 +0100)]
Rename `Alloc` to `AllocRef`

4 years agoAdd support for icebreakers-cleanup-crew commands
Santiago Pastorino [Mon, 27 Jan 2020 18:58:27 +0000 (15:58 -0300)]
Add support for icebreakers-cleanup-crew commands

4 years agoRollup merge of #68579 - ehuss:update-cargo, r=Mark-Simulacrum
Mark Rousskov [Mon, 27 Jan 2020 18:42:03 +0000 (13:42 -0500)]
Rollup merge of #68579 - ehuss:update-cargo, r=Mark-Simulacrum

Update cargo

2 commits in b68b0978ab8012f871c80736fb910d14b89c4498..9d32b7b01409024b165545c568b1525d86e2b7cb
2020-01-24 18:26:23 +0000 to 2020-01-26 18:27:29 +0000
- Polish code to clarify meaning (rust-lang/cargo#7836)
- Store maximum queue length (rust-lang/cargo#7829)

4 years agoRollup merge of #68576 - jonhoo:bump-miri, r=oli-obk
Mark Rousskov [Mon, 27 Jan 2020 18:42:02 +0000 (13:42 -0500)]
Rollup merge of #68576 - jonhoo:bump-miri, r=oli-obk

update miri

Bump miri for rust-lang/miri#1150

r? @oli-obk

4 years agoRollup merge of #68459 - matthiaskrgr:clone_on_copy2, r=eddyb
Mark Rousskov [Mon, 27 Jan 2020 18:42:00 +0000 (13:42 -0500)]
Rollup merge of #68459 - matthiaskrgr:clone_on_copy2, r=eddyb

don't clone types that are copy, round two.

Apparently fixing some of these issues makes clippy find even more so I did a couple of rounds now.

r? @eddyb

4 years agoUpdate cargo
Eric Huss [Mon, 27 Jan 2020 18:30:44 +0000 (10:30 -0800)]
Update cargo

4 years agoBump miri for rust-lang/miri#1150
Jon Gjengset [Mon, 27 Jan 2020 17:47:51 +0000 (12:47 -0500)]
Bump miri for rust-lang/miri#1150

4 years agoDisable the testcase for Vxworks.
Umesh Kalappa [Mon, 6 Jan 2020 08:53:23 +0000 (00:53 -0800)]
Disable the testcase for Vxworks.

4 years agoClean up E0262 explanation
Guillaume Gomez [Mon, 27 Jan 2020 16:43:02 +0000 (17:43 +0100)]
Clean up E0262 explanation

4 years agoCollisions in the dep-graph due to path-reuse are rare but can occur.
Felix S. Klock II [Thu, 16 Jan 2020 19:33:18 +0000 (20:33 +0100)]
Collisions in the dep-graph due to path-reuse are rare but can occur.

So, instead of ICE'ing, just fail to mark green in such cases
(for `DepKind::{Hir, HirBody, CrateMetadata}`).

Fix #62649.

4 years agocheck_match: extract common logic
Mazdak Farrokhzad [Thu, 23 Jan 2020 02:30:56 +0000 (03:30 +0100)]
check_match: extract common logic

4 years agoFix LLVM assertion failure in MSP430 interrupt generation.
William D. Jones [Mon, 27 Jan 2020 14:05:31 +0000 (09:05 -0500)]
Fix LLVM assertion failure in MSP430 interrupt generation.

4 years agoUpdate src/librustc_error_codes/error_codes/E0220.md
Guillaume Gomez [Mon, 27 Jan 2020 15:06:38 +0000 (16:06 +0100)]
Update src/librustc_error_codes/error_codes/E0220.md

Co-Authored-By: Dylan DPC <dylan.dpc@gmail.com>
4 years agoAuto merge of #68566 - pietroalbini:rollup-22hbo3e, r=pietroalbini
bors [Mon, 27 Jan 2020 11:59:57 +0000 (11:59 +0000)]
Auto merge of #68566 - pietroalbini:rollup-22hbo3e, r=pietroalbini

Rollup of 4 pull requests

Successful merges:

 - #67928 (Update RELEASES.md for 1.41.0)
 - #68370 (Ensure that we error when calling "const extern fn" with wrong convention)
 - #68531 ([self-profiler] Two small cleanups)
 - #68562 (Fix spelling errors)

Failed merges:

r? @ghost

4 years agoRollup merge of #68562 - hjung4:spell, r=jonas-schievink
Pietro Albini [Mon, 27 Jan 2020 11:50:52 +0000 (12:50 +0100)]
Rollup merge of #68562 - hjung4:spell, r=jonas-schievink

Fix spelling errors

4 years agoRollup merge of #68531 - wesleywiser:cleanup_self_profiler, r=michaelwoerister
Pietro Albini [Mon, 27 Jan 2020 11:50:50 +0000 (12:50 +0100)]
Rollup merge of #68531 - wesleywiser:cleanup_self_profiler, r=michaelwoerister

[self-profiler] Two small cleanups

r? @michaelwoerister