10000 Rollup of 9 pull requests by JohnTitor · Pull Request #71464 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 9 pull requests #71464

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

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3ac26f7
add a few more DefKinds
mark-i-m Mar 16, 2020
fba38a9
Split out the `Generator` case from `DefKind::Closure`.
eddyb Apr 17, 2020
8a764b9
Remove `Option` from the return type of `def_kind`.
eddyb Apr 17, 2020
850ddd7
Tweak `descr` for `AnonConst` and fix `article` for `Use` and `Extern…
eddyb Apr 17, 2020
72a8534
Remove redundant `descr`/`descriptive_variant` methods from HIR.
eddyb Apr 17, 2020
3eb1c43
Ignore -Zprofile when building compiler_builtins
Amanieu Apr 20, 2020
57c2712
Improve E0308 error message wording again
DeeDeeG Apr 21, 2020
37097fb
Let compiletest recognize gdb 10.x
tromey Apr 22, 2020
90b4a97
Fix compiletest version-parsing tests
tromey Apr 22, 2020
1f106b5
ci: set a default shell on GHA
pietroalbini Apr 22, 2020
61831ff
ci: remove duplicated job names on GHA
pietroalbini Apr 22, 2020
99de372
Only use read_unaligned in transmute_copy if necessary
Amanieu Apr 22, 2020
e97c227
Remove outdated reference to interpreter snapshotting
ecstatic-morse Apr 22, 2020
2274b4b
Bump bootstrap compiler
Mark-Simulacrum Apr 22, 2020
12102db
Bump rustfmt to most recently shipped
Mark-Simulacrum Apr 22, 2020
986e55a
Fix rustfmt bug
Mark-Simulacrum Apr 23, 2020
b3c26de
Inline some function docs re-exported in `std::ptr`
ecstatic-morse Apr 23, 2020
6013c23
Rollup merge of #70043 - mark-i-m:def-kind-more, r=eddyb
JohnTitor Apr 23, 2020
40d0e6f
Rollup merge of #71364 - Amanieu:zprofile_compiler_builtins, r=cramertj
JohnTitor Apr 23, 2020
1a25f27
Rollup merge of #71396 - DeeDeeG:improve-e0308-again, r=estebank
JohnTitor Apr 23, 2020
e5f309a
Rollup merge of #71428 - tromey:gdb-10-parsing, r=tromey
JohnTitor Apr 23, 2020
f20893b
Rollup merge of #71434 - pietroalbini:shrink-gha-config, r=Mark-Simul…
JohnTitor Apr 23, 2020
6f18ad5
Rollup merge of #71439 - Mark-Simulacrum:stage0-next, r=jonas-schievink
JohnTitor Apr 23, 2020
9ba70a9
Rollup merge of #71446 - Amanieu:transmute_copy, r=sfackler
JohnTitor Apr 23, 2020
c7e2617
Rollup merge of #71452 - ecstatic-morse:no-more-snapshot, r=RalfJung
JohnTitor Apr 23, 2020
e20df27
Rollup merge of #71454 - ecstatic-morse:inline-core-ptr-docs, r=RalfJung
JohnTitor Apr 23, 2020
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
Prev Previous commit
Next Next commit
Bump bootstrap compiler
  • Loading branch information
Mark-Simulacrum committed Apr 23, 2020
commit 2274b4bd4d85905c4af80e3db3bccda57dceefa4
2 changes: 1 addition & 1 deletion src/bootstrap/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use build_helper::output;
use crate::Build;

// The version number
pub const CFG_RELEASE_NUM: &str = "1.44.0";
pub const CFG_RELEASE_NUM: &str = "1.45.0";

pub struct GitInfo {
inner: Option<Info>,
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
#![feature(internal_uninit_const)]
#![feature(lang_items)]
#![feature(libc)]
#![cfg_attr(not(bootstrap), feature(negative_impls))]
#![feature(negative_impls)]
#![feature(new_uninit)]
#![feature(nll)]
#![feature(optin_builtin_traits)]
Expand Down
1 change: 0 additions & 1 deletion src/liballoc/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ struct RcBox<T: ?Sized> {
/// type `T`.
///
/// [get_mut]: #method.get_mut
#[cfg_attr(all(bootstrap, not(test)), lang = "rc")]
#[cfg_attr(not(test), rustc_diagnostic_item = "Rc")]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct Rc<T: ?Sized> {
Expand Down
1 change: 0 additions & 1 deletion src/liballoc/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ macro_rules! acquire {
/// counting in general.
///
6293 /// [rc_examples]: ../../std/rc/index.html#examples
#[cfg_attr(all(bootstrap, not(test)), lang = "arc")]
#[cfg_attr(not(test), rustc_diagnostic_item = "Arc")]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct Arc<T: ?Sized> {
Expand Down
1 change: 0 additions & 1 deletion src/libcore/clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,5 @@ mod impls {

/// Shared references can be cloned, but mutable references *cannot*!
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(not(bootstrap))]
impl<T: ?Sized> !Clone for &mut T {}
}
9 changes: 1 addition & 8 deletions src/libcore/convert/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,7 @@ macro_rules! impl_float_to_int {
#[doc(hidden)]
#[inline]
unsafe fn to_int_unchecked(self) -> $Int {
#[cfg(bootstrap)]
{
crate::intrinsics::float_to_int_approx_unchecked(self)
}
#[cfg(not(bootstrap))]
{
crate::intrinsics::float_to_int_unchecked(self)
}
crate::intrinsics::float_to_int_unchecked(self)
}
}
)+
Expand Down
6 changes: 0 additions & 6 deletions src/libcore/future/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

//! Asynchronous values.

#[cfg(not(bootstrap))]
use crate::{
ops::{Generator, GeneratorState},
pin::Pin,
Expand All @@ -24,16 +23,13 @@ pub use self::future::Future;
/// It also simplifies the HIR lowering of `.await`.
#[doc(hidden)]
#[unstable(feature = "gen_future", issue = "50547")]
#[cfg(not(bootstrap))]
#[derive(Debug, Copy, Clone)]
pub struct ResumeTy(NonNull<Context<'static>>);

#[unstable(feature = "gen_future", issue = "50547")]
#[cfg(not(bootstrap))]
unsafe impl Send for ResumeTy {}

#[unstable(feature = "gen_future", issue = "50547")]
#[cfg(not(bootstrap))]
unsafe impl Sync for ResumeTy {}

/// Wrap a generator in a future.
Expand All @@ -43,7 +39,6 @@ unsafe impl Sync for ResumeTy {}
// This is `const` to avoid extra errors after we recover from `const async fn`
#[doc(hidden)]
#[unstable(feature = "gen_future", issue = "50547")]
#[cfg(not(bootstrap))]
#[inline]
pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
where
Expand Down Expand Up @@ -75,7 +70,6 @@ where

#[doc(hidden)]
#[unstable(feature = "gen_future", issue = "50547")]
#[cfg(not(bootstrap))]
#[inline]
pub unsafe fn get_context<'a, 'b>(cx: ResumeTy) -> &'a mut Context<'b> {
&mut *cx.0.as_ptr().cast()
Expand Down
33 changes: 0 additions & 33 deletions src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -980,22 +980,7 @@ extern "rust-intrinsic" {
///
/// The stabilized version of this intrinsic is
/// [`std::mem::size_of_val`](../../std/mem/fn.size_of_val.html).
#[cfg(bootstrap)]
pub fn size_of_val<T: ?Sized>(_: &T) -> usize;
/// The minimum alignment of the type of the value that `val` points to.
///
/// The stabilized version of this intrinsic is
/// [`std::mem::min_align_of_val`](../../std/mem/fn.min_align_of_val.html).
#[cfg(bootstrap)]
pub fn min_align_of_val<T: ?Sized>(_: &T) -> usize;

/// The size of the referenced value in bytes.
///
/// The stabilized version of this intrinsic is
/// [`std::mem::size_of_val`](../../std/mem/fn.size_of_val.html).
#[cfg(not(bootstrap))]
pub fn size_of_val<T: ?Sized>(_: *const T) -> usize;
#[cfg(not(bootstrap))]
pub fn min_align_of_val<T: ?Sized>(_: *const T) -> usize;

/// Gets a static string slice containing the name of a type.
Expand All @@ -1016,22 +1001,14 @@ extern "rust-intrinsic" {

/// A guard for unsafe functions that cannot ever be executed if `T` is uninhabited:
/// This will statically either panic, or do nothing.
#[cfg(bootstrap)]
pub fn panic_if_uninhabited<T>();

/// A guard for unsafe functions that cannot ever be executed if `T` is uninhabited:
/// This will statically either panic, or do nothing.
#[cfg(not(bootstrap))]
pub fn assert_inhabited<T>();

/// A guard for unsafe functions that cannot ever be executed if `T` does not permit
/// zero-initialization: This will statically either panic, or do nothing.
#[cfg(not(bootstrap))]
pub fn assert_zero_valid<T>();

/// A guard for unsafe functions that cannot ever be executed if `T` has invalid
/// bit patterns: This will statically either panic, or do nothing.
#[cfg(not(bootstrap))]
pub fn assert_uninit_valid<T>();

/// Gets a reference to a static `Location` indicating where it was called.
Expand Down Expand Up @@ -1597,17 +1574,10 @@ extern "rust-intrinsic" {
/// May assume inputs are finite.
pub fn frem_fast<T: Copy>(a: T, b: T) -> T;

/// Convert with LLVM’s fptoui/fptosi, which may return undef for values out of range
/// (<https://github.com/rust-lang/rust/issues/10184>)
/// This is under stabilization at <https://github.com/rust-lang/rust/issues/67058>
#[cfg(bootstrap)]
pub fn float_to_int_approx_unchecked<Float: Copy, Int: Copy>(value: Float) -> Int;

/// Convert with LLVM’s fptoui/fptosi, which may return undef for values out of range
/// (<https://github.com/rust-lang/rust/issues/10184>)
///
/// Stabilized as `f32::to_int_unchecked` and `f64::to_int_unchecked`.
#[cfg(not(bootstrap))]
pub fn float_to_int_unchecked<Float: Copy, Int: Copy>(value: Float) -> Int;

/// Returns the number of bits set in an integer type `T`
Expand Down Expand Up @@ -1877,10 +1847,7 @@ extern "rust-intrinsic" {
/// takes the data pointer and a pointer to the target-specific exception
/// object that was caught. For more information see the compiler's
/// source as well as std's catch implementation.
#[cfg(not(bootstrap))]
pub fn r#try(try_fn: fn(*mut u8), data: *mut u8, catch_fn: fn(*mut u8, *mut u8)) -> i32;
#[cfg(bootstrap)]
pub fn r#try(f: fn(*mut u8), data: *mut u8, local_ptr: *mut u8) -> i32;

/// Emits a `!nontemporal` store according to LLVM (see their docs).
/// Probably will never become stable.
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
#![feature(lang_items)]
#![feature(link_llvm_intrinsics)]
#![feature(llvm_asm)]
#![cfg_attr(not(bootstrap), feature(negative_impls))]
#![feature(negative_impls)]
#![feature(never_type)]
#![feature(nll)]
#![feature(exhaustive_patterns)]
Expand Down
46 changes: 1 addition & 45 deletions src/libcore/macros/mod.rs
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
#[cfg(bootstrap)]
#[doc(include = "panic.md")]
#[macro_export]
#[allow_internal_unstable(core_panic, track_caller)]
#[stable(feature = "core", since = "1.6.0")]
macro_rules! panic {
() => (
$crate::panic!("explicit panic")
);
($msg:expr) => (
$crate::panicking::panic($msg)
);
($msg:expr,) => (
$crate::panic!($msg)
);
($fmt:expr, $($arg:tt)+) => (
$crate::panicking::panic_fmt(
$crate::format_args!($fmt, $($arg)+),
$crate::panic::Location::caller(),
)
);
}

#[cfg(not(bootstrap))]
#[doc(include = "panic.md")]
#[macro_export]
#[allow_internal_unstable(core_panic, track_caller)]
Expand Down Expand Up @@ -360,7 +336,7 @@ macro_rules! r#try {
}
};
($expr:expr,) => {
$crate::r#try!($expr)
$crate::try!($expr)
};
}

Expand Down Expand Up @@ -1341,25 +1317,6 @@ pub(crate) mod builtin {
/// Read the [unstable book] for the usage.
///
/// [unstable book]: ../unstable-book/library-features/asm.html
#[cfg(bootstrap)]
#[unstable(
feature = "llvm_asm",
issue = "70173",
reason = "inline assembly is not stable enough for use and is subject to change"
)]
#[macro_export]
#[allow_internal_unstable(asm)]
macro_rules! llvm_asm {
// Redirect to asm! for stage0
($($arg:tt)*) => { $crate::asm!($($arg)*) }
}

/// Inline assembly.
///
/// Read the [unstable book] for the usage.
///
/// [unstable book]: ../unstable-book/library-features/asm.html
#[cfg(not(bootstrap))]
#[unstable(
feature = "llvm_asm",
issue = "70173",
Expand Down Expand Up @@ -1460,7 +1417,6 @@ pub(crate) mod builtin {
}

/// Keeps the item it's applied to if the passed path is accessible, and removes it otherwise.
#[cfg(not(bootstrap))]
#[unstable(
feature = "cfg_accessible",
issue = "64797",
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl<T: ?Sized> !Send for *mut T {}
ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>"
)]
#[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
#[cfg_attr(not(bootstrap), rustc_specialization_trait)]
#[rustc_specialization_trait]
pub trait Sized {
// Empty.
}
Expand Down
12 changes: 0 additions & 12 deletions src/libcore/mem/maybe_uninit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,6 @@ impl<T> MaybeUninit<T> {
#[inline(always)]
#[rustc_diagnostic_item = "assume_init"]
pub unsafe fn assume_init(self) -> T {
#[cfg(bootstrap)]
intrinsics::panic_if_uninhabited::<T>();
#[cfg(not(bootstrap))]
intrinsics::assert_inhabited::<T>();
ManuallyDrop::into_inner(self.value)
}
Expand Down Expand Up @@ -562,9 +559,6 @@ impl<T> MaybeUninit<T> {
#[unstable(feature = "maybe_uninit_extra", issue = "63567")]
#[inline(always)]
pub unsafe fn read(&self) -> T {
#[cfg(bootstrap)]
intrinsics::panic_if_uninhabited::<T>();
#[cfg(not(bootstrap))]
intrinsics::assert_inhabited::<T>();
self.as_ptr().read()
}
Expand Down Expand Up @@ -627,9 +621,6 @@ impl<T> MaybeUninit<T> {
#[unstable(feature = "maybe_uninit_ref", issue = "63568")]
#[inline(always)]
pub unsafe fn get_ref(&self) -> &T {
#[cfg(bootstrap)]
intrinsics::panic_if_uninhabited::<T>();
#[cfg(not(bootstrap))]
intrinsics::assert_inhabited::<T>();
&*self.value
}
Expand Down Expand Up @@ -748,9 +739,6 @@ impl<T> MaybeUninit<T> {
#[unstable(feature = "maybe_uninit_ref", issue = "63568")]
#[inline(always)]
pub unsafe fn get_mut(&mut self) -> &mut T {
10000 #[cfg(bootstrap)]
intrinsics::panic_if_uninhabited::<T>();
#[cfg(not(bootstrap))]
intrinsics::assert_inhabited::<T>();
&mut *self.value
}
Expand Down
8 changes: 0 additions & 8 deletions src/libcore/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ pub fn size_of_val<T: ?Sized>(val: &T) -> usize {
/// assert_eq!(13, unsafe { mem::size_of_val_raw(y) });
/// ```
#[inline]
#[cfg(not(bootstrap))]
#[unstable(feature = "layout_for_ptr", issue = "69835")]
pub unsafe fn size_of_val_raw<T: ?Sized>(val: *const T) -> usize {
intrinsics::size_of_val(val)
Expand Down Expand Up @@ -509,7 +508,6 @@ pub fn align_of_val<T: ?Sized>(val: &T) -> usize {
/// assert_eq!(4, unsafe { mem::align_of_val_raw(&5i32) });
/// ```
#[inline]
#[cfg(not(bootstrap))]
#[unstable(feature = "layout_for_ptr", issue = "69835")]
pub unsafe fn align_of_val_raw<T: ?Sized>(val: *const T) -> usize {
intrinsics::min_align_of_val(val)
Expand Down Expand Up @@ -621,10 +619,7 @@ pub const fn needs_drop<T>() -> bool {
#[allow(deprecated)]
#[rustc_diagnostic_item = "mem_zeroed"]
pub unsafe fn zeroed<T>() -> T {
#[cfg(not(bootstrap))]
intrinsics::assert_zero_valid::<T>();
#[cfg(bootstrap)]
intrinsics::panic_if_uninhabited::<T>();
MaybeUninit::zeroed().assume_init()
}

Expand Down Expand Up @@ -657,10 +652,7 @@ pub unsafe fn zeroed<T>() -> T {
#[allow(deprecated)]
#[rustc_diagnostic_item = "mem_uninitialized"]
pub unsafe fn uninitialized<T>() -> T {
#[cfg(not(bootstrap))]
intrinsics::assert_uninit_valid::<T>();
#[cfg(bootstrap)]
intrinsics::panic_if_uninhabited::<T>();
MaybeUninit::uninit().assume_init()
}

Expand Down
1 change: 0 additions & 1 deletion src/libcore/ops/deref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ impl<T: ?Sized> Deref for &T {
}
}

#[cfg(not(bootstrap))]
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: ?Sized> !DerefMut for &T {}

Expand Down
4 changes: 2 additions & 2 deletions src/libcore/ops/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub trait Index<Idx: ?Sized> {

/// Performs the indexing (`container[index]`) operation.
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(bootstrap), track_caller)]
#[track_caller]
fn index(&self, index: Idx) -> &Self::Output;
}

Expand Down Expand Up @@ -167,6 +167,6 @@ see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#ind
pub trait IndexMut<Idx: ?Sized>: Index<Idx> {
/// Performs the mutable indexing (`container[index]`) operation.
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(bootstrap), track_caller)]
#[track_caller]
fn index_mut(&mut self, index: Idx) -> &mut Self::Output;
}
Loading
0