about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-07-09 16:33:37 +0200
committerGitHub <noreply@github.com>2023-07-09 16:33:37 +0200
commitec479bae7fc6b8de845bb29a25753197dccba1a2 (patch)
tree7b2da979782355d8ea005356997fac6c193dcd92 /src
parenta46589f76b269d24d24e0f2d2762d40bb764ae9e (diff)
parenta088e7961cc2b2176dd470cc5599f7c8f886abff (diff)
downloadrust-ec479bae7fc6b8de845bb29a25753197dccba1a2.tar.gz
rust-ec479bae7fc6b8de845bb29a25753197dccba1a2.zip
Rollup merge of #113469 - JohnTitor:rm-default-free-fn, r=Amanieu
Remove `default_free_fn` feature

Closes #73014
r? ``@Amanieu``
Diffstat (limited to 'src')
-rw-r--r--src/doc/unstable-book/src/library-features/default-free-fn.md47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/doc/unstable-book/src/library-features/default-free-fn.md b/src/doc/unstable-book/src/library-features/default-free-fn.md
deleted file mode 100644
index bafc9ac4d0d..00000000000
--- a/src/doc/unstable-book/src/library-features/default-free-fn.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# `default_free_fn`
-
-The tracking issue for this feature is: [#73014]
-
-[#73014]: https://github.com/rust-lang/rust/issues/73014
-
-------------------------
-
-Adds a free `default()` function to the `std::default` module.  This function
-just forwards to [`Default::default()`], but may remove repetition of the word
-"default" from the call site.
-
-[`Default::default()`]: ../../std/default/trait.Default.html#tymethod.default
-
-Here is an example:
-
-```rust
-#![feature(default_free_fn)]
-use std::default::default;
-
-#[derive(Default)]
-struct AppConfig {
-    foo: FooConfig,
-    bar: BarConfig,
-}
-
-#[derive(Default)]
-struct FooConfig {
-    foo: i32,
-}
-
-#[derive(Default)]
-struct BarConfig {
-    bar: f32,
-    baz: u8,
-}
-
-fn main() {
-    let options = AppConfig {
-        foo: default(),
-        bar: BarConfig {
-            bar: 10.1,
-            ..default()
-        },
-    };
-}
-```