chore(ci): update dylint

This commit is contained in:
Nicolas Sarlin
2025-08-27 15:29:17 +02:00
committed by Nicolas Sarlin
parent c52e2e32d0
commit 677da3855e
4 changed files with 4 additions and 6 deletions

View File

@@ -9,7 +9,7 @@ publish = false
crate-type = ["cdylib"] crate-type = ["cdylib"]
[dependencies] [dependencies]
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "238edf273d195c8e472851ebd60571f77f978ac8" } clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "334fb906aef13d20050987b13448f37391bb97a2" }
dylint_linting = "4.0.0" dylint_linting = "4.0.0"
[dev-dependencies] [dev-dependencies]

View File

@@ -1,4 +1,4 @@
[toolchain] [toolchain]
channel = "nightly-2025-02-20" channel = "nightly-2025-08-07"
components = ["llvm-tools-preview", "rustc-dev"] components = ["llvm-tools-preview", "rustc-dev"]
profile = "default" profile = "default"

View File

@@ -1,5 +1,4 @@
#![feature(rustc_private)] #![feature(rustc_private)]
#![feature(let_chains)]
#![warn(unused_extern_crates)] #![warn(unused_extern_crates)]
extern crate rustc_ast; extern crate rustc_ast;

View File

@@ -3,7 +3,6 @@ use std::sync::{Arc, OnceLock};
use rustc_hir::def_id::DefId; use rustc_hir::def_id::DefId;
use rustc_hir::{Impl, Item, ItemKind}; use rustc_hir::{Impl, Item, ItemKind};
use rustc_lint::{LateContext, LateLintPass, LintContext}; use rustc_lint::{LateContext, LateLintPass, LintContext};
use rustc_span::sym;
use crate::utils::{get_def_id_from_ty, is_allowed_lint, symbols_list_from_str}; use crate::utils::{get_def_id_from_ty, is_allowed_lint, symbols_list_from_str};
@@ -22,7 +21,7 @@ impl SerializeWithoutVersionizeInner {
pub fn versionize_trait(&self, cx: &LateContext<'_>) -> Option<DefId> { pub fn versionize_trait(&self, cx: &LateContext<'_>) -> Option<DefId> {
self.versionize_trait self.versionize_trait
.get_or_init(|| { .get_or_init(|| {
let versionize_trait = cx.tcx.all_traits().find(|def_id| { let versionize_trait = cx.tcx.all_traits_including_private().find(|def_id| {
let path = cx.get_def_path(*def_id); let path = cx.get_def_path(*def_id);
path == symbols_list_from_str(&VERSIONIZE_TRAIT) path == symbols_list_from_str(&VERSIONIZE_TRAIT)
}); });
@@ -75,7 +74,7 @@ impl<'tcx> LateLintPass<'tcx> for SerializeWithoutVersionize {
if let Some(type_def_id) = get_def_id_from_ty(ty) { if let Some(type_def_id) = get_def_id_from_ty(ty) {
// If the type has been automatically generated, skip it // If the type has been automatically generated, skip it
if cx.tcx.has_attr(type_def_id, sym::automatically_derived) { if cx.tcx.is_automatically_derived(type_def_id) {
return; return;
} }