about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-10-21 01:39:20 +0200
committerGitHub <noreply@github.com>2019-10-21 01:39:20 +0200
commit5a29bd9f9b71157116fe2e8199f64abd45a100ad (patch)
tree4d0635b2402746fa2169d6335dc9d22c82098a45
parent8bdae3af171c957bfa46ae1ce6b03f1fb0ef501a (diff)
parent2a5c31ca51a5d7c1c3d580e1214094dc2ef5d8fe (diff)
downloadrust-5a29bd9f9b71157116fe2e8199f64abd45a100ad.tar.gz
rust-5a29bd9f9b71157116fe2e8199f64abd45a100ad.zip
Rollup merge of #65638 - dsincl12:master, r=Centril
Rename the default argument 'def' to 'default'

Fixes: #65492
-rw-r--r--src/libcore/option.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/option.rs b/src/libcore/option.rs
index 09d4076c7fb..9eb29eae7f7 100644
--- a/src/libcore/option.rs
+++ b/src/libcore/option.rs
@@ -395,10 +395,10 @@ impl<T> Option<T> {
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub fn unwrap_or(self, def: T) -> T {
+    pub fn unwrap_or(self, default: T) -> T {
         match self {
             Some(x) => x,
-            None => def,
+            None => default,
         }
     }