Skip to content

Commit aabb6e7

Browse files
committed
rustc: Rename lints per RFC 344
RFC 344 proposes a set of naming conventions for lints. This commit renames existing lints to follow the conventions. Use the following sed script to bring your code up to date: ``` s/unnecessary_typecast/unused_typecasts/g s/unsigned_negate/unsigned_negation/g s/type_limits/unused_comparisons/g s/type_overflow/overflowing_literals/g s/ctypes/improper_ctypes/g s/owned_heap_memory/box_pointers/g s/unused_attribute/unused_attributes/g s/path_statement/path_statements/g s/unused_must_use/unused_must_use/g s/unused_result/unused_results/g s/non_uppercase_statics/non_upper_case_globals/g s/unnecessary_parens/unused_parens/g s/unnecessary_import_braces/unused_import_braces/g s/unused_unsafe/unused_unsafe/g s/unsafe_block/unsafe_blocks/g s/unused_mut/unused_mut/g s/unnecessary_allocation/unused_allocation/g s/missing_doc/missing_docs/g s/unused_imports/unused_imports/g s/unused_extern_crate/unused_extern_crates/g s/unnecessary_qualification/unused_qualifications/g s/unrecognized_lint/unknown_lints/g s/unused_variable/unused_variables/g s/dead_assignment/unused_assignments/g s/unknown_crate_type/unknown_crate_types/g s/variant_size_difference/variant_size_differences/g s/transmute_fat_ptr/fat_ptr_transmutes/g ``` Closes #16545 Closes #17932 Due to deprecation, this is a: [breaking-change]
1 parent 5e1e245 commit aabb6e7

File tree

7 files changed

+118
-118
lines changed

7 files changed

+118
-118
lines changed

src/librustc/driver/driver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,15 +704,15 @@ pub fn collect_crate_types(session: &Session,
704704
}
705705
Some(ref n) if n.equiv(&("bin")) => Some(config::CrateTypeExecutable),
706706
Some(_) => {
707-
session.add_lint(lint::builtin::UNKNOWN_CRATE_TYPE,
707+
session.add_lint(lint::builtin::UNKNOWN_CRATE_TYPES,
708708
ast::CRATE_NODE_ID,
709709
a.span,
710710
"invalid `crate_type` \
711711
value".to_string());
712712
None
713713
}
714714
_ => {
715-
session.add_lint(lint::builtin::UNKNOWN_CRATE_TYPE,
715+
session.add_lint(lint::builtin::UNKNOWN_CRATE_TYPES,
716716
ast::CRATE_NODE_ID,
717717
a.span,
718718
"`crate_type` requires a \

0 commit comments

Comments
 (0)