Skip to content

Each call of tcx.{declared_,explicit_,}predicates_of clones the GenericPredicate struct, which includes a Vec. #54274

Closed

Description

@eddyb

Did we forget to intern/Rc it? cc @nikomatsakis @arielb1 @nnethercote

Activity

  1. nnethercote commented on Sep 18, 2018

    @nnethercote
    Contributor

    I can't find a function or method called generic_predicates. What is the code location?

  2. changed the title [-]Each call of tcx.generic_predicates clones the GenericPredicate struct, which includes a Vec.[/-] [+]Each call of tcx.{declared_,explicit_,}predicates_of clones the GenericPredicate struct, which includes a Vec.[/+] on Sep 18, 2018
  3. eddyb commented on Sep 18, 2018

    @eddyb
    ContributorAuthor

    Sorry, I mistyped. I meant all the functions in rustc::ty::query that return GenericPredicates.

  4. nikomatsakis commented on Sep 18, 2018

    @nikomatsakis
    Contributor

    I've noticed this before but never filed an issue. I think we probably ought to Rc, yes.

  5. nikomatsakis commented on Sep 18, 2018

    @nikomatsakis
    Contributor

    (Or intern)

  6. nnethercote commented on Nov 8, 2018

    @nnethercote
    Contributor

    #55778 fixes some of these, the ones that show up in profiles. There are still a couple more that were more annoying to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions