Skip to content

Commit 0155a63

Browse files
committed
Auto merge of rust-lang#95524 - oli-obk:cached_stable_hash_cleanups, r=nnethercote
Cached stable hash cleanups r? `@nnethercote` Add a sanity assertion in debug mode to check that the cached hashes are actually the ones we get if we compute the hash each time. Add a new data structure that bundles all the hash-caching work to make it easier to re-use it for different interned data structures
2 parents da26623 + b79f13e commit 0155a63

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clippy_lints/src/case_sensitive_file_extension_comparisons.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use clippy_utils::diagnostics::span_lint_and_help;
22
use if_chain::if_chain;
33
use rustc_ast::ast::LitKind;
4-
use rustc_data_structures::intern::Interned;
54
use rustc_hir::{Expr, ExprKind, PathSegment};
65
use rustc_lint::{LateContext, LateLintPass};
76
use rustc_middle::ty;
@@ -56,8 +55,8 @@ fn check_case_sensitive_file_extension_comparison(ctx: &LateContext<'_>, expr: &
5655
ty::Str => {
5756
return Some(span);
5857
},
59-
ty::Adt(ty::AdtDef(Interned(&ty::AdtDefData { did, .. }, _)), _) => {
60-
if ctx.tcx.is_diagnostic_item(sym::String, did) {
58+
ty::Adt(def, _) => {
59+
if ctx.tcx.is_diagnostic_item(sym::String, def.did()) {
6160
return Some(span);
6261
}
6362
},

0 commit comments

Comments
 (0)