Switch bootstrap cfgs
This commit is contained in:
parent
ea65f50c52
commit
22c3a71de1
56 changed files with 64 additions and 147 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue