mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-03 13:23:25 +00:00
Merge pull request #20409 from A4-Tacks/minicore-write
Some checks are pending
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Some checks are pending
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Add write! and writeln! to minicore
This commit is contained in:
commit
31db5b5be9
1 changed files with 21 additions and 0 deletions
|
|
@ -70,6 +70,7 @@
|
||||||
//! tuple:
|
//! tuple:
|
||||||
//! unpin: sized
|
//! unpin: sized
|
||||||
//! unsize: sized
|
//! unsize: sized
|
||||||
|
//! write: fmt
|
||||||
//! todo: panic
|
//! todo: panic
|
||||||
//! unimplemented: panic
|
//! unimplemented: panic
|
||||||
//! column:
|
//! column:
|
||||||
|
|
@ -1769,6 +1770,26 @@ mod macros {
|
||||||
}
|
}
|
||||||
// endregion:panic
|
// endregion:panic
|
||||||
|
|
||||||
|
// region:write
|
||||||
|
#[macro_export]
|
||||||
|
macro_rules! write {
|
||||||
|
($dst:expr, $($arg:tt)*) => {
|
||||||
|
$dst.write_fmt($crate::format_args!($($arg)*))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#[macro_export]
|
||||||
|
#[allow_internal_unstable(format_args_nl)]
|
||||||
|
macro_rules! writeln {
|
||||||
|
($dst:expr $(,)?) => {
|
||||||
|
$crate::write!($dst, "\n")
|
||||||
|
};
|
||||||
|
($dst:expr, $($arg:tt)*) => {
|
||||||
|
$dst.write_fmt($crate::format_args_nl!($($arg)*))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// endregion:write
|
||||||
|
|
||||||
// region:assert
|
// region:assert
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
#[rustc_builtin_macro]
|
#[rustc_builtin_macro]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue