Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 91e79d3

Browse files
committed
Fix nits from review
1 parent a7c524a commit 91e79d3

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

compiler/rustc_lint/src/late.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,6 @@ pub fn check_crate<'tcx>(tcx: TyCtxt<'tcx>) {
487487
/// Format name ignoring the name, useful for filtering non-used lints.
488488
/// For example, 'clippy::my_lint' will turn into 'my_lint'
489489
pub(crate) fn name_without_tool(name: String) -> String {
490-
name
491-
// Doing some calculations here to account for those separators
492-
[name.find("::").unwrap_or(name.len() - 2) + 2..]
493-
.to_string()
490+
// Doing some calculations here to account for those separators
491+
name[name.find("::").unwrap_or(name.len() - 2) + 2..].to_string()
494492
}

compiler/rustc_middle/src/query/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ rustc_queries! {
422422

423423
query lints_that_can_emit(_: ()) -> &'tcx Lrc<(Vec<String>, Vec<String>)> {
424424
arena_cache
425-
desc { "Computing all lints that are explicitly enabled or with a default level great than Allow" }
425+
desc { "Computing all lints that are explicitly enabled or with a default level greater than Allow" }
426426
}
427427

428428
query expn_that_defined(key: DefId) -> rustc_span::ExpnId {

compiler/rustc_parse/src/parser/attr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ impl<'a> Parser<'a> {
146146
item.is_valid_for_outer_style(),
147147
);
148148
}
149+
149150
Ok(attr::mk_attr_from_item(&self.psess.attr_id_generator, item, None, style, attr_sp))
150151
})
151152
}

0 commit comments

Comments
 (0)