Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 16 pull requests #62192

Merged
merged 45 commits into from
Jun 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b66dcb9
explain better that structural pinning is a per-field choice
RalfJung Jun 15, 2019
c489636
mention that overwrite-without-drop also violates the drop guarantee,…
RalfJung Jun 15, 2019
665aa3e
minor edits
RalfJung Jun 15, 2019
86e283a
keep links in local crate where possible
RalfJung Jun 16, 2019
2eb074d
make example code typecheck at least
RalfJung Jun 16, 2019
f250951
Apply suggestions from code review
RalfJung Jun 19, 2019
bf03a3c
nits
RalfJung Jun 19, 2019
a99a7b7
Remove FnBox.
Centril Jun 22, 2019
1c12b1b
call out explicitly that general read needs to be called with an init…
RalfJung Jun 24, 2019
b75021b
refactor lexer to use idiomatic borrowing
matklad Jun 25, 2019
0f34d7a
Updated RELEASES.md for 1.36.0
XAMPPRocky Jun 23, 2019
ba12e78
Add more tests for async/await
cramertj Jun 25, 2019
57db25e
cleanup: rename name_from to symbol_from
matklad Jun 25, 2019
390f717
tweak wording
RalfJung Jun 25, 2019
dedcd97
Use f{32,64}::from_bits
Xanewok Jun 25, 2019
12806b7
Fix clippy::redundant_field_names
Xanewok Jun 25, 2019
6c93b47
Fix clippy::cast_losless
Xanewok Jun 26, 2019
33f58ba
Fix clippy::redundant_closure
Xanewok Jun 26, 2019
1af1f62
Fix clippy::print_with_newline
Xanewok Jun 26, 2019
ad62b42
Fix clippy::precedence
Xanewok Jun 26, 2019
5cb841d
Don't ICE on item in `.await` expression
doctorn Jun 26, 2019
182ce77
remove old fixme
mark-i-m Jun 26, 2019
72ca844
Add regression test for MIR drop generation in async loops
cramertj Jun 26, 2019
7e62050
Update books
ehuss Jun 26, 2019
e053eed
Remove outdated question_mark_macro_sep lint
ia0 Jun 26, 2019
768d500
save-analysis: use buffered writes
jsgf Jun 27, 2019
b608749
rustc: Retry SIGILL linker invocations
alexcrichton Jun 27, 2019
d79104b
Update RLS
Xanewok Jun 27, 2019
8819420
Add suggestion for missing `.await` keyword
doctorn Jun 19, 2019
7ddfae7
Rollup merge of #61878 - RalfJung:pin, r=Dylan-DPC
Centril Jun 27, 2019
2f6cf36
Rollup merge of #62043 - Centril:remove-fnbox, r=cramertj
Centril Jun 27, 2019
df97fc6
Rollup merge of #62067 - doctorn:await_diagnostic, r=matthewjasper
Centril Jun 27, 2019
1c7d311
Rollup merge of #62076 - XAMPPRocky:master, r=XAMPPRocky
Centril Jun 27, 2019
36b26e9
Rollup merge of #62102 - RalfJung:read, r=Centril
Centril Jun 27, 2019
e8f3986
Rollup merge of #62106 - cramertj:test-await, r=centril
Centril Jun 27, 2019
bc335d6
Rollup merge of #62124 - matklad:without-with, r=petrochenkov
Centril Jun 27, 2019
4aa3e27
Rollup merge of #62131 - Xanewok:clip-some-nits, r=petrochenkov
Centril Jun 27, 2019
274c3de
Rollup merge of #62152 - doctorn:async_let_ice, r=cramertj
Centril Jun 27, 2019
0fe028e
Rollup merge of #62154 - mark-i-m:old-fixme, r=Centril
Centril Jun 27, 2019
a1a0e0c
Rollup merge of #62155 - cramertj:61872, r=centril
Centril Jun 27, 2019
766795f
Rollup merge of #62156 - ehuss:update-books, r=ehuss
Centril Jun 27, 2019
fdf75af
Rollup merge of #62160 - ia0:question_mark_macro_sep, r=petrochenkov
Centril Jun 27, 2019
dec2c8b
Rollup merge of #62164 - jsgf:buffer-save-analysis, r=Xanewok
Centril Jun 27, 2019
d6fd059
Rollup merge of #62171 - alexcrichton:more-restarts, r=eddyb
Centril Jun 27, 2019
65f1ff4
Rollup merge of #62176 - Xanewok:update-rls, r=alexcrichton
Centril Jun 27, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 102 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,104 @@
Version 1.36.0 (2019-07-04)
==========================

Language
--------
- [Non-Lexical Lifetimes are now enabled on the 2015 edition.][59114]
- [The order of traits in trait objects no longer affects the semantics of that
object.][59445] e.g. `dyn Send + fmt::Debug` is now equivalent to
`dyn fmt::Debug + Send`, where this was previously not the case.

Libraries
---------
- [`HashMap`'s implementation has been replaced with `hashbrown::HashMap` implementation.][58623]
- [`TryFromSliceError` now implements `From<Infallible>`.][60318]
- [`mem::needs_drop` is now available as a const fn.][60364]
- [`alloc::Layout::from_size_align_unchecked` is now available as a const fn.][60370]
- [`String` now implements `BorrowMut<str>`.][60404]
- [`io::Cursor` now implements `Default`.][60234]
- [Both `NonNull::{dangling, cast}` are now const fns.][60244]
- [The `alloc` crate is now stable.][59675] `alloc` allows you to use a subset
of `std` (e.g. `Vec`, `Box`, `Arc`) in `#![no_std]` environments if the
environment has access to heap memory allocation.
- [`String` now implements `From<&String>`.][59825]
- [You can now pass multiple arguments to the `dbg!` macro.][59826] `dbg!` will
return a tuple of each argument when there is multiple arguments.
- [`Result::{is_err, is_ok}` are now `#[must_use]` and will produce a warning if
not used.][59648]

Stabilized APIs
---------------
- [`VecDeque::rotate_left`]
- [`VecDeque::rotate_right`]
- [`Iterator::copied`]
- [`io::IoSlice`]
- [`io::IoSliceMut`]
- [`Read::read_vectored`]
- [`Write::write_vectored`]
- [`str::as_mut_ptr`]
- [`mem::MaybeUninit`]
- [`pointer::align_offset`]
- [`future::Future`]
- [`task::Context`]
- [`task::RawWaker`]
- [`task::RawWakerVTable`]
- [`task::Waker`]
- [`task::Poll`]

Cargo
-----
- [Cargo will now produce an error if you attempt to use the name of a required dependency as a feature.][cargo/6860]
- [You can now pass the `--offline` flag to run cargo without accessing the network.][cargo/6934]

You can find further change's in [Cargo's 1.36.0 release notes][cargo-1-36-0].

Clippy
------
There have been numerous additions and fixes to clippy, see [Clippy's 1.36.0 release notes][clippy-1-36-0] for more details.

Misc
----

Compatibility Notes
-------------------
- With the stabilisation of `mem::MaybeUninit`, `mem::uninitialized` use is no
longer recommended, and will be deprecated in 1.38.0.

[60318]: https://github.com/rust-lang/rust/pull/60318/
[60364]: https://github.com/rust-lang/rust/pull/60364/
[60370]: https://github.com/rust-lang/rust/pull/60370/
[60404]: https://github.com/rust-lang/rust/pull/60404/
[60234]: https://github.com/rust-lang/rust/pull/60234/
[60244]: https://github.com/rust-lang/rust/pull/60244/
[58623]: https://github.com/rust-lang/rust/pull/58623/
[59648]: https://github.com/rust-lang/rust/pull/59648/
[59675]: https://github.com/rust-lang/rust/pull/59675/
[59825]: https://github.com/rust-lang/rust/pull/59825/
[59826]: https://github.com/rust-lang/rust/pull/59826/
[59445]: https://github.com/rust-lang/rust/pull/59445/
[59114]: https://github.com/rust-lang/rust/pull/59114/
[cargo/6860]: https://github.com/rust-lang/cargo/pull/6860/
[cargo/6934]: https://github.com/rust-lang/cargo/pull/6934/
[`VecDeque::rotate_left`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.rotate_left
[`VecDeque::rotate_right`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.rotate_right
[`Iterator::copied`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#tymethod.copied
[`io::IoSlice`]: https://doc.rust-lang.org/std/io/struct.IoSlice.html
[`io::IoSliceMut`]: https://doc.rust-lang.org/std/io/struct.IoSliceMut.html
[`Read::read_vectored`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_vectored
[`Write::write_vectored`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_vectored
[`str::as_mut_ptr`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_mut_ptr
[`mem::MaybeUninit`]: https://doc.rust-lang.org/std/mem/union.MaybeUninit.html
[`pointer::align_offset`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.align_offset
[`future::Future`]: https://doc.rust-lang.org/std/future/trait.Future.html
[`task::Context`]: https://doc.rust-lang.org/beta/std/task/struct.Context.html
[`task::RawWaker`]: https://doc.rust-lang.org/beta/std/task/struct.RawWaker.html
[`task::RawWakerVTable`]: https://doc.rust-lang.org/beta/std/task/struct.RawWakerVTable.html
[`task::Waker`]: https://doc.rust-lang.org/beta/std/task/struct.Waker.html
[`task::Poll`]: https://doc.rust-lang.org/beta/std/task/enum.Poll.html
[clippy-1-36-0]: https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-136
[cargo-1-36-0]: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-136-2019-07-04


Version 1.35.0 (2019-05-23)
==========================

Expand Down Expand Up @@ -62,7 +163,7 @@ Cargo
- [You can now set `cargo:rustc-cdylib-link-arg` at build time to pass custom
linker arguments when building a `cdylib`.][cargo/6298] Its usage is highly
platform specific.

Misc
----
- [The Rust toolchain is now available natively for musl based distros.][58575]
Expand Down
2 changes: 1 addition & 1 deletion src/doc/nomicon
2 changes: 1 addition & 1 deletion src/doc/reference
2 changes: 1 addition & 1 deletion src/doc/rust-by-example
2 changes: 1 addition & 1 deletion src/doc/rustc-guide
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ fn main () {
}
```

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.

[#28796]: https://github.com/rust-lang/rust/issues/28796
One of the objectives of this feature is to allow `Box<dyn FnOnce>`.

## Variable length arrays

Expand Down
32 changes: 0 additions & 32 deletions src/doc/unstable-book/src/library-features/fnbox.md

This file was deleted.

79 changes: 0 additions & 79 deletions src/liballoc/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -761,85 +761,6 @@ impl<A, F: Fn<A> + ?Sized> Fn<A> for Box<F> {
}
}

/// `FnBox` is deprecated and will be removed.
/// `Box<dyn FnOnce()>` can be called directly, since Rust 1.35.0.
///
/// `FnBox` is a version of the `FnOnce` intended for use with boxed
/// closure objects. The idea was that where one would normally store a
/// `Box<dyn FnOnce()>` in a data structure, you whould use
/// `Box<dyn FnBox()>`. The two traits behave essentially the same, except
/// that a `FnBox` closure can only be called if it is boxed.
///
/// # Examples
///
/// Here is a snippet of code which creates a hashmap full of boxed
/// once closures and then removes them one by one, calling each
/// closure as it is removed. Note that the type of the closures
/// stored in the map is `Box<dyn FnBox() -> i32>` and not `Box<dyn FnOnce()
/// -> i32>`.
///
/// ```
/// #![feature(fnbox)]
/// #![allow(deprecated)]
///
/// use std::boxed::FnBox;
/// use std::collections::HashMap;
///
/// fn make_map() -> HashMap<i32, Box<dyn FnBox() -> i32>> {
/// let mut map: HashMap<i32, Box<dyn FnBox() -> i32>> = HashMap::new();
/// map.insert(1, Box::new(|| 22));
/// map.insert(2, Box::new(|| 44));
/// map
/// }
///
/// fn main() {
/// let mut map = make_map();
/// for i in &[1, 2] {
/// let f = map.remove(&i).unwrap();
/// assert_eq!(f(), i * 22);
/// }
/// }
/// ```
///
/// In Rust 1.35.0 or later, use `FnOnce`, `FnMut`, or `Fn` instead:
///
/// ```
/// use std::collections::HashMap;
///
/// fn make_map() -> HashMap<i32, Box<dyn FnOnce() -> i32>> {
/// let mut map: HashMap<i32, Box<dyn FnOnce() -> i32>> = HashMap::new();
/// map.insert(1, Box::new(|| 22));
/// map.insert(2, Box::new(|| 44));
/// map
/// }
///
/// fn main() {
/// let mut map = make_map();
/// for i in &[1, 2] {
/// let f = map.remove(&i).unwrap();
/// assert_eq!(f(), i * 22);
/// }
/// }
/// ```
#[rustc_paren_sugar]
#[unstable(feature = "fnbox", issue = "28796")]
#[rustc_deprecated(reason = "use `FnOnce`, `FnMut`, or `Fn` instead", since = "1.37.0")]
pub trait FnBox<A>: FnOnce<A> {
/// Performs the call operation.
fn call_box(self: Box<Self>, args: A) -> Self::Output;
}

#[unstable(feature = "fnbox", issue = "28796")]
#[rustc_deprecated(reason = "use `FnOnce`, `FnMut`, or `Fn` instead", since = "1.37.0")]
#[allow(deprecated, deprecated_in_future)]
impl<A, F> FnBox<A> for F
where F: FnOnce<A>
{
fn call_box(self: Box<F>, args: A) -> F::Output {
self.call_once(args)
}
}

#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Box<U>> for Box<T> {}

Expand Down
1 change: 1 addition & 0 deletions src/libcore/future/future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ use crate::task::{Context, Poll};
#[doc(spotlight)]
#[must_use = "futures do nothing unless you `.await` or poll them"]
#[stable(feature = "futures_api", since = "1.36.0")]
#[cfg_attr(not(bootstrap), lang = "future_trait")]
pub trait Future {
/// The type of value produced on completion.
#[stable(feature = "futures_api", since = "1.36.0")]
Expand Down
Loading