Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 064101d

Browse files
committedJun 26, 2019
Auto merge of #62139 - Centril:rollup-jvwtako, r=Centril
Rollup of 8 pull requests Successful merges: - #60340 (Rename .cap() methods to .capacity()) - #61767 (Update new_debug_unreachable) - #62043 (Remove `FnBox`) - #62076 (Updated RELEASES.md for 1.36.0) - #62102 (call out explicitly that general read needs to be called with an initialized buffer) - #62104 (Inform the query system about properties of queries at compile time) - #62106 (Add more tests for async/await) - #62124 (refactor lexer to use idiomatic borrowing) Failed merges: r? @ghost
2 parents d3e2cec + 68a1823 commit 064101d

File tree

29 files changed

+730
-415
lines changed

29 files changed

+730
-415
lines changed
 

‎Cargo.lock

+4-22
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ version = "0.1.4"
10301030
source = "registry+https://github.com/rust-lang/crates.io-index"
10311031
dependencies = [
10321032
"mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
1033-
"new_debug_unreachable 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
1033+
"new_debug_unreachable 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
10341034
]
10351035

10361036
[[package]]
@@ -1760,11 +1760,8 @@ dependencies = [
17601760

17611761
[[package]]
17621762
name = "new_debug_unreachable"
1763-
version = "1.0.1"
1763+
version = "1.0.3"
17641764
source = "registry+https://github.com/rust-lang/crates.io-index"
1765-
dependencies = [
1766-
"unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
1767-
]
17681765

17691766
[[package]]
17701767
name = "nodrop"
@@ -3450,7 +3447,7 @@ version = "0.7.3"
34503447
source = "registry+https://github.com/rust-lang/crates.io-index"
34513448
dependencies = [
34523449
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
3453-
"new_debug_unreachable 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
3450+
"new_debug_unreachable 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
34543451
"phf_shared 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)",
34553452
"precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
34563453
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4038,14 +4035,6 @@ name = "unicode_categories"
40384035
version = "0.1.1"
40394036
source = "registry+https://github.com/rust-lang/crates.io-index"
40404037

4041-
[[package]]
4042-
name = "unreachable"
4043-
version = "1.0.0"
4044-
source = "registry+https://github.com/rust-lang/crates.io-index"
4045-
dependencies = [
4046-
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
4047-
]
4048-
40494038
[[package]]
40504039
name = "unstable-book-gen"
40514040
version = "0.1.0"
@@ -4124,11 +4113,6 @@ name = "version_check"
41244113
version = "0.1.5"
41254114
source = "registry+https://github.com/rust-lang/crates.io-index"
41264115

4127-
[[package]]
4128-
name = "void"
4129-
version = "1.0.2"
4130-
source = "registry+https://github.com/rust-lang/crates.io-index"
4131-
41324116
[[package]]
41334117
name = "vte"
41344118
version = "0.3.3"
@@ -4388,7 +4372,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
43884372
"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
43894373
"checksum miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "396aa0f2003d7df8395cb93e09871561ccc3e785f0acb369170e8cc74ddf9226"
43904374
"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
4391-
"checksum new_debug_unreachable 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0cdc457076c78ab54d5e0d6fa7c47981757f1e34dc39ff92787f217dede586c4"
4375+
"checksum new_debug_unreachable 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f40f005c60db6e03bae699e414c58bf9aa7ea02a2d0b9bfbcf19286cc4c82b30"
43924376
"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2"
43934377
"checksum num-derive 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8af1847c907c2f04d7bfd572fb25bbb4385c637fe5be163cf2f8c5d778fe1e7d"
43944378
"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea"
@@ -4552,7 +4536,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
45524536
"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
45534537
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
45544538
"checksum unicode_categories 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e"
4555-
"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
45564539
"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a"
45574540
"checksum url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74e7d099f1ee52f823d4bdd60c93c3602043c728f5db3b97bdb548467f7bddea"
45584541
"checksum utf-8 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1262dfab4c30d5cb7c07026be00ee343a6cf5027fdc0104a9160f354e5db75c"
@@ -4562,7 +4545,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
45624545
"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
45634546
"checksum vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6aba5e34f93dc7051dfad05b98a18e9156f27e7b431fe1d2398cb6061c0a1dba"
45644547
"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
4565-
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
45664548
"checksum vte 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4f42f536e22f7fcbb407639765c8fd78707a33109301f834a594758bedd6e8cf"
45674549
"checksum walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1"
45684550
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"

‎RELEASES.md

+102-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,104 @@
1+
Version 1.36.0 (2019-07-04)
2+
==========================
3+
4+
Language
5+
--------
6+
- [Non-Lexical Lifetimes are now enabled on the 2015 edition.][59114]
7+
- [The order of traits in trait objects no longer affects the semantics of that
8+
object.][59445] e.g. `dyn Send + fmt::Debug` is now equivalent to
9+
`dyn fmt::Debug + Send`, where this was previously not the case.
10+
11+
Libraries
12+
---------
13+
- [`HashMap`'s implementation has been replaced with `hashbrown::HashMap` implementation.][58623]
14+
- [`TryFromSliceError` now implements `From<Infallible>`.][60318]
15+
- [`mem::needs_drop` is now available as a const fn.][60364]
16+
- [`alloc::Layout::from_size_align_unchecked` is now available as a const fn.][60370]
17+
- [`String` now implements `BorrowMut<str>`.][60404]
18+
- [`io::Cursor` now implements `Default`.][60234]
19+
- [Both `NonNull::{dangling, cast}` are now const fns.][60244]
20+
- [The `alloc` crate is now stable.][59675] `alloc` allows you to use a subset
21+
of `std` (e.g. `Vec`, `Box`, `Arc`) in `#![no_std]` environments if the
22+
environment has access to heap memory allocation.
23+
- [`String` now implements `From<&String>`.][59825]
24+
- [You can now pass multiple arguments to the `dbg!` macro.][59826] `dbg!` will
25+
return a tuple of each argument when there is multiple arguments.
26+
- [`Result::{is_err, is_ok}` are now `#[must_use]` and will produce a warning if
27+
not used.][59648]
28+
29+
Stabilized APIs
30+
---------------
31+
- [`VecDeque::rotate_left`]
32+
- [`VecDeque::rotate_right`]
33+
- [`Iterator::copied`]
34+
- [`io::IoSlice`]
35+
- [`io::IoSliceMut`]
36+
- [`Read::read_vectored`]
37+
- [`Write::write_vectored`]
38+
- [`str::as_mut_ptr`]
39+
- [`mem::MaybeUninit`]
40+
- [`pointer::align_offset`]
41+
- [`future::Future`]
42+
- [`task::Context`]
43+
- [`task::RawWaker`]
44+
- [`task::RawWakerVTable`]
45+
- [`task::Waker`]
46+
- [`task::Poll`]
47+
48+
Cargo
49+
-----
50+
- [Cargo will now produce an error if you attempt to use the name of a required dependency as a feature.][cargo/6860]
51+
- [You can now pass the `--offline` flag to run cargo without accessing the network.][cargo/6934]
52+
53+
You can find further change's in [Cargo's 1.36.0 release notes][cargo-1-36-0].
54+
55+
Clippy
56+
------
57+
There have been numerous additions and fixes to clippy, see [Clippy's 1.36.0 release notes][clippy-1-36-0] for more details.
58+
59+
Misc
60+
----
61+
62+
Compatibility Notes
63+
-------------------
64+
- With the stabilisation of `mem::MaybeUninit`, `mem::uninitialized` use is no
65+
longer recommended, and will be deprecated in 1.38.0.
66+
67+
[60318]: https://github.com/rust-lang/rust/pull/60318/
68+
[60364]: https://github.com/rust-lang/rust/pull/60364/
69+
[60370]: https://github.com/rust-lang/rust/pull/60370/
70+
[60404]: https://github.com/rust-lang/rust/pull/60404/
71+
[60234]: https://github.com/rust-lang/rust/pull/60234/
72+
[60244]: https://github.com/rust-lang/rust/pull/60244/
73+
[58623]: https://github.com/rust-lang/rust/pull/58623/
74+
[59648]: https://github.com/rust-lang/rust/pull/59648/
75+
[59675]: https://github.com/rust-lang/rust/pull/59675/
76+
[59825]: https://github.com/rust-lang/rust/pull/59825/
77+
[59826]: https://github.com/rust-lang/rust/pull/59826/
78+
[59445]: https://github.com/rust-lang/rust/pull/59445/
79+
[59114]: https://github.com/rust-lang/rust/pull/59114/
80+
[cargo/6860]: https://github.com/rust-lang/cargo/pull/6860/
81+
[cargo/6934]: https://github.com/rust-lang/cargo/pull/6934/
82+
[`VecDeque::rotate_left`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.rotate_left
83+
[`VecDeque::rotate_right`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.rotate_right
84+
[`Iterator::copied`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#tymethod.copied
85+
[`io::IoSlice`]: https://doc.rust-lang.org/std/io/struct.IoSlice.html
86+
[`io::IoSliceMut`]: https://doc.rust-lang.org/std/io/struct.IoSliceMut.html
87+
[`Read::read_vectored`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_vectored
88+
[`Write::write_vectored`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_vectored
89+
[`str::as_mut_ptr`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_mut_ptr
90+
[`mem::MaybeUninit`]: https://doc.rust-lang.org/std/mem/union.MaybeUninit.html
91+
[`pointer::align_offset`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.align_offset
92+
[`future::Future`]: https://doc.rust-lang.org/std/future/trait.Future.html
93+
[`task::Context`]: https://doc.rust-lang.org/beta/std/task/struct.Context.html
94+
[`task::RawWaker`]: https://doc.rust-lang.org/beta/std/task/struct.RawWaker.html
95+
[`task::RawWakerVTable`]: https://doc.rust-lang.org/beta/std/task/struct.RawWakerVTable.html
96+
[`task::Waker`]: https://doc.rust-lang.org/beta/std/task/struct.Waker.html
97+
[`task::Poll`]: https://doc.rust-lang.org/beta/std/task/enum.Poll.html
98+
[clippy-1-36-0]: https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-136
99+
[cargo-1-36-0]: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-136-2019-07-04
100+
101+
1102
Version 1.35.0 (2019-05-23)
2103
==========================
3104

@@ -62,7 +163,7 @@ Cargo
62163
- [You can now set `cargo:rustc-cdylib-link-arg` at build time to pass custom
63164
linker arguments when building a `cdylib`.][cargo/6298] Its usage is highly
64165
platform specific.
65-
166+
66167
Misc
67168
----
68169
- [The Rust toolchain is now available natively for musl based distros.][58575]

‎src/doc/unstable-book/src/language-features/unsized-locals.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,7 @@ fn main () {
117117
}
118118
```
119119

120-
One of the objectives of this feature is to allow `Box<dyn FnOnce>`, instead of `Box<dyn FnBox>` in the future. See [#28796] for details.
121-
122-
[#28796]: https://github.com/rust-lang/rust/issues/28796
120+
One of the objectives of this feature is to allow `Box<dyn FnOnce>`.
123121

124122
## Variable length arrays
125123

‎src/doc/unstable-book/src/library-features/fnbox.md

-32
This file was deleted.

‎src/liballoc/boxed.rs

-79
Original file line numberDiff line numberDiff line change
@@ -761,85 +761,6 @@ impl<A, F: Fn<A> + ?Sized> Fn<A> for Box<F> {
761761
}
762762
}
763763

764-
/// `FnBox` is deprecated and will be removed.
765-
/// `Box<dyn FnOnce()>` can be called directly, since Rust 1.35.0.
766-
///
767-
/// `FnBox` is a version of the `FnOnce` intended for use with boxed
768-
/// closure objects. The idea was that where one would normally store a
769-
/// `Box<dyn FnOnce()>` in a data structure, you whould use
770-
/// `Box<dyn FnBox()>`. The two traits behave essentially the same, except
771-
/// that a `FnBox` closure can only be called if it is boxed.
772-
///
773-
/// # Examples
774-
///
775-
/// Here is a snippet of code which creates a hashmap full of boxed
776-
/// once closures and then removes them one by one, calling each
777-
/// closure as it is removed. Note that the type of the closures
778-
/// stored in the map is `Box<dyn FnBox() -> i32>` and not `Box<dyn FnOnce()
779-
/// -> i32>`.
780-
///
781-
/// ```
782-
/// #![feature(fnbox)]
783-
/// #![allow(deprecated)]
784-
///
785-
/// use std::boxed::FnBox;
786-
/// use std::collections::HashMap;
787-
///
788-
/// fn make_map() -> HashMap<i32, Box<dyn FnBox() -> i32>> {
789-
/// let mut map: HashMap<i32, Box<dyn FnBox() -> i32>> = HashMap::new();
790-
/// map.insert(1, Box::new(|| 22));
791-
/// map.insert(2, Box::new(|| 44));
792-
/// map
793-
/// }
794-
///
795-
/// fn main() {
796-
/// let mut map = make_map();
797-
/// for i in &[1, 2] {
798-
/// let f = map.remove(&i).unwrap();
799-
/// assert_eq!(f(), i * 22);
800-
/// }
801-
/// }
802-
/// ```
803-
///
804-
/// In Rust 1.35.0 or later, use `FnOnce`, `FnMut`, or `Fn` instead:
805-
///
806-
/// ```
807-
/// use std::collections::HashMap;
808-
///
809-
/// fn make_map() -> HashMap<i32, Box<dyn FnOnce() -> i32>> {
810-
/// let mut map: HashMap<i32, Box<dyn FnOnce() -> i32>> = HashMap::new();
811-
/// map.insert(1, Box::new(|| 22));
812-
/// map.insert(2, Box::new(|| 44));
813-
/// map
814-
/// }
815-
///
816-
/// fn main() {
817-
/// let mut map = make_map();
818-
/// for i in &[1, 2] {
819-
/// let f = map.remove(&i).unwrap();
820-
/// assert_eq!(f(), i * 22);
821-
/// }
822-
/// }
823-
/// ```
824-
#[rustc_paren_sugar]
825-
#[unstable(feature = "fnbox", issue = "28796")]
826-
#[rustc_deprecated(reason = "use `FnOnce`, `FnMut`, or `Fn` instead", since = "1.37.0")]
827-
pub trait FnBox<A>: FnOnce<A> {
828-
/// Performs the call operation.
829-
fn call_box(self: Box<Self>, args: A) -> Self::Output;
830-
}
831-
832-
#[unstable(feature = "fnbox", issue = "28796")]
833-
#[rustc_deprecated(reason = "use `FnOnce`, `FnMut`, or `Fn` instead", since = "1.37.0")]
834-
#[allow(deprecated, deprecated_in_future)]
835-
impl<A, F> FnBox<A> for F
836-
where F: FnOnce<A>
837-
{
838-
fn call_box(self: Box<F>, args: A) -> F::Output {
839-
self.call_once(args)
840-
}
841-
}
842-
843764
#[unstable(feature = "coerce_unsized", issue = "27732")]
844765
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Box<U>> for Box<T> {}
845766

0 commit comments

Comments
 (0)
Please sign in to comment.