Judgment borrow_check_place_expr at crates/formality-rust/src/check/borrow_check/nll.rs:603
Signature:
borrow_check_place_expr(env: TypeckEnv, assumptions: Wcs, state: FlowState, place: PlaceExpr,) => (TypedPlaceExpr, FlowState)
The number on each rule’s conclusion is positive coverage; the number on each premise is negative coverage. Click a number to browse the tests.
local| Line | Coverage | Source |
|---|---|---|
| 614 | 2 | (let ty = state.local_variable(&local_id)?) |
| ──────── ("local") | ||
| 616 | 90 | (borrow_check_place_expr(_env, _assumptions, state, PlaceExpr::Var(local_id)) => ( TypedPlaceExpr::new(ty, TypedPlaceExpressionData::local(local_id)), state, )) |
struct field| Line | Coverage | Source |
|---|---|---|
| 623 | ✗ | (borrow_check_place_expr(env, assumptions, state, prefix) => (prefix_typed, state)) |
| 624 | 1 | (prove_ty_is_rigid(env, assumptions, state, &prefix_typed.ty) => (RigidTy { name: RigidName::AdtId(adt_id), parameters }, state)) |
| 625 | ✗ | (let Struct { id: _, binder } = env.crates().struct_named(&adt_id)?) |
| 626 | ✗ | (let StructBoundData { where_clauses, fields } = binder.instantiate_with(¶meters)?) |
| 627 | ✗ | (prove_where_clauses(env, assumptions, state, where_clauses) => state) |
| 628 | ✗ | (field in fields) |
| 629 | 1 | (if field.name == *field_name) |
| ──────── ("struct field") | ||
| 631 | 20 | (borrow_check_place_expr(env, assumptions, state, PlaceExpr::Field { prefix, field_name }) => ( TypedPlaceExpr::new(&field.ty, TypedPlaceExpressionData::field(prefix_typed, field_name, adt_id, VariantId::for_struct())), state, )) |
tuple field| Line | Coverage | Source |
|---|---|---|
| 638 | ✗ | (borrow_check_place_expr(env, assumptions, state, prefix) => (prefix_typed, state)) |
| 639 | ✗ | (prove_ty_is_rigid(env, assumptions, state, &prefix_typed.ty) => (RigidTy { name: RigidName::Tuple(arity), parameters }, state)) |
| 640 | ✗ | (if field_index < arity) |
| 641 | ✗ | (if let Parameter::Ty(field_ty) = ¶meters[*field_index]) |
| ──────── ("tuple field") | ||
| 643 | ✗ | (borrow_check_place_expr(env, assumptions, state, PlaceExpr::Field { prefix, field_name: FieldName::Index(field_index) }) => ( TypedPlaceExpr::new(field_ty, TypedPlaceExpressionData::tuple_field(prefix_typed, field_index)), state, )) |
parens| Line | Coverage | Source |
|---|---|---|
| 650 | ✗ | (borrow_check_place_expr(env, assumptions, state, place) => (place_typed, state)) |
| ──────── ("parens") | ||
| 652 | 15 | (borrow_check_place_expr(env, assumptions, state, PlaceExpr::Parens(place)) => (place_typed, state)) |
deref-ref| Line | Coverage | Source |
|---|---|---|
| 656 | ✗ | (borrow_check_place_expr(env, assumptions, state, prefix) => (prefix_typed, state)) |
| 657 | ✗ | (prove_is_implemented(env, assumptions, state, TraitId::new("Derefable").with_self(&prefix_typed.ty)) => state) |
| 658 | N/A | (let referent_ty = AliasTy::associated_ty( TraitId::new("Derefable"), AssociatedItemId::new("Target"), 0, vec![&prefix_typed.ty], )) |
| ──────── ("deref-ref") | ||
| 665 | 46 | (borrow_check_place_expr(env, assumptions, state, PlaceExpr::Deref { prefix }) => ( TypedPlaceExpr::new(referent_ty, TypedPlaceExpressionData::deref(prefix_typed)), state, )) |