Skip to content

Cleanup: impl Upcast helper for NLL typed place expression construction #250

@nikomatsakis

Description

@nikomatsakis

Follow-up cleanup from PR #246:

TypedPlaceExpression struct literal construction in nll.rs requires explicit Arc::new and .clone() calls:

root: Arc::new(root_expr.clone()),
ty: ty.clone(),
kind: TypedPlaceExpressionKind::Deref(Arc::new(inner_expr.clone())),

Upcast doesn't help with struct fields, so a constructor or builder that accepts impl Upcast<T> would be needed to clean this up.

See: #246 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions