1
Fork 0

Skip dead code checks on items that failed typeck

This commit is contained in:
Oli Scherer 2024-01-16 10:03:29 +00:00
parent 9a8f117d7b
commit 3599c18874
3 changed files with 16 additions and 5 deletions

View file

@ -128,7 +128,10 @@ impl<'tcx> MarkSymbolVisitor<'tcx> {
if let Some(def_id) = self.typeck_results().type_dependent_def_id(id) {
self.check_def_id(def_id);
} else {
bug!("no type-dependent def for method");
assert!(
self.typeck_results().tainted_by_errors.is_some(),
"no type-dependent def for method"
);
}
}