diff options
| author | bors <bors@rust-lang.org> | 2020-06-02 04:10:49 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-06-02 04:10:49 +0000 |
| commit | 10c2316a6bf7cf9255f991e06e82ce692e6f84d5 (patch) | |
| tree | be3cc1f5d71eef69295c572f6b66c9eb3def256a /src/libcore | |
| parent | ad4bc3323b9299d867697e9653dcea1b5e1ad283 (diff) | |
| parent | b7ec7bd5b78ca950fa343aa1bbaa3d3dd86df9b1 (diff) | |
| download | rust-10c2316a6bf7cf9255f991e06e82ce692e6f84d5.tar.gz rust-10c2316a6bf7cf9255f991e06e82ce692e6f84d5.zip | |
Auto merge of #72905 - JohnTitor:rollup-phtyo5i, r=JohnTitor
Rollup of 10 pull requests Successful merges: - #72775 (Return early to avoid ICE) - #72795 (Add a test for `$:ident` in proc macro input) - #72822 (remove trivial calls to mk_const) - #72825 (Clarify errors and warnings about the transition to the new asm!) - #72827 (changed *nix to Unix-like) - #72880 (Clean up E0637 explanation) - #72886 (Remove allow missing_debug_implementations for MaybeUninit) - #72889 (rustc: Remove the `--passive-segments` LLD flag on wasm) - #72891 (Add associated consts MIN/MAX for Wrapping<Int>) - #72893 (test miri-unleash TLS accesses) Failed merges: r? @ghost
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/macros/mod.rs | 2 | ||||
| -rw-r--r-- | src/libcore/mem/maybe_uninit.rs | 1 | ||||
| -rw-r--r-- | src/libcore/num/wrapping.rs | 16 |
3 files changed, 5 insertions, 14 deletions
diff --git a/src/libcore/macros/mod.rs b/src/libcore/macros/mod.rs index 625ceb0953b..3cfdde60135 100644 --- a/src/libcore/macros/mod.rs +++ b/src/libcore/macros/mod.rs @@ -1315,7 +1315,7 @@ pub(crate) mod builtin { #[unstable( feature = "llvm_asm", issue = "70173", - reason = "LLVM-style inline assembly will never be stabilized, prefer using asm! instead" + reason = "prefer using the new asm! syntax instead" )] #[rustc_builtin_macro] #[macro_export] diff --git a/src/libcore/mem/maybe_uninit.rs b/src/libcore/mem/maybe_uninit.rs index 01c97444ae3..499016545e9 100644 --- a/src/libcore/mem/maybe_uninit.rs +++ b/src/libcore/mem/maybe_uninit.rs @@ -214,7 +214,6 @@ use crate::mem::ManuallyDrop; /// remain `#[repr(transparent)]`. That said, `MaybeUninit<T>` will *always* guarantee that it has /// the same size, alignment, and ABI as `T`; it's just that the way `MaybeUninit` implements that /// guarantee may evolve. -#[allow(missing_debug_implementations)] #[stable(feature = "maybe_uninit", since = "1.36.0")] // Lang item so we can wrap other types in it. This is useful for generators. #[lang = "maybe_uninit"] diff --git a/src/libcore/num/wrapping.rs b/src/libcore/num/wrapping.rs index 82fa6acfbd6..bb648ba8c25 100644 --- a/src/libcore/num/wrapping.rs +++ b/src/libcore/num/wrapping.rs @@ -337,14 +337,10 @@ Basic usage: #![feature(wrapping_int_impl)] use std::num::Wrapping; -assert_eq!(<Wrapping<", stringify!($t), ">>::min_value(), ", -"Wrapping(", stringify!($t), "::min_value())); +assert_eq!(<Wrapping<", stringify!($t), ">>::MIN, Wrapping(", stringify!($t), "::MIN)); ```"), #[unstable(feature = "wrapping_int_impl", issue = "32463")] - #[inline] - pub const fn min_value() -> Self { - Wrapping(<$t>::min_value()) - } + pub const MIN: Self = Self(<$t>::MIN); } doc_comment! { @@ -358,14 +354,10 @@ Basic usage: #![feature(wrapping_int_impl)] use std::num::Wrapping; -assert_eq!(<Wrapping<", stringify!($t), ">>::max_value(), ", -"Wrapping(", stringify!($t), "::max_value())); +assert_eq!(<Wrapping<", stringify!($t), ">>::MAX, Wrapping(", stringify!($t), "::MAX)); ```"), #[unstable(feature = "wrapping_int_impl", issue = "32463")] - #[inline] - pub const fn max_value() -> Self { - Wrapping(<$t>::max_value()) - } + pub const MAX: Self = Self(<$t>::MAX); } doc_comment! { |
