Cleanup term search related changes

This commit is contained in:
Tavo Annus 2024-02-01 11:02:19 +02:00
parent 88964c0b6a
commit 125791386d
26 changed files with 590 additions and 516 deletions

View file

@ -60,6 +60,8 @@
//! try: infallible
//! unpin: sized
//! unsize: sized
//! todo: panic
//! unimplemented: panic
#![rustc_coherence_is_core]
@ -927,6 +929,10 @@ pub mod fmt {
use crate::mem::transmute;
unsafe { Argument { formatter: transmute(f), value: transmute(x) } }
}
pub fn new_display<'b, T: Display>(x: &'b T) -> Argument<'_> {
Self::new(x, Display::fmt)
}
}
#[lang = "format_alignment"]
@ -1438,6 +1444,33 @@ mod macros {
// endregion:fmt
// region:todo
#[macro_export]
#[allow_internal_unstable(core_panic)]
macro_rules! todo {
() => {
$crate::panicking::panic("not yet implemented")
};
($($arg:tt)+) => {
$crate::panic!("not yet implemented: {}", $crate::format_args!($($arg)+))
};
}
// endregion:todo
// region:unimplemented
#[macro_export]
#[allow_internal_unstable(core_panic)]
macro_rules! unimplemented {
() => {
$crate::panicking::panic("not implemented")
};
($($arg:tt)+) => {
$crate::panic!("not implemented: {}", $crate::format_args!($($arg)+))
};
}
// endregion:unimplemented
// region:derive
pub(crate) mod builtin {
#[rustc_builtin_macro]