about summary refs log tree commit diff
path: root/library/std/src/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2020-06-08 09:55:31 +0200
committerGitHub <noreply@github.com>2020-06-08 09:55:31 +0200
commit244465dbb8b0e49d741bc1f93925d037020cb1f1 (patch)
treee85257ee148436d1fb8388c0e032dcfed719aebe /library/std/src/sys/unix/stack_overflow.rs
parent824ea6bf2d883fd04ed826f1d09a20dc3ede11d0 (diff)
parentebb8722ea7b184ade7015fd1094475a18e1198f7 (diff)
downloadrust-244465dbb8b0e49d741bc1f93925d037020cb1f1.tar.gz
rust-244465dbb8b0e49d741bc1f93925d037020cb1f1.zip
Rollup merge of #73001 - ilya-bobyr:master, r=dtolnay
Free `default()` forwarding to `Default::default()`

It feels a bit redundant to have to say `Default::default()` every time I need a new value of a type that has a `Default` instance.
Especially so, compared to Haskell, where the same functionality is called `def`.
Providing a free `default()` function that forwards to `Default::default()` seems to improve the situation.
The trait is still there, so if someone wants to be explicit and to say `Default::default()` - it still works, but if imported as `std::default::default;`, then the free function reduces typing and visual noise.
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions