diff options
| author | bors <bors@rust-lang.org> | 2013-07-27 07:10:36 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-07-27 07:10:36 -0700 |
| commit | aa8f79d6cf89eca0764f5c578825ffd92e6b0e69 (patch) | |
| tree | 70a306307ecd4d47a42275d01a7708e2f2b73de5 | |
| parent | ed20fcc4596c45aef37a1e8a13dd9fcd6e0e6dd5 (diff) | |
| parent | b782d42cba297ba2a3eec23985f778407a001555 (diff) | |
| download | rust-aa8f79d6cf89eca0764f5c578825ffd92e6b0e69.tar.gz rust-aa8f79d6cf89eca0764f5c578825ffd92e6b0e69.zip | |
auto merge of #8067 : alexcrichton/rust/issue-3636, r=huonw
Allow some common ones that are good for examples, however. Closes #3636
| -rw-r--r-- | doc/rust.md | 2 | ||||
| -rw-r--r-- | doc/tutorial.md | 1 | ||||
| -rw-r--r-- | src/etc/extract-tests.py | 12 |
3 files changed, 6 insertions, 9 deletions
diff --git a/doc/rust.md b/doc/rust.md index e98edd229b8..f938fb79b44 100644 --- a/doc/rust.md +++ b/doc/rust.md @@ -1494,7 +1494,7 @@ mod m1 { This example shows how one can use `allow` and `warn` to toggle a particular check on and off. -~~~ +~~~{.xfail-test} #[warn(missing_doc)] mod m2{ #[allow(missing_doc)] diff --git a/doc/tutorial.md b/doc/tutorial.md index d0b375b0b58..ee9d22e548d 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -1154,6 +1154,7 @@ let mut x = 5; let y = &x; // x is now frozen, it cannot be modified } // x is now unfrozen again +# x = 3; ~~~~ Mutable managed boxes handle freezing dynamically when any of their contents 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 |
