Skip to content

Nuke the const_to_allocation query #53847

Closed
@oli-obk

Description

@oli-obk

This query is not doing anything anymore and only used in two locations.

Steps for resolving this issue:

  1. grep for const_to_allocation and remember where the two tcx.const_to_allocation calls are
  2. remove every mention of it
  3. grep for ConstToAllocation
  4. remove every mentioon of it
  5. start building (this takes some time before it hits your use sites, let the computer work in parallel to you)
  6. go back to the former call sites and replace them by pattern matching on the argument to extract the necessary data from the ByRef and panic if it's not ByRef.
  7. remove all the comments at the call sites talking about the query
  8. open a PR
  9. ping @RalfJung on the PR and watch his happiness meter go up

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions