Skip to content

Audit / refactor the cast code #1531

@celinval

Description

@celinval

I don't think we have thoroughly tested the cast logic and we should probably revisit some assertions as well as the code structure in general. Issues I noticed while working on #1522:

  • Incorrect code path. E.g.: casting std::boxed::Box<dyn Byte + std::marker::Sync> to std::boxed::Box<dyn Byte> was invoking cast_sized_expr_to_unsized_expr.
  • Incorrect assumptions / misleading names: E.g.:

Note: I renamed cast_sized_expr_to_unsized_expr to cast_expr_to_unsized_expr in #1522 to alleviate the first inconsistency, but it is still incorrect.

FYI: the issues we've seen so far trigger internal compiler errors (e.g.: #1528).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions