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 @@ pub fn unwrap(self) -> 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, } }