1
Fork 0

Switch bootstrap cfgs

This commit is contained in:
Mark Rousskov 2022-02-23 08:06:22 -05:00
parent ea65f50c52
commit 22c3a71de1
56 changed files with 64 additions and 147 deletions

View file

@ -594,7 +594,6 @@ macro_rules! writeln {
/// unreachable!("The loop should always return");
/// }
/// ```
#[cfg(not(bootstrap))]
#[macro_export]
#[rustc_builtin_macro(unreachable)]
#[allow_internal_unstable(edition_panic)]
@ -608,24 +607,6 @@ macro_rules! unreachable {
};
}
/// unreachable!() macro
#[cfg(bootstrap)]
#[macro_export]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(test), rustc_diagnostic_item = "unreachable_macro")]
#[allow_internal_unstable(core_panic)]
macro_rules! unreachable {
() => ({
$crate::panicking::panic("internal error: entered unreachable code")
});
($msg:expr $(,)?) => ({
$crate::unreachable!("{}", $msg)
});
($fmt:expr, $($arg:tt)*) => ({
$crate::panic!($crate::concat!("internal error: entered unreachable code: ", $fmt), $($arg)*)
});
}
/// Indicates unimplemented code by panicking with a message of "not implemented".
///
/// This allows your code to type-check, which is useful if you are prototyping or