diff options
| author | bors <bors@rust-lang.org> | 2014-02-01 07:21:23 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-02-01 07:21:23 -0800 |
| commit | df044ea4ac8fb7f99622948f4f8c40fbd24eda13 (patch) | |
| tree | f560de5e155ea54a734a977edc8bfe5a5397ca93 /src/libsyntax | |
| parent | 362cbbe01c58a8e2b233cdfa9038b6e31ca8d318 (diff) | |
| parent | d9fadbc04f5bbd520e4ce8665ac128288e9846c0 (diff) | |
| download | rust-df044ea4ac8fb7f99622948f4f8c40fbd24eda13.tar.gz rust-df044ea4ac8fb7f99622948f4f8c40fbd24eda13.zip | |
auto merge of #11944 : nathanielherman/rust/vec_opt, r=alexcrichton
Closes #11733
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/opt_vec.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/opt_vec.rs b/src/libsyntax/opt_vec.rs index ce3042cb9cd..c575e170bef 100644 --- a/src/libsyntax/opt_vec.rs +++ b/src/libsyntax/opt_vec.rs @@ -62,10 +62,10 @@ impl<T> OptVec<T> { } } - pub fn mut_last<'a>(&'a mut self) -> &'a mut T { + pub fn mut_last<'a>(&'a mut self) -> Option<&'a mut T> { match *self { Vec(ref mut v) => v.mut_last(), - Empty => fail!("mut_last on empty opt_vec") + Empty => None } } |
