Skip to content

Commit

Permalink
make quepingkong happy
Browse files Browse the repository at this point in the history
  • Loading branch information
vita-dounai committed Nov 12, 2021
1 parent be8b88e commit 1e89735
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/analyzer/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ impl AnalysisCallbacks {
conflict_fields.dedup();
let mut composed_conflict_fields: Vec<FieldDesc> = vec![];
let mut add_to_composed = |field_to_add: FieldDesc| {
if field_to_add.kind == field_kind::LEN {
composed_conflict_fields.push(field_to_add);
return;
}

if composed_conflict_fields
.iter()
.rposition(|field| {
Expand Down
4 changes: 3 additions & 1 deletion src/analyzer/ifds/problems/conflict_fields.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,9 @@ impl<'tcx, 'graph> IfdsProblem<'tcx> for ConflictFields<'tcx, 'graph> {
results.insert(ConflictField::Field {
container: *container,
key: Key::Len,
read_only: true,
read_only: matches!(fn_name,
KnownNames::LiquidStorageCollectionsMappingLen
| KnownNames::LiquidStorageCollectionsMappingIsEmpty),
});
}
results
Expand Down

0 comments on commit 1e89735

Please sign in to comment.