]> git.lizzy.rs Git - rust.git/commitdiff
Add explicit lifetime
authorSeiichi Uchida <seuchida@gmail.com>
Thu, 31 Aug 2017 04:24:32 +0000 (13:24 +0900)
committerSeiichi Uchida <seuchida@gmail.com>
Thu, 31 Aug 2017 04:24:32 +0000 (13:24 +0900)
src/config.rs
src/expr.rs

index bd847bab5bc624e9d870b1a6506c22e1ac50d145..30d79cdc562983b00017c01c574c3b4e346d0e4c 100644 (file)
@@ -280,11 +280,11 @@ pub fn $i(&self) -> $ty {
             }
             )+
 
-            pub fn set(&mut self) -> ConfigSetter {
+            pub fn set<'a>(&'a mut self) -> ConfigSetter<'a> {
                 ConfigSetter(self)
             }
 
-            pub fn was_set(&self) -> ConfigWasSet {
+            pub fn was_set<'a>(&'a self) -> ConfigWasSet<'a> {
                 ConfigWasSet(self)
             }
 
index 2bfbba2fb1f2513e69befab91130dcce59cf2cdc..3cfbf023faf7641d1c91403b99e295286aa4fe39 100644 (file)
@@ -933,7 +933,7 @@ struct ControlFlow<'a> {
     span: Span,
 }
 
-fn to_control_flow(expr: &ast::Expr, expr_type: ExprType) -> Option<ControlFlow> {
+fn to_control_flow<'a>(expr: &'a ast::Expr, expr_type: ExprType) -> Option<ControlFlow<'a>> {
     match expr.node {
         ast::ExprKind::If(ref cond, ref if_block, ref else_block) => Some(ControlFlow::new_if(
             cond,