File tree 3 files changed +6
-9
lines changed
3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -1494,7 +1494,7 @@ mod m1 {
1494
1494
This example shows how one can use ` allow ` and ` warn ` to toggle
1495
1495
a particular check on and off.
1496
1496
1497
- ~~~
1497
+ ~~~ {.xfail-test}
1498
1498
#[warn(missing_doc)]
1499
1499
mod m2{
1500
1500
#[allow(missing_doc)]
Original file line number Diff line number Diff line change @@ -1154,6 +1154,7 @@ let mut x = 5;
1154
1154
let y = &x; // x is now frozen, it cannot be modified
1155
1155
}
1156
1156
// x is now unfrozen again
1157
+ # x = 3;
1157
1158
~~~~
1158
1159
1159
1160
Mutable managed boxes handle freezing dynamically when any of their contents
Original file line number Diff line number Diff line change 59
59
block = "fn main() {\n " + block + "\n }\n "
60
60
if not re .search (r"\bextern mod extra\b" , block ):
61
61
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
70
66
""" + block
71
67
if xfail :
72
68
block = "// xfail-test\n " + block
You can’t perform that action at this time.
0 commit comments