Merge pull request #7936 from thestinger/cleanup
rm obsolete no-op lints
This commit is contained in:
commit
fc05819181
@ -60,9 +60,6 @@ while cur < len(lines):
|
||||
if not re.search(r"\bextern mod extra\b", block):
|
||||
block = "extern mod extra;\n" + block
|
||||
block = """#[ forbid(ctypes) ];
|
||||
#[ forbid(deprecated_pattern) ];
|
||||
#[ forbid(implicit_copies) ];
|
||||
#[ forbid(non_implicitly_copyable_typarams) ];
|
||||
#[ forbid(path_statement) ];
|
||||
#[ forbid(type_limits) ];
|
||||
#[ forbid(unrecognized_lint) ];
|
||||
|
@ -33,12 +33,9 @@ _rustc_opts_switches=(
|
||||
)
|
||||
_rustc_opts_lint=(
|
||||
'path-statement[path statements with no effect]'
|
||||
'deprecated-pattern[warn about deprecated uses of pattern bindings]'
|
||||
'non-implicitly-copyable-typarams[passing non implicitly copyable types as copy type params]'
|
||||
'missing-trait-doc[detects missing documentation for traits]'
|
||||
'missing-struct-doc[detects missing documentation for structs]'
|
||||
'ctypes[proper use of core::libc types in foreign modules]'
|
||||
'implicit-copies[implicit copies of non implicitly copyable data]'
|
||||
"unused-mut[detect mut variables which don't need to be mutable]"
|
||||
'unused-imports[imports that are never used]'
|
||||
'heap-memory[use of any (~ type or @ type) heap memory]'
|
||||
|
@ -75,9 +75,7 @@ pub enum lint {
|
||||
unnecessary_qualification,
|
||||
while_true,
|
||||
path_statement,
|
||||
implicit_copies,
|
||||
unrecognized_lint,
|
||||
deprecated_pattern,
|
||||
non_camel_case_types,
|
||||
non_uppercase_statics,
|
||||
type_limits,
|
||||
@ -182,20 +180,6 @@ static lint_table: &'static [(&'static str, LintSpec)] = &[
|
||||
default: warn
|
||||
}),
|
||||
|
||||
("implicit_copies",
|
||||
LintSpec {
|
||||
lint: implicit_copies,
|
||||
desc: "implicit copies of non implicitly copyable data",
|
||||
default: warn
|
||||
}),
|
||||
|
||||
("deprecated_pattern",
|
||||
LintSpec {
|
||||
lint: deprecated_pattern,
|
||||
desc: "warn about deprecated uses of pattern bindings",
|
||||
default: allow
|
||||
}),
|
||||
|
||||
("non_camel_case_types",
|
||||
LintSpec {
|
||||
lint: non_camel_case_types,
|
||||
|
@ -17,8 +17,6 @@
|
||||
#[license = "MIT/ASL2"];
|
||||
#[crate_type = "lib"];
|
||||
|
||||
#[deny(deprecated_pattern)];
|
||||
|
||||
extern mod extra;
|
||||
extern mod syntax;
|
||||
|
||||
|
@ -396,7 +396,6 @@ pub fn unwrap_err<T, U>(res: Result<T, U>) -> U {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[allow(non_implicitly_copyable_typarams)]
|
||||
mod tests {
|
||||
use result::{Err, Ok, Result, chain, get, get_err};
|
||||
use result;
|
||||
|
@ -384,7 +384,6 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[allow(non_implicitly_copyable_typarams)]
|
||||
fn test_tuple() {
|
||||
assert_eq!((948, 4039.48).first(), 948);
|
||||
assert_eq!((34.5, ~"foo").second(), ~"foo");
|
||||
|
@ -20,8 +20,6 @@
|
||||
#[license = "MIT/ASL2"];
|
||||
#[crate_type = "lib"];
|
||||
|
||||
#[deny(deprecated_pattern)];
|
||||
|
||||
extern mod extra;
|
||||
|
||||
pub mod util {
|
||||
|
@ -8,8 +8,6 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#[allow(non_implicitly_copyable_typarams)];
|
||||
|
||||
extern mod syntax;
|
||||
|
||||
use syntax::ext::base::ExtCtxt;
|
||||
|
@ -12,8 +12,6 @@
|
||||
|
||||
// xfail-test #6122
|
||||
|
||||
#[forbid(deprecated_pattern)];
|
||||
|
||||
extern mod extra;
|
||||
|
||||
// These tests used to be separate files, but I wanted to refactor all
|
||||
|
@ -8,10 +8,6 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
|
||||
// error on implicit copies to check fixed length vectors
|
||||
// are implicitly copyable
|
||||
#[deny(implicit_copies)]
|
||||
pub fn main() {
|
||||
let arr = [1,2,3];
|
||||
let arr2 = arr;
|
||||
|
@ -21,7 +21,6 @@ fn C(x: uint) -> C {
|
||||
fn f<T>(_x: T) {
|
||||
}
|
||||
|
||||
#[deny(non_implicitly_copyable_typarams)]
|
||||
pub fn main() {
|
||||
f(C(1u));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user