about summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-08-12 23:10:52 +0200
committerGitHub <noreply@github.com>2024-08-12 23:10:52 +0200
commit522d43673a6998be3d494645c0e4e3ecb37baaa1 (patch)
treee8a79424591200ed5fedbe653e8e93841fb20a38 /library/alloc/src
parent0dfb5b9cb84c43cc1271e13903711923edf08f4e (diff)
parent027b19fa9b85c3330d2eb38970c22e44873db2fc (diff)
downloadrust-522d43673a6998be3d494645c0e4e3ecb37baaa1.tar.gz
rust-522d43673a6998be3d494645c0e4e3ecb37baaa1.zip
Rollup merge of #129017 - its-the-shrimp:core_fmt_from_fn, r=Noratrieb
Replace `std::fmt:FormatterFn` with `std::fmt::from_fn`

Modelled after the suggestion made in [this](https://github.com/rust-lang/rust/issues/117729#issuecomment-1837628559) comment, this should bring this functionality in line with the existing `array::from_fn` & `iter::from_fn`
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/fmt.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/fmt.rs b/library/alloc/src/fmt.rs
index 4b9b90fc1f1..571fcd177aa 100644
--- a/library/alloc/src/fmt.rs
+++ b/library/alloc/src/fmt.rs
@@ -581,7 +581,7 @@ pub use core::fmt::Alignment;
 #[stable(feature = "rust1", since = "1.0.0")]
 pub use core::fmt::Error;
 #[unstable(feature = "debug_closure_helpers", issue = "117729")]
-pub use core::fmt::FormatterFn;
+pub use core::fmt::{from_fn, FromFn};
 #[stable(feature = "rust1", since = "1.0.0")]
 pub use core::fmt::{write, Arguments};
 #[stable(feature = "rust1", since = "1.0.0")]