mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Cleanup term search related changes
This commit is contained in:
parent
88964c0b6a
commit
125791386d
26 changed files with 590 additions and 516 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue