allow shorthand syntax for deprecation reason#58166
Merged
bors merged 1 commit intorust-lang:masterfrom Feb 13, 2019
Merged
Conversation
Contributor
|
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
euclio
commented
Feb 4, 2019
Member
estebank
approved these changes
Feb 5, 2019
6547d8c to
873e1eb
Compare
petrochenkov
reviewed
Feb 5, 2019
Contributor
873e1eb to
113b7f7
Compare
Contributor
|
@bors r=petrochenkov |
Collaborator
|
📌 Commit 113b7f7 has been approved by |
Collaborator
|
⌛ Testing commit 113b7f7 with merge c85e9a59f293bc7f5ece9d0d0d04b34a16a33f66... |
Collaborator
|
💔 Test failed - checks-travis |
Contributor
|
Your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Member
Collaborator
|
⌛ Testing commit 113b7f7 with merge da6ebd3a590733bd9f50b3c7c31d24c7505ccf55... |
Collaborator
|
💔 Test failed - status-appveyor |
Contributor
|
@bors retry empty log on windows test |
Centril
added a commit
to Centril/rust
that referenced
this pull request
Feb 13, 2019
…rochenkov allow shorthand syntax for deprecation reason Fixes rust-lang#48271. Created based on discussion in rust-lang#56896.
Centril
added a commit
to Centril/rust
that referenced
this pull request
Feb 13, 2019
…rochenkov allow shorthand syntax for deprecation reason Fixes rust-lang#48271. Created based on discussion in rust-lang#56896.
bors
added a commit
that referenced
this pull request
Feb 13, 2019
Rollup of 13 pull requests Successful merges: - #57693 (Doc rewording) - #57815 (Speed up the fast path for assert_eq! and assert_ne!) - #58034 (Stabilize the time_checked_add feature) - #58057 (Stabilize linker-plugin based LTO (aka cross-language LTO)) - #58137 (Cleanup: rename node_id_to_type(_opt)) - #58166 (allow shorthand syntax for deprecation reason) - #58196 (Add specific feature gate error for const-unstable features) - #58200 (fix str mutating through a ptr derived from &self) - #58273 (Rename rustc_errors dependency in rust 2018 crates) - #58289 (impl iter() for dyn Error) - #58387 (Disallow `auto` trait alias syntax) - #58404 (use Ubuntu keyserver for CloudABI ports) - #58405 (Remove some dead code from libcore) Failed merges: r? @ghost
Centril
added a commit
to Centril/rust
that referenced
this pull request
Feb 13, 2019
…rochenkov allow shorthand syntax for deprecation reason Fixes rust-lang#48271. Created based on discussion in rust-lang#56896.
bors
added a commit
that referenced
this pull request
Feb 13, 2019
Rollup of 12 pull requests Successful merges: - #57693 (Doc rewording) - #57815 (Speed up the fast path for assert_eq! and assert_ne!) - #58034 (Stabilize the time_checked_add feature) - #58057 (Stabilize linker-plugin based LTO (aka cross-language LTO)) - #58137 (Cleanup: rename node_id_to_type(_opt)) - #58166 (allow shorthand syntax for deprecation reason) - #58200 (fix str mutating through a ptr derived from &self) - #58273 (Rename rustc_errors dependency in rust 2018 crates) - #58289 (impl iter() for dyn Error) - #58387 (Disallow `auto` trait alias syntax) - #58404 (use Ubuntu keyserver for CloudABI ports) - #58405 (Remove some dead code from libcore) Failed merges: r? @ghost
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this pull request
Apr 14, 2019
Pkgsrc changes:
* Bump required rust version to build to 1.33.0.
* Adapt patches to changed file locations.
* (I worry about 32-bit ports, now that Atomic64 apparently is First-Class;
this has been built on NetBSD/amd64 so far)
Upstream changes:
Version 1.34.0 (2019-04-11)
==========================
Language
--------
- [You can now use `#[deprecated = "reason"]`][58166] as a shorthand for
`#[deprecated(note = "reason")]`. This was previously allowed by mistake
but had no effect.
- [You can now accept token streams in `#[attr()]`,`#[attr[]]`, and
`#[attr{}]` procedural macros.][57367]
- [You can now write `extern crate self as foo;`][57407] to import your
crate's root into the extern prelude.
Compiler
--------
- [You can now target `riscv64imac-unknown-none-elf` and
`riscv64gc-unknown-none-elf`.][58406]
- [You can now enable linker plugin LTO optimisations with
`-C linker-plugin-lto`.][58057] This allows rustc to compile your Rust code
into LLVM bitcode allowing LLVM to perform LTO optimisations across C/C++ FFI
boundaries.
- [You can now target `powerpc64-unknown-freebsd`.][57809]
Libraries
---------
- [The trait bounds have been removed on some of `HashMap<K, V, S>`'s and
`HashSet<T, S>`'s basic methods.][58370] Most notably you no longer require
the `Hash` trait to create an iterator.
- [The `Ord` trait bounds have been removed on some of `BinaryHeap<T>`'s basic
methods.][58421] Most notably you no longer require the `Ord` trait to create
an iterator.
- [The methods `overflowing_neg` and `wrapping_neg` are now `const` functions
for all numeric types.][58044]
- [Indexing a `str` is now generic over all types that
implement `SliceIndex<str>`.][57604]
- [`str::trim`, `str::trim_matches`, `str::trim_{start, end}`, and
`str::trim_{start, end}_matches` are now `#[must_use]`][57106] and will
produce a warning if their returning type is unused.
- [The methods `checked_pow`, `saturating_pow`, `wrapping_pow`, and
`overflowing_pow` are now available for all numeric types.][57873] These are
equivalvent to methods such as `wrapping_add` for the `pow` operation.
Stabilized APIs
---------------
#### std & core
* [`Any::type_id`]
* [`Error::type_id`]
* [`atomic::AtomicI16`]
* [`atomic::AtomicI32`]
* [`atomic::AtomicI64`]
* [`atomic::AtomicI8`]
* [`atomic::AtomicU16`]
* [`atomic::AtomicU32`]
* [`atomic::AtomicU64`]
* [`atomic::AtomicU8`]
* [`convert::Infallible`]
* [`convert::TryFrom`]
* [`convert::TryInto`]
* [`iter::from_fn`]
* [`iter::successors`]
* [`num::NonZeroI128`]
* [`num::NonZeroI16`]
* [`num::NonZeroI32`]
* [`num::NonZeroI64`]
* [`num::NonZeroI8`]
* [`num::NonZeroIsize`]
* [`slice::sort_by_cached_key`]
* [`str::escape_debug`]
* [`str::escape_default`]
* [`str::escape_unicode`]
* [`str::split_ascii_whitespace`]
#### std
* [`Instant::checked_add`]
* [`Instant::checked_sub`]
* [`SystemTime::checked_add`]
* [`SystemTime::checked_sub`]
Cargo
-----
- [You can now use alternative registries to crates.io.][cargo/6654]
Misc
----
- [You can now use the `?` operator in your documentation tests without manually
adding `fn main() -> Result<(), _> {}`.][56470]
Compatibility Notes
-------------------
- [`Command::before_exec` is now deprecated in favor of the
unsafe method `Command::pre_exec`.][58059]
- [Use of `ATOMIC_{BOOL, ISIZE, USIZE}_INIT` is now deprecated.][57425] As you
can now use `const` functions in `static` variables.
[58370]: rust-lang/rust#58370
[58406]: rust-lang/rust#58406
[58421]: rust-lang/rust#58421
[58166]: rust-lang/rust#58166
[58044]: rust-lang/rust#58044
[58057]: rust-lang/rust#58057
[58059]: rust-lang/rust#58059
[57809]: rust-lang/rust#57809
[57873]: rust-lang/rust#57873
[57604]: rust-lang/rust#57604
[57367]: rust-lang/rust#57367
[57407]: rust-lang/rust#57407
[57425]: rust-lang/rust#57425
[57106]: rust-lang/rust#57106
[56470]: rust-lang/rust#56470
[cargo/6654]: rust-lang/cargo#6654
[`Any::type_id`]: https://doc.rust-lang.org/std/any/trait.Any.html#tymethod.type_id
[`Error::type_id`]: https://doc.rust-lang.org/std/error/trait.Error.html#tymethod.type_id
[`atomic::AtomicI16`]: https://doc.rust-lang.org/std/atomic/struct.AtomicI16.html
[`atomic::AtomicI32`]: https://doc.rust-lang.org/std/atomic/struct.AtomicI32.html
[`atomic::AtomicI64`]: https://doc.rust-lang.org/std/atomic/struct.AtomicI64.html
[`atomic::AtomicI8`]: https://doc.rust-lang.org/std/atomic/struct.AtomicI8.html
[`atomic::AtomicU16`]: https://doc.rust-lang.org/std/atomic/struct.AtomicU16.html
[`atomic::AtomicU32`]: https://doc.rust-lang.org/std/atomic/struct.AtomicU32.html
[`atomic::AtomicU64`]: https://doc.rust-lang.org/std/atomic/struct.AtomicU64.html
[`atomic::AtomicU8`]: https://doc.rust-lang.org/std/atomic/struct.AtomicU8.html
[`convert::Infallible`]: https://doc.rust-lang.org/std/convert/enum.Infallible.html
[`convert::TryFrom`]: https://doc.rust-lang.org/std/convert/trait.TryFrom.html
[`convert::TryInto`]: https://doc.rust-lang.org/std/convert/trait.TryInto.html
[`iter::from_fn`]: https://doc.rust-lang.org/std/iter/fn.from_fn.html
[`iter::successors`]: https://doc.rust-lang.org/std/iter/fn.successors.html
[`num::NonZeroI128`]: https://doc.rust-lang.org/std/num/struct.NonZeroI128.html
[`num::NonZeroI16`]: https://doc.rust-lang.org/std/num/struct.NonZeroI16.html
[`num::NonZeroI32`]: https://doc.rust-lang.org/std/num/struct.NonZeroI32.html
[`num::NonZeroI64`]: https://doc.rust-lang.org/std/num/struct.NonZeroI64.html
[`num::NonZeroI8`]: https://doc.rust-lang.org/std/num/struct.NonZeroI8.html
[`num::NonZeroIsize`]: https://doc.rust-lang.org/std/num/struct.NonZeroIsize.html
[`slice::sort_by_cached_key`]: https://doc.rust-lang.org/std/slice/fn.sort_by_cached_key
[`str::escape_debug`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_debug
[`str::escape_default`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_default
[`str::escape_unicode`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_unicode
[`str::split_ascii_whitespace`]: https://doc.rust-lang.org/std/primitive.str.html#method.split_ascii_whitespace
[`Instant::checked_add`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_add
[`Instant::checked_sub`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_sub
[`SystemTime::checked_add`]: https://doc.rust-lang.org/std/time/struct.SystemTime.html#method.checked_add
[`SystemTime::checked_sub`]: https://doc.rust-lang.org/std/time/struct.SystemTime.html#method.checked_sub
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this pull request
May 19, 2019
Pkgsrc changes:
* Bump required rust version to build to 1.33.0.
* Adapt patches to changed file locations.
* (I worry about 32-bit ports, now that Atomic64 apparently is First-Class;
this has been built on NetBSD/amd64 so far)
Upstream changes:
Version 1.34.0 (2019-04-11)
==========================
Language
--------
- [You can now use `#[deprecated = "reason"]`][58166] as a shorthand for
`#[deprecated(note = "reason")]`. This was previously allowed by mistake
but had no effect.
- [You can now accept token streams in `#[attr()]`,`#[attr[]]`, and
`#[attr{}]` procedural macros.][57367]
- [You can now write `extern crate self as foo;`][57407] to import your
crate's root into the extern prelude.
Compiler
--------
- [You can now target `riscv64imac-unknown-none-elf` and
`riscv64gc-unknown-none-elf`.][58406]
- [You can now enable linker plugin LTO optimisations with
`-C linker-plugin-lto`.][58057] This allows rustc to compile your Rust code
into LLVM bitcode allowing LLVM to perform LTO optimisations across C/C++ FFI
boundaries.
- [You can now target `powerpc64-unknown-freebsd`.][57809]
Libraries
---------
- [The trait bounds have been removed on some of `HashMap<K, V, S>`'s and
`HashSet<T, S>`'s basic methods.][58370] Most notably you no longer require
the `Hash` trait to create an iterator.
- [The `Ord` trait bounds have been removed on some of `BinaryHeap<T>`'s basic
methods.][58421] Most notably you no longer require the `Ord` trait to create
an iterator.
- [The methods `overflowing_neg` and `wrapping_neg` are now `const` functions
for all numeric types.][58044]
- [Indexing a `str` is now generic over all types that
implement `SliceIndex<str>`.][57604]
- [`str::trim`, `str::trim_matches`, `str::trim_{start, end}`, and
`str::trim_{start, end}_matches` are now `#[must_use]`][57106] and will
produce a warning if their returning type is unused.
- [The methods `checked_pow`, `saturating_pow`, `wrapping_pow`, and
`overflowing_pow` are now available for all numeric types.][57873] These are
equivalvent to methods such as `wrapping_add` for the `pow` operation.
Stabilized APIs
---------------
#### std & core
* [`Any::type_id`]
* [`Error::type_id`]
* [`atomic::AtomicI16`]
* [`atomic::AtomicI32`]
* [`atomic::AtomicI64`]
* [`atomic::AtomicI8`]
* [`atomic::AtomicU16`]
* [`atomic::AtomicU32`]
* [`atomic::AtomicU64`]
* [`atomic::AtomicU8`]
* [`convert::Infallible`]
* [`convert::TryFrom`]
* [`convert::TryInto`]
* [`iter::from_fn`]
* [`iter::successors`]
* [`num::NonZeroI128`]
* [`num::NonZeroI16`]
* [`num::NonZeroI32`]
* [`num::NonZeroI64`]
* [`num::NonZeroI8`]
* [`num::NonZeroIsize`]
* [`slice::sort_by_cached_key`]
* [`str::escape_debug`]
* [`str::escape_default`]
* [`str::escape_unicode`]
* [`str::split_ascii_whitespace`]
#### std
* [`Instant::checked_add`]
* [`Instant::checked_sub`]
* [`SystemTime::checked_add`]
* [`SystemTime::checked_sub`]
Cargo
-----
- [You can now use alternative registries to crates.io.][cargo/6654]
Misc
----
- [You can now use the `?` operator in your documentation tests without manually
adding `fn main() -> Result<(), _> {}`.][56470]
Compatibility Notes
-------------------
- [`Command::before_exec` is now deprecated in favor of the
unsafe method `Command::pre_exec`.][58059]
- [Use of `ATOMIC_{BOOL, ISIZE, USIZE}_INIT` is now deprecated.][57425] As you
can now use `const` functions in `static` variables.
[58370]: rust-lang/rust#58370
[58406]: rust-lang/rust#58406
[58421]: rust-lang/rust#58421
[58166]: rust-lang/rust#58166
[58044]: rust-lang/rust#58044
[58057]: rust-lang/rust#58057
[58059]: rust-lang/rust#58059
[57809]: rust-lang/rust#57809
[57873]: rust-lang/rust#57873
[57604]: rust-lang/rust#57604
[57367]: rust-lang/rust#57367
[57407]: rust-lang/rust#57407
[57425]: rust-lang/rust#57425
[57106]: rust-lang/rust#57106
[56470]: rust-lang/rust#56470
[cargo/6654]: rust-lang/cargo#6654
[`Any::type_id`]: https://doc.rust-lang.org/std/any/trait.Any.html#tymethod.type_id
[`Error::type_id`]: https://doc.rust-lang.org/std/error/trait.Error.html#tymethod.type_id
[`atomic::AtomicI16`]: https://doc.rust-lang.org/std/atomic/struct.AtomicI16.html
[`atomic::AtomicI32`]: https://doc.rust-lang.org/std/atomic/struct.AtomicI32.html
[`atomic::AtomicI64`]: https://doc.rust-lang.org/std/atomic/struct.AtomicI64.html
[`atomic::AtomicI8`]: https://doc.rust-lang.org/std/atomic/struct.AtomicI8.html
[`atomic::AtomicU16`]: https://doc.rust-lang.org/std/atomic/struct.AtomicU16.html
[`atomic::AtomicU32`]: https://doc.rust-lang.org/std/atomic/struct.AtomicU32.html
[`atomic::AtomicU64`]: https://doc.rust-lang.org/std/atomic/struct.AtomicU64.html
[`atomic::AtomicU8`]: https://doc.rust-lang.org/std/atomic/struct.AtomicU8.html
[`convert::Infallible`]: https://doc.rust-lang.org/std/convert/enum.Infallible.html
[`convert::TryFrom`]: https://doc.rust-lang.org/std/convert/trait.TryFrom.html
[`convert::TryInto`]: https://doc.rust-lang.org/std/convert/trait.TryInto.html
[`iter::from_fn`]: https://doc.rust-lang.org/std/iter/fn.from_fn.html
[`iter::successors`]: https://doc.rust-lang.org/std/iter/fn.successors.html
[`num::NonZeroI128`]: https://doc.rust-lang.org/std/num/struct.NonZeroI128.html
[`num::NonZeroI16`]: https://doc.rust-lang.org/std/num/struct.NonZeroI16.html
[`num::NonZeroI32`]: https://doc.rust-lang.org/std/num/struct.NonZeroI32.html
[`num::NonZeroI64`]: https://doc.rust-lang.org/std/num/struct.NonZeroI64.html
[`num::NonZeroI8`]: https://doc.rust-lang.org/std/num/struct.NonZeroI8.html
[`num::NonZeroIsize`]: https://doc.rust-lang.org/std/num/struct.NonZeroIsize.html
[`slice::sort_by_cached_key`]: https://doc.rust-lang.org/std/slice/fn.sort_by_cached_key
[`str::escape_debug`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_debug
[`str::escape_default`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_default
[`str::escape_unicode`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_unicode
[`str::split_ascii_whitespace`]: https://doc.rust-lang.org/std/primitive.str.html#method.split_ascii_whitespace
[`Instant::checked_add`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_add
[`Instant::checked_sub`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_sub
[`SystemTime::checked_add`]: https://doc.rust-lang.org/std/time/struct.SystemTime.html#method.checked_add
[`SystemTime::checked_sub`]: https://doc.rust-lang.org/std/time/struct.SystemTime.html#method.checked_sub
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #48271.
Created based on discussion in #56896.