about summary refs log tree commit diff
path: root/src/etc
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-07-26 18:04:20 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-07-26 18:04:20 -0700
commitb782d42cba297ba2a3eec23985f778407a001555 (patch)
tree388a47b4e307db4e59f292ad69a46f6be90413b4 /src/etc
parent0012b5008b32543cf61a2beba36160c42f36d704 (diff)
Deny all warnings by default in doc tests
Allow some common ones that are good for examples, however.
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/extract-tests.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/etc/extract-tests.py b/src/etc/extract-tests.py
index 91b3b814ce0..ab68afb615f 100644
--- a/src/etc/extract-tests.py
+++ b/src/etc/extract-tests.py
@@ -59,14 +59,10 @@ while cur < len(lines):
                 block = "fn main() {\n" + block + "\n}\n"
             if not re.search(r"\bextern mod extra\b", block):
                 block = "extern mod extra;\n" + block
-            block = """#[ forbid(ctypes) ];
-#[ forbid(path_statement) ];
-#[ forbid(type_limits) ];
-#[ forbid(unrecognized_lint) ];
-#[ forbid(unused_imports) ];
-#[ forbid(while_true) ];
-
-#[ warn(non_camel_case_types) ];\n
+            block = """#[ deny(warnings) ];
+#[ allow(unused_variable) ];\n
+#[ allow(dead_assignment) ];\n
+#[ allow(unused_mut) ];\n
 """ + block
             if xfail:
                 block = "// xfail-test\n" + block