Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
eddyb opened this issue Sep 16, 2018 · 5 comments

Comments

@eddyb
Copy link
Member

eddyb commented Sep 16, 2018

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

@nnethercote
Copy link
Contributor

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

@eddyb eddyb 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. Sep 18, 2018
@eddyb
Copy link
Member Author

eddyb commented Sep 18, 2018

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

@nikomatsakis
Copy link
Contributor

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

@nikomatsakis
Copy link
Contributor

(Or intern)

@nnethercote
Copy link
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.

@bors bors closed this as completed in 98dab33 Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants