Skip to content

Commit a5ef305

Browse files
committed
Downgrade string_lit_as_bytes to nursery
1 parent 14e7269 commit a5ef305

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

clippy_lints/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
14751475
LintId::of(&single_component_path_imports::SINGLE_COMPONENT_PATH_IMPORTS),
14761476
LintId::of(&slow_vector_initialization::SLOW_VECTOR_INITIALIZATION),
14771477
LintId::of(&stable_sort_primitive::STABLE_SORT_PRIMITIVE),
1478-
LintId::of(&strings::STRING_LIT_AS_BYTES),
14791478
LintId::of(&suspicious_trait_impl::SUSPICIOUS_ARITHMETIC_IMPL),
14801479
LintId::of(&suspicious_trait_impl::SUSPICIOUS_OP_ASSIGN_IMPL),
14811480
LintId::of(&swap::ALMOST_SWAPPED),
@@ -1618,7 +1617,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
16181617
LintId::of(&returns::LET_AND_RETURN),
16191618
LintId::of(&returns::NEEDLESS_RETURN),
16201619
LintId::of(&single_component_path_imports::SINGLE_COMPONENT_PATH_IMPORTS),
1621-
LintId::of(&strings::STRING_LIT_AS_BYTES),
16221620
LintId::of(&tabs_in_doc_comments::TABS_IN_DOC_COMMENTS),
16231621
LintId::of(&to_digit_is_some::TO_DIGIT_IS_SOME),
16241622
LintId::of(&try_err::TRY_ERR),
@@ -1831,6 +1829,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
18311829
LintId::of(&needless_borrow::NEEDLESS_BORROW),
18321830
LintId::of(&path_buf_push_overwrite::PATH_BUF_PUSH_OVERWRITE),
18331831
LintId::of(&redundant_pub_crate::REDUNDANT_PUB_CRATE),
1832+
LintId::of(&strings::STRING_LIT_AS_BYTES),
18341833
LintId::of(&transmute::USELESS_TRANSMUTE),
18351834
LintId::of(&use_self::USE_SELF),
18361835
]);

clippy_lints/src/strings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ declare_clippy_lint! {
8080
/// let bs = b"a byte string";
8181
/// ```
8282
pub STRING_LIT_AS_BYTES,
83-
style,
83+
nursery,
8484
"calling `as_bytes` on a string literal instead of using a byte string literal"
8585
}
8686

src/lintlist/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2161,7 +2161,7 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
21612161
},
21622162
Lint {
21632163
name: "string_lit_as_bytes",
2164-
group: "style",
2164+
group: "nursery",
21652165
desc: "calling `as_bytes` on a string literal instead of using a byte string literal",
21662166
deprecation: None,
21672167
module: "strings",

0 commit comments

Comments
 (0)