]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/visit.rs
Control usage of `!` through a feature gate.
[rust.git] / src / libsyntax / visit.rs
index 1d40e3e395e2948fc73ef3489b2a6e214aec690d..228409b82074449a60c51e974be52beb44182317 100644 (file)
@@ -4,7 +4,8 @@
 //
 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your,
+//                 "The `!` type is experimental");
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
@@ -128,6 +129,9 @@ fn visit_macro_def(&mut self, macro_def: &MacroDef) {
     fn visit_vis(&mut self, vis: &Visibility) {
         walk_vis(self, vis)
     }
+    fn visit_fn_ret_ty(&mut self, ret_ty: &FunctionRetTy) {
+        walk_fn_ret_ty(self, ret_ty)
+    }
 }
 
 #[macro_export]
@@ -510,7 +514,7 @@ pub fn walk_fn_decl<V: Visitor>(visitor: &mut V, function_declaration: &FnDecl)
         visitor.visit_pat(&argument.pat);
         visitor.visit_ty(&argument.ty)
     }
-    walk_fn_ret_ty(visitor, &function_declaration.output)
+    visitor.visit_fn_ret_ty(&function_declaration.output)
 }
 
 pub fn walk_fn_kind<V: Visitor>(visitor: &mut V, function_kind: FnKind) {