Skip to content

Commit 6f4221e

Browse files
committed
Address review feedback
1 parent d68408f commit 6f4221e

File tree

3 files changed

+9
-17
lines changed

3 files changed

+9
-17
lines changed

clippy_dev/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ opener = "0.5"
1212
regex = "1.5"
1313
shell-escape = "0.1"
1414
walkdir = "2.3"
15-
cargo_metadata = "0.12"
15+
cargo_metadata = "0.14"
1616

1717
[features]
1818
deny-warnings = []

clippy_dev/src/new_lint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ fn get_stabilisation_version() -> String {
141141
}
142142
}
143143

144-
String::from("<TODO set version(see doc/adding_lints.md)")
144+
String::from("<TODO set version(see doc/adding_lints.md)>")
145145
}
146146

147147
fn get_test_file_contents(lint_name: &str, header_commands: Option<&str>) -> String {

clippy_lints/src/utils/internal_lints.rs

+7-15
Original file line numberDiff line numberDiff line change
@@ -318,19 +318,11 @@ declare_clippy_lint! {
318318

319319
declare_clippy_lint! {
320320
/// ### What it does
321-
/// Checks for invalid `clippy::version` attributes
322-
///
323-
/// ```txt
324-
/// +-------------------------------+
325-
/// | Valid values are: |
326-
/// | * "pre 1.29.0" |
327-
/// | * any valid semantic version |
328-
/// +-------------------------------+
329-
/// \
330-
/// \ (^v^)
331-
/// <( )>
332-
/// w w
333-
/// ```
321+
/// Checks for invalid `clippy::version` attributes.
322+
///
323+
/// Valid values are:
324+
/// * "pre 1.29.0"
325+
/// * any valid semantic version
334326
pub INVALID_CLIPPY_VERSION_ATTRIBUTE,
335327
internal,
336328
"found an invalid `clippy::version` attribute"
@@ -484,8 +476,8 @@ fn is_lint_ref_type<'tcx>(cx: &LateContext<'tcx>, ty: &Ty<'_>) -> bool {
484476

485477
fn check_invalid_clippy_version_attribute(cx: &LateContext<'_>, item: &'_ Item<'_>) {
486478
if let Some(value) = extract_clippy_version_value(cx, item) {
487-
// The `sym!` macro doesn't work as it only expects a single token. I think
488-
// It's better to keep it this way and have a direct `Symbol::intern` call here :)
479+
// The `sym!` macro doesn't work as it only expects a single token.
480+
// It's better to keep it this way and have a direct `Symbol::intern` call here.
489481
if value == Symbol::intern("pre 1.29.0") {
490482
return;
491483
}

0 commit comments

Comments
 (0)