From e6c11313c88574aa2500df2f76c5534fbc2e0512 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Mon, 9 Sep 2013 19:32:32 -0700 Subject: std: Add Option.{result_or_default,or_default} that uses Default --- src/libsyntax/parse/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 8725a0426f7..6a15641430f 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -3461,7 +3461,7 @@ impl Parser { let ident = self.parse_ident(); let opt_bounds = self.parse_optional_ty_param_bounds(); // For typarams we don't care about the difference b/w "" and "". - let bounds = opt_bounds.unwrap_or(opt_vec::Empty); + let bounds = opt_bounds.unwrap_or_default(); ast::TyParam { ident: ident, id: ast::DUMMY_NODE_ID, bounds: bounds } } -- cgit 1.4.1-3-g733a5