Skip to content

Commit ef7c7a1

Browse files
committed
Stabilize format_args_ln!
`format_args_ln!` is generally useful for implementations of formatting macros, and it has clear semantics and a clear interface.
1 parent 054346b commit ef7c7a1

File tree

6 files changed

+3
-25
lines changed

6 files changed

+3
-25
lines changed

library/core/src/macros/mod.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,6 @@ macro_rules! write {
549549
#[macro_export]
550550
#[stable(feature = "rust1", since = "1.0.0")]
551551
#[cfg_attr(not(test), rustc_diagnostic_item = "writeln_macro")]
552-
#[allow_internal_unstable(format_args_ln)]
553552
macro_rules! writeln {
554553
($dst:expr $(,)?) => {
555554
$crate::write!($dst, "\n")
@@ -896,12 +895,7 @@ pub(crate) mod builtin {
896895
}
897896

898897
/// Same as [`format_args`], but adds a newline in the end.
899-
#[unstable(
900-
feature = "format_args_ln",
901-
issue = "none",
902-
reason = "`format_args_ln` is only for internal \
903-
language use and is subject to change"
904-
)]
898+
#[stable(feature = "format_args_ln", since = "1.63.0")]
905899
#[allow_internal_unstable(fmt_internals)]
906900
#[cfg_attr(bootstrap, rustc_builtin_macro(format_args_nl))]
907901
#[cfg_attr(not(bootstrap), rustc_builtin_macro)]

library/std/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@
318318
#![feature(core_panic)]
319319
#![feature(custom_test_frameworks)]
320320
#![feature(edition_panic)]
321-
#![feature(format_args_ln)]
322321
#![feature(log_syntax)]
323322
#![feature(once_cell)]
324323
#![feature(saturating_int_impl)]

library/std/src/macros.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ macro_rules! print {
9797
#[macro_export]
9898
#[stable(feature = "rust1", since = "1.0.0")]
9999
#[cfg_attr(not(test), rustc_diagnostic_item = "println_macro")]
100-
#[allow_internal_unstable(print_internals, format_args_ln)]
100+
#[allow_internal_unstable(print_internals)]
101101
macro_rules! println {
102102
() => {
103103
$crate::print!("\n")
@@ -163,7 +163,7 @@ macro_rules! eprint {
163163
#[macro_export]
164164
#[stable(feature = "eprint", since = "1.19.0")]
165165
#[cfg_attr(not(test), rustc_diagnostic_item = "eprintln_macro")]
166-
#[allow_internal_unstable(print_internals, format_args_ln)]
166+
#[allow_internal_unstable(print_internals)]
167167
macro_rules! eprintln {
168168
() => {
169169
$crate::eprint!("\n")

src/test/ui/feature-gates/feature-gate-format_args_nl.rs

-3
This file was deleted.

src/test/ui/feature-gates/feature-gate-format_args_nl.stderr

-11
This file was deleted.

src/test/ui/hygiene/format-args.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// check-pass
22

33
#![allow(non_upper_case_globals)]
4-
#![feature(format_args_ln)]
54

65
static arg0: () = ();
76

0 commit comments

Comments
 (0)