auto merge of #8067 : alexcrichton/rust/issue-3636, r=huonw
Allow some common ones that are good for examples, however. Closes #3636
This commit is contained in:
commit
aa8f79d6cf
3 changed files with 6 additions and 9 deletions
|
@ -1494,7 +1494,7 @@ mod m1 {
|
||||||
This example shows how one can use `allow` and `warn` to toggle
|
This example shows how one can use `allow` and `warn` to toggle
|
||||||
a particular check on and off.
|
a particular check on and off.
|
||||||
|
|
||||||
~~~
|
~~~{.xfail-test}
|
||||||
#[warn(missing_doc)]
|
#[warn(missing_doc)]
|
||||||
mod m2{
|
mod m2{
|
||||||
#[allow(missing_doc)]
|
#[allow(missing_doc)]
|
||||||
|
|
|
@ -1154,6 +1154,7 @@ let mut x = 5;
|
||||||
let y = &x; // x is now frozen, it cannot be modified
|
let y = &x; // x is now frozen, it cannot be modified
|
||||||
}
|
}
|
||||||
// x is now unfrozen again
|
// x is now unfrozen again
|
||||||
|
# x = 3;
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
Mutable managed boxes handle freezing dynamically when any of their contents
|
Mutable managed boxes handle freezing dynamically when any of their contents
|
||||||
|
|
|
@ -59,14 +59,10 @@ while cur < len(lines):
|
||||||
block = "fn main() {\n" + block + "\n}\n"
|
block = "fn main() {\n" + block + "\n}\n"
|
||||||
if not re.search(r"\bextern mod extra\b", block):
|
if not re.search(r"\bextern mod extra\b", block):
|
||||||
block = "extern mod extra;\n" + block
|
block = "extern mod extra;\n" + block
|
||||||
block = """#[ forbid(ctypes) ];
|
block = """#[ deny(warnings) ];
|
||||||
#[ forbid(path_statement) ];
|
#[ allow(unused_variable) ];\n
|
||||||
#[ forbid(type_limits) ];
|
#[ allow(dead_assignment) ];\n
|
||||||
#[ forbid(unrecognized_lint) ];
|
#[ allow(unused_mut) ];\n
|
||||||
#[ forbid(unused_imports) ];
|
|
||||||
#[ forbid(while_true) ];
|
|
||||||
|
|
||||||
#[ warn(non_camel_case_types) ];\n
|
|
||||||
""" + block
|
""" + block
|
||||||
if xfail:
|
if xfail:
|
||||||
block = "// xfail-test\n" + block
|
block = "// xfail-test\n" + block
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue