Address review feedback

This commit is contained in:
xFrednet 2021-11-10 20:08:38 +01:00
parent d68408f4ad
commit 94bc0a1c78
No known key found for this signature in database
GPG key ID: FCDCBF29AF64D601
3 changed files with 8 additions and 16 deletions

View file

@ -12,7 +12,7 @@ opener = "0.5"
regex = "1.5"
shell-escape = "0.1"
walkdir = "2.3"
cargo_metadata = "0.12"
cargo_metadata = "0.14"
[features]
deny-warnings = []

View file

@ -141,7 +141,7 @@ fn get_stabilisation_version() -> String {
}
}
String::from("<TODO set version(see doc/adding_lints.md)")
String::from("<TODO set version(see doc/adding_lints.md)>")
}
fn get_test_file_contents(lint_name: &str, header_commands: Option<&str>) -> String {

View file

@ -318,19 +318,11 @@ declare_clippy_lint! {
declare_clippy_lint! {
/// ### What it does
/// Checks for invalid `clippy::version` attributes
/// Checks for invalid `clippy::version` attributes.
///
/// ```txt
/// +-------------------------------+
/// | Valid values are: |
/// | * "pre 1.29.0" |
/// | * any valid semantic version |
/// +-------------------------------+
/// \
/// \ (^v^)
/// <( )>
/// w w
/// ```
/// Valid values are:
/// * "pre 1.29.0"
/// * any valid semantic version
pub INVALID_CLIPPY_VERSION_ATTRIBUTE,
internal,
"found an invalid `clippy::version` attribute"
@ -484,8 +476,8 @@ fn is_lint_ref_type<'tcx>(cx: &LateContext<'tcx>, ty: &Ty<'_>) -> bool {
fn check_invalid_clippy_version_attribute(cx: &LateContext<'_>, item: &'_ Item<'_>) {
if let Some(value) = extract_clippy_version_value(cx, item) {
// The `sym!` macro doesn't work as it only expects a single token. I think
// It's better to keep it this way and have a direct `Symbol::intern` call here :)
// The `sym!` macro doesn't work as it only expects a single token.
// It's better to keep it this way and have a direct `Symbol::intern` call here.
if value == Symbol::intern("pre 1.29.0") {
return;
}