]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/typeck/infer/error_reporting.rs
auto merge of #13440 : huonw/rust/strbuf, r=alexcrichton
[rust.git] / src / librustc / middle / typeck / infer / error_reporting.rs
index 4fd68e622bcd9f0207e601cbc6df2831e1012657..95a1f85c7867da1886647dc8f4b1dbf5303f6d9e 100644 (file)
@@ -1103,10 +1103,10 @@ fn give_expl_lifetime_param(&self,
                                 output: ast::P<ast::Ty>,
                                 item: ast::P<ast::Item>,
                                 generics: ast::Generics) {
-        let (fn_decl, purity, ident) = match item.node {
+        let (fn_decl, fn_style, ident) = match item.node {
             // FIXME: handling method
-            ast::ItemFn(ref fn_decl, ref purity, _, _, _) => {
-                (fn_decl, purity, item.ident)
+            ast::ItemFn(ref fn_decl, ref fn_style, _, _, _) => {
+                (fn_decl, fn_style, item.ident)
             },
             _ => fail!("Expect function or method")
 
@@ -1118,7 +1118,7 @@ fn give_expl_lifetime_param(&self,
             variadic: fn_decl.variadic
         };
         let suggested_fn =
-            pprust::fun_to_str(&fd, *purity, ident, None, &generics);
+            pprust::fun_to_str(&fd, *fn_style, ident, None, &generics);
         let msg = format!("consider using an explicit lifetime \
                            parameter as shown: {}", suggested_fn);
         self.tcx.sess.span_note(item.span, msg);