Skip to content

Commit 7be0613

Browse files
Merge #8469
8469: Remove assertion in impl collection r=flodiebold a=flodiebold This condition should always be true for *valid* code, but of course there might be invalid code or things that we can't currently resolve. Fixes #8464. Co-authored-by: Florian Diebold <[email protected]>
2 parents 5b40342 + 97d6e36 commit 7be0613

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

crates/hir_ty/src/method_resolution.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use hir_def::{
1313
};
1414
use hir_expand::name::Name;
1515
use rustc_hash::{FxHashMap, FxHashSet};
16-
use stdx::always;
1716

1817
use crate::{
1918
autoderef,
@@ -22,8 +21,8 @@ use crate::{
2221
primitive::{self, FloatTy, IntTy, UintTy},
2322
static_lifetime,
2423
utils::all_super_traits,
25-
AdtId, Canonical, CanonicalVarKinds, DebruijnIndex, ForeignDefId, HirDisplay, InEnvironment,
26-
Interner, Scalar, Substitution, TraitEnvironment, TraitRefExt, Ty, TyBuilder, TyExt, TyKind,
24+
AdtId, Canonical, CanonicalVarKinds, DebruijnIndex, ForeignDefId, InEnvironment, Interner,
25+
Scalar, Substitution, TraitEnvironment, TraitRefExt, Ty, TyBuilder, TyExt, TyKind,
2726
};
2827

2928
/// This is used as a key for indexing impls.
@@ -259,10 +258,10 @@ impl InherentImpls {
259258

260259
let self_ty = db.impl_self_ty(impl_id);
261260
let fp = TyFingerprint::for_inherent_impl(self_ty.skip_binders());
262-
always!(fp.is_some(), "no fingerprint for {}", self_ty.skip_binders().display(db));
263261
if let Some(fp) = fp {
264262
map.entry(fp).or_default().push(impl_id);
265263
}
264+
// `fp` should only be `None` in error cases (either erroneous code or incomplete name resolution)
266265
}
267266
}
268267

0 commit comments

Comments
 (0)