Skip to content

Commit aa8f79d

Browse files
committed
auto merge of #8067 : alexcrichton/rust/issue-3636, r=huonw
Allow some common ones that are good for examples, however. Closes #3636
2 parents ed20fcc + b782d42 commit aa8f79d

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

doc/rust.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ mod m1 {
14941494
This example shows how one can use `allow` and `warn` to toggle
14951495
a particular check on and off.
14961496

1497-
~~~
1497+
~~~{.xfail-test}
14981498
#[warn(missing_doc)]
14991499
mod m2{
15001500
#[allow(missing_doc)]

doc/tutorial.md

+1
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,7 @@ let mut x = 5;
11541154
let y = &x; // x is now frozen, it cannot be modified
11551155
}
11561156
// x is now unfrozen again
1157+
# x = 3;
11571158
~~~~
11581159
11591160
Mutable managed boxes handle freezing dynamically when any of their contents

src/etc/extract-tests.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,10 @@
5959
block = "fn main() {\n" + block + "\n}\n"
6060
if not re.search(r"\bextern mod extra\b", block):
6161
block = "extern mod extra;\n" + block
62-
block = """#[ forbid(ctypes) ];
63-
#[ forbid(path_statement) ];
64-
#[ forbid(type_limits) ];
65-
#[ forbid(unrecognized_lint) ];
66-
#[ forbid(unused_imports) ];
67-
#[ forbid(while_true) ];
68-
69-
#[ warn(non_camel_case_types) ];\n
62+
block = """#[ deny(warnings) ];
63+
#[ allow(unused_variable) ];\n
64+
#[ allow(dead_assignment) ];\n
65+
#[ allow(unused_mut) ];\n
7066
""" + block
7167
if xfail:
7268
block = "// xfail-test\n" + block

0 commit comments

Comments
 (0)